10

I have seen much info explaining that the inputs of unused gates in a multi-gate IC (say, 74LS00, which is a quad-gate, where only 3 gates are used) should not be left floating, but I cannot find any technical reason as to why this is the case.

The datasheets specify that the quad gates are "independent" or "isolated," and the schematic shown in the datasheets for simple gates clearly show 4 independent gates.

I understand that it's not exactly the case, as clearly VCC and GND pins power the entire IC. I am interested in the technical reason, and perhaps an experiment that can be setup to clearly show that an unused gate is problematic if left floating.

The closest I've seen to my question is this one, but none of the answers address what I'm asking.

JRE
  • 71,321
  • 10
  • 107
  • 188
CoolBots
  • 211
  • 1
  • 5

2 Answers2

24

It is pretty simple.

The inputs of such gates are very sensitive. They will "detect" small changes in ambient electric fields. Those small changes will act as inputs to the gate, with the output of the gate changing as the inputs change.

74LS series ICs consume power when changing state. With the inputs (and hence the outputs) flailing around, the chip will consume more power than it should. It will also causes glitches on the power rails.

The wasted power will cause the IC to get warm, and the random glitches on the power rails can cause other gates (or ICs) to misbehave.

Plug your 74LS00 into a breadboard, then connect a couple of wires to the inputs of one - but don't connect the other ends of the wires to anything.

Connect an oscilloscope to the output of the gate, then wave your hands around near the inputs. You should see the output changing states.

JRE
  • 71,321
  • 10
  • 107
  • 188
  • 3
    LS is a TTL family, isn't it? It's unlikely to switch randomly due to capacitive coupling from your body... but it just conceivably could, and that's probably why hooking up unused inputs is recommended. – The Photon Nov 06 '22 at 20:16
  • 7
    Thank you! The suggested experiment does show the output change (both on the scope and via just connecting an LED to the output) based on touching the wires or waving hands above the wires connected to the inputs. That's very interesting! I think it's more difficult to setup an experiment where this flailing output demonstrably causes issues with other ICs (I've been trying...), but I can conceptually understand how that might be, especially with a good number of such floating inputs/outputs. – CoolBots Nov 06 '22 at 20:26
  • 1
    I wouldn't call an effective pull-up resistance of on the order of 5 kΩ for "very sensitive". The value of the optional built-in pull-up resistor on the typical microcontroller is about 10 times higher. – Peter Mortensen Nov 08 '22 at 11:32
13

The answer is not that different with 74LS than 74HC logic, but somewhat different.

HC logic inputs are high impedance so they must be set to high or low. They can't be left floating unconnected, because if the voltage floats at about half supply the chip starts to consume extra supply current.

LS logic inputs are quite leaky and for most parts they tend to float high. So on many occasions, an unconnected input can work, but is obviously bad design, and any noise can make it float at logic input threshold, switching between low and high unintentionally, consuming current.

And since LS inputs tend to be high, and due to their internal structures, it can be pulled up with moderate order of 4k7 ohm pull-up resistor to keep it reliably high.

A pull down resistor would need to be much stronger, below 500 ohms, and it would waste more power to just idle low, if idling high is an option.

Justme
  • 147,557
  • 4
  • 113
  • 291
  • 1
    Why not simply connect directly to VCC or GND? (OK, GND might lead to bigger static current consumption, depending on the internal circuit.) – the busybee Nov 06 '22 at 20:23
  • 9
    @thebusybee LS answer - where the LS VCC can generally accept a 7 V abs max, its inputs get unhappy above 5.5 V. Using a large resistor to pullup means the IC can withstand a higher supply rail spike without damage than if they went stright to VCC. Every family answer - come the day you need to debug the board, or cobble in another input late in the day, you'll thank yourself that you have an input that's available to use, rather than one nailed firmly to the power plane. – Neil_UK Nov 06 '22 at 20:51