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 08:42
Read: 1403 times

Msg Score: -2
 -2 Didn't Search First
#185727 - Power-On Port Status Problem

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.)

Dim time as byte

Declare Sub Relay_Cont(time as byte)

$CRYSTAL = 11059200

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

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


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
Power-On Port Status Problem      Adam Blue      01/30/12 08:42      
   Wrong idea      Per Westermark      01/30/12 08:48      
   you will not      Erik Malund      01/30/12 08:49      
   you are not the only one      Erik Malund      01/30/12 09:18      
   ATMEL be ashamed      Adam Blue      01/30/12 15:05      
      No, YOU should be ashamed...      Kai Klaas      01/30/12 16:15      
      Nonsense!        Andy Neil      01/30/12 16:46      
      PIC Does so      Neil Kurzman      01/30/12 23:08      
         Oh really??      Michael Karas      01/31/12 07:46      
            "Glitch" in the sense of kind of "setback in a plane"?      Kai Klaas      01/31/12 10:19      
   Try These Ideas        Michael Karas      01/30/12 17:21      
   "Glitch"      Adam Blue      02/01/12 13:12      
      what is not ďATMEL trueĒ.      Erik Malund      02/01/12 13:37      
      I think you are making excuses      Erik Malund      02/01/12 13:41      
      Oh, boohoo!        Rob Klein      02/01/12 14:04      
      What a bunch of fatty sausage...      Michael Karas      02/01/12 14:59      
      "very easy problem"      Andy Neil      02/01/12 15:02      
   Power-On Glitch      Adam Blue      02/01/12 15:40      
      Nonsense - again      Andy Neil      02/01/12 16:28      
      Please explain what the "power-on glitch" is ...      Richard Erlacher      02/01/12 19:26      
      Into The Frying Pan        Michael Karas      02/01/12 20:52      
      Power-on problem...      Kai Klaas      02/02/12 05:55      
      You are still blaming the tools      Per Westermark      02/03/12 05:55      
   Design the hardware first.      David Prentice      02/02/12 07:21      
      do not Design the hardware first.      Erik Malund      02/02/12 07:30      
   Power-On Glitch      Adam Blue      02/02/12 15:07      
      that you had the worst possible reset circuit      Erik Malund      02/02/12 15:59      
      RC-reset...      Kai Klaas      02/02/12 17:20      
      Sorry, double post, don't know why...      Kai Klaas      02/02/12 17:21      
         No, you're not the only one      Richard Erlacher      02/02/12 21:12      
      Would I Hire?      Michael Karas      02/02/12 22:44      
         incidentially      Erik Malund      02/03/12 07:09      
   Power On satus Problem      Satish S Munot      02/29/12 10:16      
      echo, echo, echo      Erik Malund      02/29/12 10:30      

Back to Subject List