All port pins in microcontroller switches on and off when power on.

Discussion in 'Embedded Systems and Microcontrollers' started by KumaraGuruparan, Nov 11, 2007.

  1. KumaraGuruparan

    Thread Starter Member

    Aug 20, 2007
    19
    0
    Hi

    when i switch my microcontroller board all pins go high for a fraction of time and then goes low. All relays connected to the pins gets on at the same time. How to avoid it.
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You might benefit from putting pull-down resistors on those 8051 IO lines that are giving you problems.

    On power-up, all of the digital IO lines come up in tristate mode so a pull-down will make sure that IO lines don't float to an undesired state.

    hgmjr
     
  3. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    I'm sorry but this is really bad advice for an 8051. The quasi bidirectional output of an 8051 cannot source enough current to drive even a weak pulldown like 10K. The only solution on an 8051 is to make the relay activation signal active low with an inverter stage.

    There was no indication that the OP was talking about an 8051 so maybe you have more information from another thread. Still I stand by my comment on using 8051 pins to drive active high circuits.
     
  4. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Greetings KumaraGuruparan,

    Ooopssss!!!!

    papabravo has a valid point.

    I did a little further checking and if your microcontroller happens to be an 8051 you will need to take the measures he has outlined.

    The weak pull-up in the 8051 is much weaker than I understood it to be.

    hgmjr
     
  5. KumaraGuruparan

    Thread Starter Member

    Aug 20, 2007
    19
    0
    I m using 8051 microcontroller. If i make the relay activation signal low what will happen when i switch off the the board.At that time all the port pins will go high.
     
  6. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    Which 8051 variant are you using?
     
  7. KumaraGuruparan

    Thread Starter Member

    Aug 20, 2007
    19
    0
    i m using AT8051
     
  8. Papabravo

    Expert

    Feb 24, 2006
    10,136
    1,786
    That really depends on the relationship between th micro controller power supply and the relay power supply. Also it depends on the type of relay and weather you are using normally open or normally closed contacts.

    I don't think an 8051 port pin can sink current when it is off. If the port pin can't sink any current and there is a pullup to the V+ that powers the coil then you will have no problem when the power to processor goes off and the power to the coil remains.
     
  9. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Hi....You can allways AND the outputs using 74LS08 or CD4081's and use a short delay during power up...Daniel.
     
  10. princess

    New Member

    Jan 27, 2009
    2
    0
    why can more than onr pin be selected and still be valid input data for an 16F877 microcontroller.
     
  11. GirishC

    Active Member

    Jan 23, 2009
    58
    0
    I feel, you need to appreciate the basics of it. 8051 ports goes to high state during power cycle. So you get momentary switching on relay or any devices. If its connected to valve or motor, you definitely get irritated or complains from your customer. This is applicable in case of NO or NC contact.

    For this type of problem we had to shift to a microcontroller and we used PIC. You need to choose a micro whose pins do not go high during booting process. And that's the key to your problem.
     
Loading...