Recent Posts

Pages: 1 [2] 3 4 5 6 7 ... 10
11
News / Re: We updated our forum
« Last post by Administrator on February 02, 2012, 07:29:21 am »
The forum engine was updated.
12
8051 Development Tools / Power-On Port Status Problem
« Last post by adam_blue on January 29, 2012, 06:11:05 pm »
Hi,

I’m not good at programming…
I’ve done a basic circuit with AT89C2051. 
It has 2 input button and 10 output (relay).
When button 1 pressed, output relays will sequentiallay work 10 seconds and after stop.
When button 2 pressed, output relays will sequentiallay work 8 seconds and after stop.



My problem is;
At the power-up, microcontroller is doing it’s Port’s “logic-1”
I’ve written program’s first rows;
P1 = 0
P3 = 0   

However, at the power-up for a little time ,  microcontroller is doing it’s Port’s logic-1… !!! ???  (P1 and P3 is FF)

How will  I change microcontroller’s  Reset (PORT) values  ?



BASCOM program is below ;
(Micro-C version has given same result.)

' VARIABLES     
Dim time as byte


' FUNCTIONS
Declare Sub Relay_Cont(time as byte)         


' CONFIGURATIONS                  
$CRYSTAL = 11059200                     

'* Reset all the ports *
   P1 = 0
   P3 = 0   


'loop forever
Do
    if P3.2=1 Then Call Relay_Cont(10)
    if P3.3=1 Then Call Relay_Cont(8)
Loop

End


Sub Relay_Cont(time as byte)                  
      set P3.7
      wait time
      reset P3.7
                  
      set P1.0
      wait time
      reset P1.0
      
      set P1.1
      wait time
      reset P1.1
      
      set P1.2
      wait time
      reset P1.2
      
      set P1.3
      wait time
      reset P1.3
   
      set P1.4
      wait time
      reset P1.4
      
      set P1.5
      wait time
      reset P1.5
      
      set P1.6
      wait time
      reset P1.6
      
      set P1.7
      wait time
      reset P1.7
End Sub
13
Micro-IDE / Bug in IDE (Output Extention in settings)
« Last post by dcomer on September 05, 2011, 05:52:05 pm »
Thur far I am favorably impressed with the Micro-IDE and the price  :)

One issue I noticed is that in Project->Settings->Output->Output Extension, specifying an extension (e.g. hex), does not seem to have an effect with or without an output file name. Seems to me to be a bug, or has anyone else used this setting with success? I like to name my Intel HEX files with a .HEX extension.

Thanks,

Dave
Pages: 1 [2] 3 4 5 6 7 ... 10