1. You can now buy finished microcontroller project from us, Check out the Store for the complete list of projects.
  2. Need a custom project, Send us some details about your project. So that we can quote the price for it.

Problem with port pin status during power on reset

Discussion in 'Project Doubts' started by patelparesh86, Feb 21, 2011.

  1. patelparesh86

    patelparesh86 New Member

    Likes Received:
    0
    Trophy Points:
    0
    Hi All Friends

    I have one problem with status of port pin during reset,

    I am controling two 500W lamp using standared mothod of relay(12VDC) and NPN transistor(2N222A). I connected port pin of 89S52 with base of 2N2222 through 10K resistor. And my logic is when we send high on this pin a lamp connected with this relay will glow up.
    and all things woring perfect.

    but problem is that when i turn on main power supply so 89S52 goes in power on reset mode and during this time port pin remain high. So this each time i turn on power supply my lamps goes blink one time, and my project owner dont like this so plz give me any suggession to solve this problem.

    is there any method, to change the reset status of port pin from high to low.?
    or i should have to design new logic with PNP transistor.


    Thanks in Advance
    Paresh Patel
  2. gaurav.k

    gaurav.k Moderator

    Likes Received:
    0
    Trophy Points:
    0
    hi there i some problem in u r micro
    coz by defualt the pins goes high when power up check all the connections of the ckt
    and see the continouty of vcc and gnd
    there was same problem with me last month , my mistake was that i do not solder the crystal cap to gnd
    and also chang the micro , now it works fine
    so may b the same problem with u
  3. patelparesh86

    patelparesh86 New Member

    Likes Received:
    0
    Trophy Points:
    0
    Thanks for replay gaurav

    but plz read my proble again "by defualt the pins goes high when power up or reset" this is my problem
    when we power up micro that time default all port pin goes high, and this process of port pin turn on my lamp one time or blink one time.

    my first instruction of program is
    CLR Lamp1_bit
    CLR Lamp2_bit
    so i initially turn off both lamps by above instruction
    and if some one press push button associated with these lamps then below instruction will execute in program
    SETB Lamp1_bit
    SETB Lamp2_bit

    so when there are 1 logic on port pin lamp will on
    and when there are 0 logic on port pin lamp will off

    but by default when we power up micro all port pin goes high and remains high until micro reach to "CLR Lamp1_bit"
    each time i power up system it will turn on my lamp for samll time (time required by micro to reset it self).

    so my question are
    to avoid this one time blink of lamp what should i have to do?
    there are any method or inbuilt register of micro by setting we can make all port pin low during power up or reset ?
    or i have to design relay trigger cicuit with PNP logic.?
  4. tibbu

    tibbu Super Moderator Staff Member

    Likes Received:
    2
    Trophy Points:
    18
    hello paresh,

    There is only solution for you problem is -- use npn transistor with micro output and then drive pnp transistor with it. where pnp transistor is used to drive relay. this system will invert the output logic of micro or will act as NOT gate. use logic 1 to drive lamp.

    regards.
  5. patelparesh86

    patelparesh86 New Member

    Likes Received:
    0
    Trophy Points:
    0
    Hi friends
    Sorry for late reply. Finally I got solution for my problem, I used two npn transistor. So when there is “1” on port pin that time first transistor is on and second is off so my lamp remains off. When there is “0” on port pin that time first transistor is off and second is on so my lamp turns on. By this reverse turn on logic my lamps remain turn off during power on reset process.
    Thank you for all your response.

    From
    Paresh
  6. tibbu

    tibbu Super Moderator Staff Member

    Likes Received:
    2
    Trophy Points:
    18
    hi patel,

    Thank for trying my solution and updating the result on forum.
  7. cpansuriya

    cpansuriya New Member

    Likes Received:
    0
    Trophy Points:
    0
    Hello Paresh ,
    Please will you Please tell me the Arrangment to npn Transistor to Invert the output , I have sa,e Problem
  8. Binu

    Binu Administrator

    Likes Received:
    135
    Trophy Points:
    63
    Use this circuit diagram.
    Relay_Driver_Circuit_Using_Two_Transistor.jpg
Loading...

Share This Page

Loading...