2
\$\begingroup\$

There are common configurations where, for example, a logical HIGH input (a voltage source) is connected to the input of some logic circuit through a resistor as shown there. Typically this logic circuit is represented as a diagram, without referring to a particular implementation of the logic gates.
I've never seen it specified that the gates are built in a way that we can assume no input current is drained into them. For the particular example it is a neccessary assumption, so that there is no voltage drop across the input resistor.

I undestand that most logic gates' inputs are directly connected to a base of a transistor and so drain no current, but is this a general requirement for a logic gate to be a logic gate?
Are there any logic gate implementations where input current indeed is significant?

Edit: indeed, I missed that in TTL logic the input is not connected to the base. Does this mean we cannot apply a logic input to it through a resistor?

\$\endgroup\$
9
  • \$\begingroup\$ "I undestand that most logic gates' inputs are directly connected to a base of a transistor." Well, in TTL and related families, the input is usually connected to the emitter of a transistor, not the base. \$\endgroup\$ Commented Jul 13, 2023 at 18:09
  • \$\begingroup\$ Through diodes to a base in the case of 74LSxx (and the old DTL). \$\endgroup\$ Commented Jul 13, 2023 at 18:27
  • \$\begingroup\$ There is some logic, for industrial (wired) automation there is IEC 61131-2 that specifies a minimum amount of current for improved noise immunity. \$\endgroup\$
    – Jeroen3
    Commented Jul 13, 2023 at 20:07
  • \$\begingroup\$ Resistors are usually used to protect output from shortage. For instance, the signal goes through connector. Low value is used. Sometimes it is for suppress spikes, caused by induction on long conductor. \$\endgroup\$
    – user263983
    Commented Jul 13, 2023 at 20:15
  • 3
    \$\begingroup\$ Voltage-mode logic is just one broad class of logic that is commonly used. But there's also current-mode logic -- ECL is just one example. \$\endgroup\$
    – Dave Tweed
    Commented Jul 13, 2023 at 21:07

6 Answers 6

6
\$\begingroup\$

No, there are different logic circuits with different implementations.

And even if the input would be a BJT transistor base, it would generally be an emitter follower with pull-up resistance on base.

While a CMOS input certainly draws almost no current, a TTL input does, and many other families that either have names or not, because any chip and pin, such as voltage regulator enable pin, can use any custom voltages and currents it defines in the data sheet. It may still be compatible with common logic outputs such as TTL or CMOS.

And we can have a resistor on input, as long as it has proper resistance for what it does. It depends on the logic family and what the circuit does, e.g. a simple case of pull-up resistor and pushbutton to ground on a MCU input.

For CMOS input, you could have a 100k resistor to VCC to keep input at VCC because no current flows in or out. Then pushbutton will connect to 0V when pushed. No problems there. You could also have a 100k pull-down and pushbutton to VCC, no difference. But you can't omit the resistor, as it would be an unconnected input, floating at any random voltage and receiving nearby electrical interference.

For TTL input, it's obviously more complex, because of the current flowing in or out. As long as the resistor keeps voltage at logic high at the input even if current flows, it's enough. The pushbutton will still apply 0V to input. The same is not true for pull-down. TTL input can source substantial amount of current when low, so a 100k pull-down would be useless. And because the internal structures would try to source current when pulling low, the internal structures also try to keep the input high even if there is no resistor, but one should not count on it.

\$\endgroup\$
5
  • \$\begingroup\$ What I don't get is why input through a resistor to an arbitrary logic gate is often presented in many resources \$\endgroup\$
    – Sgg8
    Commented Jul 13, 2023 at 18:50
  • \$\begingroup\$ @Sgg8 Maybe you should give an example. Perhaps you are simply looking at pushbutton to ground and pull-up resistor. Or something else. \$\endgroup\$
    – Justme
    Commented Jul 13, 2023 at 18:53
  • \$\begingroup\$ Yes. A pushbutton to ground and pull-up resistor is such an example \$\endgroup\$
    – Sgg8
    Commented Jul 13, 2023 at 18:55
  • \$\begingroup\$ @Sgg8 In the case of a pullup, note that a TTL input sources current, the switch is a low/zero resistance to ground, the pullup is mandatory for CMOS when the switch is open, and is still a good idea but often omitted with TTL. \$\endgroup\$
    – Neil_UK
    Commented Jul 13, 2023 at 18:57
  • 1
    \$\begingroup\$ Don't forget ECL \$\endgroup\$
    – D Duck
    Commented Jul 13, 2023 at 20:02
4
\$\begingroup\$

A bipolar TTL logic input will source significant current when pulled Low.

