Gates as Electrical Parts: Levels, Fan-Out and Logic Families
Read a logic data sheet: levels, noise margins and fan-out. Then decide when two logic families can be connected.
You Will Be Able To
- Compute both noise margins between a driver and a receiver from their data sheets.
- Compute DC fan-out from output and input currents, and say why AC fan-out is often smaller.
- Say what to do with unused CMOS and TTL inputs.
- Decide whether one logic family can drive another, and which family to put between them.
- Lesson
- G9.14
- Time
- 30 min
- Runs on
- Your browser
- Check
- 5 questions
A board mixed old LS TTL parts with new HC parts on one 5 V supply. Every signal from LS to HC worked on the bench. In the cold chamber some of them read 0 when they should read 1. The data sheets had predicted it.
- I/O
- Constraint
- Structure
- LS into HC
A guaranteed LS 1 can be as low as 2.50 V. The HC input only promises to read 1 above 3.15 V. Between them the result is not defined.
- LS into HCT
HCT inputs switch at TTL levels: 1 above 2.00 V. The LS output clears that by 500 mV.
Read the diagram as text
- LS output high: at least 2.50 V
- HC input: reads 1 above 3.15 V
- HCT input: reads 1 above 2.00 V
- Undefined band: 2.50 to 3.15 V for HC
- LS output high → Undefined band: may land here
- Undefined band → HC input: not a valid 1
- LS output high → HCT input: margin 500 mV
Data sheet values: SN74LS00 at 4.75 V, SN74HC00 and SN74HCT00 at 4.5 V.
Four Levels and Two Margins
A data sheet promises four voltages. An output gives at least V_OH when high and at most V_OL when low, at a stated current. An input reads 1 above V_IH and 0 below V_IL.
| Family | Supply | V_OH min | V_OL max | V_IH min | V_IL max | Output test current |
|---|---|---|---|---|---|---|
| 74LS (TTL) | 5 V | 2.50 V | 0.50 V | 2.00 V | 0.80 V | IOH −0.4 mA, IOL 8 mA |
| 74HC (CMOS) | 4.5 V | 3.84 V | 0.33 V | 3.15 V | 1.35 V | IOH −4 mA, IOL 4 mA |
| 74HCT (CMOS, TTL inputs) | 4.5 V | 3.84 V | 0.33 V | 2.00 V | 0.80 V | IOH −4 mA, IOL 4 mA |
| 74LVC (3.3 V CMOS) | 3 V | 2.40 V | 0.40 V | 2.00 V | 0.80 V | IOH −12 mA, IOL 12 mA |
| 10EP (LVPECL) | 3.3 V | 2.23 V | 1.68 V | 2.15 V | 1.75 V | into 50 Ω to VCC − 2 V |
From the TI data sheets of the SN74LS00, SN74HC00, SN74HCT00 and SN74LVC00A, worst case. The 10EP row is the onsemi MC10EP16 at 25 °C. TI prints 2.5 V for LS V_OH; some vendors print 2.7 V.
The high noise margin is V_OH(driver) − V_IH(receiver). The low noise margin is V_IL(receiver) − V_OL(driver). Both must be positive, or some legal output is not a legal input.
DC Fan-Out from the Currents
Each input draws a current: I_IH when high and I_IL when low. An output can supply at most I_OH while keeping V_OH, and sink at most I_OL while keeping V_OL.
For LS TTL the low state is the expensive one: an LS input sources 400 µA into the driver when low. One LS output, rated for 8 mA, can hold 20 of them low.
A CMOS input draws almost nothing, at most 1 µA of leakage. By currents alone one HC output could drive thousands. The real limit is capacitance: each HCT input has up to 10 pF. The delay of the driver grows with the load, as in lesson G9.6. So the AC fan-out is set by the delay you can accept.
An HC output driving LS inputs is limited the other way: it sinks only 4 mA at its rated V_OL. The HC data sheet itself says it supports a fan-out of up to 10 LS loads.
Unused Inputs and Families
An open TTL input usually reads as 1, but it picks up noise. An open CMOS input floats near the middle of the supply, where both transistors conduct and the gate may oscillate. Tie every unused input to a rail.
| Driver | Receiver | High margin | Low margin | Works? |
|---|---|---|---|---|
| 74LS (TTL) | 74HC (CMOS) | -650 mV | 850 mV | no |
| 74LS (TTL) | 74HCT (CMOS, TTL inputs) | 500 mV | 300 mV | yes |
| 74HC (CMOS) | 74LS (TTL) | 1840 mV | 470 mV | yes |
| 74LVC (3.3 V CMOS) | 74HC (CMOS) | -750 mV | 950 mV | no |
| 74HC (CMOS) | 74LVC (3.3 V CMOS) | 1840 mV | 470 mV | yes: LVC inputs tolerate 5.5 V |
| 10EP (LVPECL) | 74LVC (3.3 V CMOS) | 230 mV | -880 mV | no |
Computed from the table above. Margins in millivolts; a negative margin means some legal output is not a legal input.
HCT is the classic bridge: CMOS outputs that swing to the rails, with inputs at TTL thresholds. 3.3 V LVC parts can take 5 V signals because their inputs tolerate 5.5 V. Their 1 is too low for an HC input, though.
ECL, emitter-coupled logic, is a separate world. Its transistors never saturate and draw a constant current, so it is fast and quiet on the supply. The levels sit near the top of the supply, less than a volt apart. For the 3.3 V form, LVPECL, they are 2.23 V and 1.68 V. An LVPECL 0 is far above a CMOS input's V_IL, so a translator is needed.
Asked in interviews
What is a noise margin?
The gap between what a driver guarantees and what a receiver needs. High margin = V_OH(min) − V_IH(min); low margin = V_IL(max) − V_OL(max). Both must be positive.
How do you compute fan-out?
DC fan-out is the smaller of I_OH / I_IH and I_OL / I_IL. For CMOS loads the input current is tiny. Fan-out is then limited by the capacitance the driver can switch in time.
Why can a TTL output not drive an HC input reliably?
An LS high level is only guaranteed above 2.5 V, while an HC input at 4.5 V needs 3.15 V. HCT inputs with TTL thresholds, or a level shifter, fix it.
Try It
The first line is LS driving LS: both margins are positive and the fan-out is 20.
HC driving HC has large margins, and the DC fan-out of 4000 only says that the input currents do not matter.
Add a line check("LS->HC", LS, HC); and run it. The high margin turns negative.
LS->LS NMH=500 NML=300 fanout=20 HC->HC NMH=690 NML=1020 fanout=4000 LS->HCT NMH=500 NML=300 fanout=400Check Yourself
Common Mistakes
Wrong Connect a 5 V TTL output to a 5 V HC input because both are "5 V logic".
An LS output is only guaranteed 2.50 V when high. An HC input at 4.5 V needs 3.15 V. The high margin is -650 mV: negative.
Fix Use an HCT part, whose inputs have TTL thresholds, or a level shifter.
Wrong Compute fan-out from the high state only.
An LS output can hold 20 LS inputs high and 20 low here. With other families the two numbers differ, and the smaller one counts.
Fix Compute both IOH / IIH and IOL / IIL, and take the smaller.
Wrong Leave unused CMOS inputs open.
A floating CMOS input drifts to the middle of the supply, where both transistors conduct. The HCT data sheet says every unused input must be held at VCC or GND.
Fix Tie unused inputs to a rail, directly or through a resistor, or to a used input of the same gate.
Wrong Treat a CMOS input that sits at a TTL high level as free.
At 2.4 V the input transistors are both partly on. The HCT data sheet allows 2.9 mA of extra supply current for each such input.
Fix Drive CMOS inputs close to the rails where power matters, or accept the extra current in the budget.
Remember
- Noise margins: V_OH − V_IH and V_IL − V_OL, both from worst-case data sheet values. Both must be positive.
- DC fan-out: the smaller of I_OH / I_IH and I_OL / I_IL.
- CMOS loads draw almost no current; their capacitance limits fan-out through delay.
- Never leave CMOS inputs open.
- TTL into HC fails on the high level; HCT bridges TTL and CMOS. LVC tolerates 5 V inputs.