Electronic – Driving LEDs with 74HC540 or 74HC541

bufferled

I have some LEDs (not the high power type) being driven by a 74HC541, one LED per output, with no other load. I've noticed a tendency for people to use the 74HC540 instead (inverting buffer). I've gone through the datasheets and both ICs can sink or source 25mA per output pin (which is fine).

There are obviously four permutations here: inverting/non-inverting, with LEDs connected to Vcc or Ground. It looks to me like these permutations are pairwise equivalent.

Other than for logic reasons, why would you choose an inverting buffer over a non-inverting one, or vice versa?

Best Answer

If you intend to run the LED from the same supply as the logic gate, and that gate can source and sink symmetrically, then it doesn't matter. Even though a logic gate may be rated for the same source and sink current, it is still possible that the low side driver has a little lower resistance. The total Vdd and Vss currents the device is rated for may also not be symmetric, even if individual pins are.

In general, it is more likely that low side drivers have a little less resistance and that the total Vss current rating is a little higher. Also, using the low side driver works with open drain outputs. This is why people are used to wiring LEDs between the output and Vdd. This means you want a inversion in there for a logic high to cause the LED to light. Of course if this is all coming from a microcontroller, which it almost always is these days, then digital signal polarity is irrelevant since it can be handled in the firmware either way.

As long as you are not violating any spec in the datasheet, go ahead and wire up the LED whatever way is most convenient for you. You could let the final board routing decide.

Related Topic