\$\endgroup\$
4
  • \$\begingroup\$ Indeed. I somehow didn't think about that. But does this mean we cannot apply a logic input to a TTL gate through a resistor? \$\endgroup\$
    – Sgg8
    Commented Jul 13, 2023 at 18:13
  • \$\begingroup\$ @Sgg8 You can if the resistance is low enough. Which can be calulated from the input voltage requirements and how much they sink or source current at those currents. \$\endgroup\$
    – Justme
    Commented Jul 13, 2023 at 18:19
  • \$\begingroup\$ And this is one of the reasons, for TTL anyway, that you generally did not tie an input to GND through a resistor. \$\endgroup\$
    – SteveSh
    Commented Jul 14, 2023 at 19:53
  • \$\begingroup\$ @Sgg8 resistor in TTL family is usually pull up resistor because TTL input draws almost no current when being pulling up. \$\endgroup\$
    – Willis Lin
    Commented Jul 14, 2023 at 23:53
3
\$\begingroup\$

Trivial case: you can make a logic circuit out of relays, which by their nature do not have negligible input current.

\$\endgroup\$
2
\$\begingroup\$

As well as the static current passed by some logic families, consider a simple inverter such as the SN74LVC1G04. In order to meet the maximum time for rise and fall (the datasheet is a bit misleading in the way they specify it) of 5ns/V with a 5V Vcc, assuming an input capacitance of 3pF you would need to source or sink a current of more than 0.6mA, which is not negligible- a resistor in the single digit KΩ would violate the limit (causing undesirable dissipation due to shoot-through currents). That's the slowest you're supposed to run the gates, not the optimal.

If you want to not degrade the ~2ns typical propagation delay much you'd need to supply more like 10mA-20mA for a short period of time, so more in the 100-200Ω range, very roughly.

\$\endgroup\$
1
\$\begingroup\$

Soviet chips frequently had the input current -1.6 mA for the logical zero (below 0.4 V) and 0.04 mA for the logical 1 (above 2.4 V), see the widespread К155ЛА3, the analog of SN7400 here for instance). This does really not look negligible. 2 mA is a common current to drive a miniature LED (source). Contra-intuitively, logical 0 was drawing more current ("pulling up"). A free-hanging input has been read as logical 1.

\$\endgroup\$
0
\$\begingroup\$

In general, all real implementations of electronic logic gates have an input current. Some very low, some quite high, some like a resistive load, some like a capacitive load, and anything in between or outside. There are many different techniques, old ones like DTL or TTL and newer ones like CMOS.

The linked example shows this schematic:

schematic

simulate this circuit – Schematic created using CircuitLab

These resistors are used to provide the respective logic level, if the SPST switch is open. You cannot replace it with a direct wire, as it will short the source of the logic level, commonly ground or supply voltage, with the other side, when the switch is closed. Such a resistor limits the current when the switch is closed.

Anyway, your question is useful. What about the voltage drop because of the input current?

As we now know, there are different techniques. You need to know the input current to design the resistor in a way that the input accepts the voltage as the desired logic level. Techniques with a very low input current get away with bigger resistors, others with a very high input current need smaller resistors.

For example, a standard TTL low-power-Schottky input has these parameters:

\$V_{CC} = 4.75 V\$ (minimum)
\$V_{IH} = 2 V\$ (minimum)
\$V_{IL} = 0.8 V\$ (maximum)
\$I_{IH} = 20 µA\$ (maximum)
\$I_{IL} = -0.4 mA\$ (maximum)

Note: the negative sign on \$I_{IL}\$ designates that current as "sourcing" from the input.

For a working pull-down, the resistor needs to generate a voltage drop of maximum 0.8 V for the maximum input current of 0.4 mA. So it has to be less than or equal to:

\$R_{PDmax} = \frac{V_{max}}{I_{max}} = \frac{V_{IL}}{-I_{IL}} = \frac{0.8 V}{0.4 mA} = 2 k\Omega\$

The lower limit is given by the current specification of the switch and your desired current consumption.

Note: As we now see, the presented circuit will not work for a LS-TTL input.

For a working pull-up, the resistor needs to generate a voltage drop of maximum 2.75 V for the maximum input current of 20 µA. So it has to be less than or equal to:

\$R_{PUmax} = \frac{V_{max}}{I_{max}} = \frac{V_{CC} - V_{IH}}{I_{IH}} = \frac{4.75 V - 2 V}{0.02 mA} = 137.5 k\Omega\$

Again, the lower limit is given by the current specification of the switch and your desired current consumption.

A look in the linked data sheet reveals a pull-up at each input, nominally \$20 k\Omega\$. This is one reason why you can omit a pull-up resistor with such TTL inputs, and why the input current \$I_{IL}\$ is so much higher than \$I_{IH}\$.

With another technique, HCMOS for example in the 74HC04, the input current is maximum \$\pm1{\mu}A\$. The calculation for the resistors is left as an exercise to the reader.

This answer omits other properties that are some times important. For example, clock inputs need a maximum rise/fall time. You need to take the capacitance on the input wire into account, inductive effects, and so on, especially in high-speed applications.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.