Enabling / disabling 74HC245 and setting dirrection

Status
Not open for further replies.

vitormhenrique

Well-known member
Hi Guys,

How are you? Quick and basic question.

On my project I want the teensy to control both the direction and enabling / disabling the 74HC245 chip, So I connected one IO to the OE pin and another to the DIR pin. My question is, should I actually use pull down / up resistors on those connections instead of connecting directly to Teensy IO's?

I could not find any example / information on the datasheet, so that must be a dumb question :confused:

74HC245 datasheet: http://www.nxp.com/documents/data_sheet/74HC_HCT245.pdf

Thanks
 
My question is, should I actually use pull down / up resistors on those connections instead of connecting directly to Teensy IO's?

Well, you definitely want to connect those signals directly to Teensy's digital pins, so you can control them.

You might also want to add pull up or pull down resistors to those signals, if you care about whether they're high or low during the brief time when Teensy bootup up, but before it runs the part of your program that configures the pins.

Likewise, when you upload new code, those pins will disable. If you've previously driven a pin high or low, it will tend to remain in the same state, due to the slight capacitance of the pins and trace on the PCB. But if something really bad could happen if the signals "float" to the wrong voltage, resistors to keep the voltage well defined when your program isn't running would be wise.

If there's no serious consequence to the pins changing to random voltages during those brief times, then no need to use resistors.
 
Thanks Paul for the answer,

Well, you definitely want to connect those signals directly to Teensy's digital pins, so you can control them.

Sorry, I was not clear on my questions, basically I was asking if I needed to connect using the resistors or not, bot you answered it :)

Thank you, keep the good work with Teensy

Vitor Henrique
 
Oh, you're thinking of the 100 ohm series resistors.

Those are needed between the '245 outputs and the long wires going to the LEDs. For "short" wires, you don't need them.

You might wonder when a wire is considered "short" vs "long"? It's related to the total bandwidth of the signal and the speed signals travel along wires, which is approx 60% the speed of light for most wires. When the wire is less than 1/10th the shortest wavelength of the signal, you don't need a resistor. When it's greater than that, and especially when it's much longer than a wavelength, you need the resistor (or if you omit it, you get terrible signal quality).

A estimate on the high side would be 200 MHz bandwidth, which is about 2.5 meters wavelength on a wire (assuming 60% speed of light). So if the wire is less than 25 cm, you probably don't need a resistor. But much more than 25 cm and resistors become more important, and increasingly so as the wire gets towards 2.5 meters or longer.

That's why resistors aren't used on the signals between Teensy and the '245 chip, but there are 100 ohm resistors to properly impedance match the signals to the CAT6 cable.

Of course, if your wires to the LEDs are short, the resistors aren't necessary, but they don't hurt anything being there.
 
Thank you again for the awesome explanation Paul, that was exactly what I was wondering, as a hobbyist it Is very good to learn more and more about "technical stuff", despite I'm a chemical engineer I never had one single class in electronics, but this forum has been a great learning tool.
 
Status
Not open for further replies.
Back
Top