Connect with us

Making It High Impedance

Discussion in 'General Electronics Discussion' started by Rajinder, Dec 15, 2016.

Scroll to continue with content
  1. Rajinder

    Rajinder

    468
    9
    Jan 30, 2016
    Hi all,
    I have a shift register 74hc595. This is driving a uln2003lv transistor array, that in turn drive relay coils.
    The shift register is controlled by a microcontroller. I need to make sure that the shift register is high z on switch on si I don't get relays coming on.
    From the truth table the output enable line must be high and master clear a low.
    The output enable is also used to switch the data onto the shift registers by making the line low.
    Can I tie a pull up to the output enable line for switch on I.e. making it high?
    But my question is how to make it low?
    Do I need a transistor and base resistor (also resistor from base to 0v) to keep transistor off at switch on. then the collector to vCC via pull up. Then switch this line low by turning in the transistor.
    Is that the best method?
    Sorry if this seems trivial to some of you, I just need some clarification.
    Thanks,
    Raj
     
  2. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    You can connect the output enable input directly to your microcontroller output. A pull up of 10K or so will prevent it floating while the micro boots up. After that the micro is completely in control.

    Bob
     
  3. Rajinder

    Rajinder

    468
    9
    Jan 30, 2016
    Thanks Bob.
    Please I need to ask another question. If I tie the output enable high via a 10k pull up to vcc. Do I need to configure the pin as a output?
    After the initial micro power up sequence, this line then needs to be brought low so I can operate the shift register. Without using a transistor, will this line be pulled low via the internal transistor or get inside the micro I/o line? Might sound silly but I just need to be clear on it.
    Best regards,
    Raj
     
  4. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    Of course you have to make the pin on the micro an output!

    The pin itself, with no external transistor will pull the input high or low with a reasonable valued pullup, like the 10K I suggested.

    Bob
     
  5. Rajinder

    Rajinder

    468
    9
    Jan 30, 2016
    Thanks. Then to bring it low, it's a simple case of outputting a 1 on the I/O line. The internal transistor (with its collector to Vcc via 10K) will pull the output to OV.
    Does that sound reasonable?
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,448
    2,809
    Jan 21, 2010
    Without using an external transistor, writing a 1 to the port will make the output go high.
     
  7. Rajinder

    Rajinder

    468
    9
    Jan 30, 2016
    This is my confusion. The output enable line needs to be a high at switch on, hence the pull up. Now I thought that internally the i/O line has a transistor. The pull up is from the transistor collector to Vcc. Now for me to switch this line 0, don't I just output a 1, si the internal transistor is shorted to 0V?
    Or do I need an external transistor?
    Raj
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    10,770
    2,427
    Nov 17, 2011
    To output a high voltage you write a logic '1' into the respective data bit of the µC's output register.
    To output a low voltage you write a logic '0' into the respective data bit of the µC's output register.

    No, you don't
    This is a schematic representation of the µC's output transistors and the pull up resistor:
    upload_2016-12-19_8-43-16.png

    At start up (boot) the µC's pin is typically configured as input (to avoid interference with any external circuitry). Both transistors are off (see Bob's post #2). The pull up resistor ensures a logic high level (Vcc) on the output line.

    During initialization of the µC you will configure the pin as output.
    Writing a '1' into the output register will turn on M2, turn off M1. This ensures a high level (Vcc) on the output line.
    Writing a '0' into the output register will turn on M1, turn off M2. This ensures a low level (0 V, ground) on the output line. In this mode a current will flow from Vcc through the pull up resistor into the output pin, through M1 to ground. As the 'resistance' of M1 when turned on is very much lower than the resistance of R1, the output voltage will be very near to ground (0V). think of M1, M2 as switches if that helps you undestand the principle.
     
  9. Rajinder

    Rajinder

    468
    9
    Jan 30, 2016
    Thank you very much.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-