Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/30/12 15:42
Read: times


 
Msg Score: -2
 -2 Didn't Search First
#185727 - Power-On Port Status Problem
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-on, microcontroller is doing it’s Port’s “logic-1”
I’ve written program’s first rows;
P1 = 0
P3 = 0

However, at the power-on 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 so as to "Logic-0" ?



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(
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


List of 34 messages in thread
TopicAuthorDate
Power-On Port Status Problem            01/01/70 00:00      
   Wrong idea            01/01/70 00:00      
   you will not            01/01/70 00:00      
   you are not the only one            01/01/70 00:00      
   ATMEL be ashamed            01/01/70 00:00      
      No, YOU should be ashamed...            01/01/70 00:00      
      Nonsense!            01/01/70 00:00      
      PIC Does so            01/01/70 00:00      
         Oh really??            01/01/70 00:00      
            "Glitch" in the sense of kind of "setback in a plane"?            01/01/70 00:00      
   Try These Ideas            01/01/70 00:00      
   "Glitch"            01/01/70 00:00      
      what is not “ATMEL true”.            01/01/70 00:00      
      I think you are making excuses            01/01/70 00:00      
      Oh, boohoo!            01/01/70 00:00      
      What a bunch of fatty sausage...            01/01/70 00:00      
      "very easy problem"            01/01/70 00:00      
   Power-On Glitch            01/01/70 00:00      
      Nonsense - again            01/01/70 00:00      
      Please explain what the "power-on glitch" is ...            01/01/70 00:00      
      Into The Frying Pan            01/01/70 00:00      
      Power-on problem...            01/01/70 00:00      
      You are still blaming the tools            01/01/70 00:00      
   Design the hardware first.            01/01/70 00:00      
      do not Design the hardware first.            01/01/70 00:00      
   Power-On Glitch            01/01/70 00:00      
      that you had the worst possible reset circuit            01/01/70 00:00      
      RC-reset...            01/01/70 00:00      
      Sorry, double post, don't know why...            01/01/70 00:00      
         No, you're not the only one            01/01/70 00:00      
      Would I Hire?            01/01/70 00:00      
         incidentially            01/01/70 00:00      
   Power On satus Problem            01/01/70 00:00      
      echo, echo, echo            01/01/70 00:00      

Back to Subject List