Digital Integrated Circuits
Open in the Padhaiko app8.1 BJT and MOSFET switching circuits
Logic gates work by using a transistor as a fast switch: OFF means logic HIGH (output pulled up) or LOW and ON the opposite, depending on the circuit.
BJT as a switch
An NPN transistor in common-emitter connection with a collector resistor to is an inverter.
- Cut-off (switch OFF): V, , , so (output HIGH).
- Saturation (switch ON): enough base current drives V (output LOW). The condition is , where . A base current larger than this minimum (an overdrive factor of about 2) makes sure of saturation, but deep saturation slows the turn-off because of stored base charge.
MOSFET as a switch
An n-channel enhancement MOSFET conducts when is above the threshold voltage (about 1 to 2 V). With it is OFF; with it is ON with a small resistance . It needs no gate current in the steady state, which gives very low power. A p-channel device conducts when its gate is below the source by more than .
| Feature | BJT | MOSFET |
|---|---|---|
| Control | Base current | Gate voltage |
| Input resistance | Low | Extremely high |
| Switching speed | Fast, but storage delay | Fast, limited by gate capacitance |
| Static power | Higher | Almost zero (CMOS) |
| Packing density | Lower | Very high |
8.2 TTL parameters
TTL (transistor-transistor logic) is the bipolar family; the standard series is 74xx with V. The main parameters are:
| Parameter | Symbol | Value |
|---|---|---|
| High-level input voltage (min) | 2.0 V | |
| Low-level input voltage (max) | 0.8 V | |
| High-level output voltage (min) | 2.4 V | |
| Low-level output voltage (max) | 0.4 V | |
| High-level input current (max) | 40 A | |
| Low-level input current (max) | 1.6 mA (flows out of the input) | |
| High-level output current (max) | 0.4 mA | |
| Low-level output current (max) | 16 mA | |
| Propagation delay | about 10 ns per gate | |
| Power dissipation | about 10 mW per gate |
- Noise margin: V and V.
- Fan-out: the number of gate inputs one output can drive: .
- Speed-power product: pJ.
- Unused inputs: an unconnected TTL input floats to HIGH; it should be tied to through a resistor (or to another input) to avoid noise pickup.
8.3 TTL circuits: NAND, NOT, NOR
TTL NAND gate. The input stage is a multi-emitter transistor (one emitter for each input), the phase splitter gives two opposite signals, and the totem-pole output has (pull-down) and with a diode (pull-up). If any input is LOW, conducts and takes the base current away from , so and are OFF and is ON: the output is HIGH. If all inputs are HIGH, works in the reverse mode and drives and into saturation; is OFF and the output is LOW. This is the NAND function. The totem pole gives a fast, strong pull-up and pull-down with low output resistance.
TTL NOT gate is the same circuit with a single emitter in : HIGH in gives LOW out.
TTL NOR gate: the phase splitter is duplicated, with one input transistor pair for each input and their collectors and emitters joined in parallel; if either input is HIGH its splitter transistor conducts, drives the pull-down transistor and gives LOW at the output. Both inputs LOW give HIGH.
Open-collector outputs omit the pull-up, so an external resistor is needed. Several open-collector outputs can be tied together (wired-AND) and used to drive lamps or relays.
8.4 CMOS parameters
CMOS (complementary MOS) uses one p-channel and one n-channel MOSFET in each stage; one transistor is always OFF in a steady state, so almost no current flows from supply to ground.
| Parameter | Standard TTL (74) | CMOS (4000B / 74HC) |
|---|---|---|
| Supply voltage | 5 V (4.75 to 5.25) | 3 to 15 V (4000B), 2 to 6 V (74HC) |
| Static power per gate | about 10 mW | a few nW |
| Propagation delay | about 10 ns | 4000B: about 50 ns at 5 V; 74HC: about 8 ns |
| Noise margin | 0.4 V | about 30 percent of (1.5 V at 5 V) |
| Fan-out | 10 | above 50 (very high input resistance) |
| Input | Draws current | Gate draws almost no current; needs protection against static |
| Output swing | 0.2 to 3.4 V | Almost full rail (0 to ) |
Dynamic power: a CMOS gate uses power only when it switches, charging and discharging its load capacitance: . Power therefore rises with frequency. Unused CMOS inputs must be tied to or ground (never left floating), because the gate can oscillate or the transistors can both conduct.
8.5 CMOS logic circuits: NAND, NOR, NOT
CMOS NOT: a PMOS (to ) and an NMOS (to ground) with joined gates and drains. Input HIGH turns the NMOS ON and the PMOS OFF, so the output is LOW; input LOW gives output HIGH.
CMOS NAND (2 inputs): two PMOS transistors in parallel to and two NMOS transistors in series to ground. The output is LOW only if both NMOS are ON (both inputs HIGH).
CMOS NOR (2 inputs): two PMOS in series and two NMOS in parallel. The output is HIGH only if both PMOS are ON (both inputs LOW).
| Gate | Pull-up network (PMOS) | Pull-down network (NMOS) | Transistors |
|---|---|---|---|
| NOT | One PMOS | One NMOS | 2 |
| 2-input NAND | Two in parallel | Two in series | 4 |
| 2-input NOR | Two in series | Two in parallel | 4 |
The pull-up network is always the dual of the pull-down network, so exactly one of them conducts for every input.
8.6 Three-state TTL devices
A three-state (tri-state) gate has an extra enable input. When enabled it outputs a normal HIGH or LOW; when disabled the output goes to a high-impedance (Hi-Z) third state, as if disconnected. Several tri-state outputs can therefore share one bus, provided that only one is enabled at a time, which avoids the conflict (a short circuit) that two ordinary totem-pole outputs would cause.
| Enable E | Input A | Output Y |
|---|---|---|
| 0 | 0 | Hi-Z |
| 0 | 1 | Hi-Z |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Examples are the bus buffers 74LS244/245 and the tri-state registers 74LS373/374, used on microprocessor data buses.
8.7 Digital devices applications
8.7.1 Multiplexing displays
To drive seven-segment digits without lines, the same segment lines are shared by all digits, and the digits are switched ON one at a time by a digit-select (common) line. Each digit is lit for a fraction of the time. If the refresh rate is above about 50 to 60 Hz per digit the eye sees all digits as lit steadily (persistence of vision). Because the duty cycle is , the peak segment current must be times the wanted average current.
8.7.2 Frequency counters
A frequency counter counts input pulses during a precise gate time (derived from a crystal oscillator and divider chain). A gate opens an AND gate for ; a decade counter and latch/display show the count . Then . The resolution is : a longer gate gives more digits.
8.7.3 Time measurements
To measure a time interval (or the period of a signal), the roles are swapped: the unknown interval opens the gate and a known clock of frequency is counted. Then , with a resolution of one clock period . A period measurement is more accurate than a frequency measurement for low frequencies.
Worked Examples
1
A TTL NAND gate is used to drive other TTL gate inputs. Using mA, mA, mA and A, find the fan-out, and the noise margins for V, V, V, V. If the supply current is 4 mA when the output is HIGH and 12 mA when LOW, find the average power at V.
Fan-out. In the LOW state the gate can sink 16 mA, and each load input supplies 1.6 mA: . In the HIGH state the gate can source 400 A and each input needs 40 A: . The fan-out is the smaller of the two: 10.
Noise margins. HIGH: V. LOW: V.
Power. The average supply current is mA (the output is HIGH half the time), so mW.
Fan-out 10; V; average power 40 mW.
2
A BJT inverter has V, , , V and V. Find so that the transistor saturates with an overdrive factor of 2 when the input is 5 V.
Collector saturation current. mA.
Minimum base current. A. With an overdrive factor of 2, A.
Base resistor. . A standard value of 22 k gives A, still above the minimum, so saturation is certain.
k (use 22 k).
3
(a) A 4-digit multiplexed display needs an average segment current of 10 mA. Find the peak current and the time each digit is lit if the whole display is refreshed at 1 kHz. (b) A frequency counter counts 12345 pulses in a gate time of 10 ms. Find the frequency. (c) The period of a signal is measured by counting a 1 MHz clock during one period and the count is 500. Find the period and frequency.
(a) Multiplexed display. With 4 digits each is on for of the time, so the peak current for the same average brightness is mA. A 1 kHz refresh gives a cycle of 1 ms, so each digit is lit for s.
(b) Frequency counter. Hz, about 1.2345 MHz. The resolution is Hz.
(c) Period measurement. s, so kHz. The resolution is one clock period, 1 s.
(a) 40 mA peak, 250 s per digit; (b) 1.2345 MHz; (c) s, kHz.
Exercises
Exercises: Digital Integrated Circuits
Draw (describe) the CMOS 2-input NAND gate, give its pull-up and pull-down networks, and show from the truth table that it implements .
Pull-up: two PMOS transistors in parallel between and the output (gates and ). Pull-down: two NMOS transistors in series between the output and ground (gates and ).
A PMOS conducts when its gate is LOW and an NMOS when its gate is HIGH. For at least one PMOS is ON and the series NMOS path is broken, so . For both NMOS are ON, both PMOS are OFF, so . This is .
with parallel PMOS pull-up and series NMOS pull-down (4 transistors).
Compare TTL and CMOS logic families on supply, power, speed, noise margin and fan-out.
TTL uses 5 V only and about 10 mW per gate, with a delay of about 10 ns, noise margins of 0.4 V and a fan-out of 10. CMOS (4000 series) works from 3 to 15 V, uses nanowatts statically (power grows with frequency), is slower in the 4000 series (about 50 ns) but fast in 74HC, has a noise margin of about 30 percent of and a very high fan-out because its gates draw almost no input current.
TTL: bipolar, 5 V, high static power, fast, FO = 10, 0.4 V margin. CMOS: MOSFET, wide supply, very low static power, high fan-out, better noise margin, needs static protection.
A CMOS gate with pF, V is switched at 1 MHz. Find its dynamic power. What is it at 10 MHz?
mW at 1 MHz.
The power is proportional to the frequency, so at 10 MHz it is 12.5 mW.
1.25 mW at 1 MHz and 12.5 mW at 10 MHz.
Explain the three-state buffer and why it is needed on a bus. Complete the output when four tri-state buffers drive one line and only buffer 3 is enabled with input 1.
A tri-state buffer has outputs HIGH, LOW and Hi-Z (disabled). On a shared bus only one source may drive the line at a time; all other buffers must be disabled and present a high impedance, so they do not load the line or fight it.
With buffer 3 enabled and input 1, the bus line is 1 (the other three buffers are Hi-Z and do not affect it).
The bus carries logic 1 from buffer 3; the other buffers are in the high-impedance state.
A frequency counter has a gate time of 1 s and a decade counter of 4 digits. What is the largest frequency it can show without overflow, and what is the resolution? If the gate is changed to 0.1 s, what count is shown for an input of 7.5 kHz?
A 4-digit counter shows counts up to . With s, the count equals the frequency in hertz, so the largest frequency is 9999 Hz and the resolution is Hz.
With s the count for 7.5 kHz is , so the display reads 0750 and the resolution becomes 10 Hz.
9999 Hz maximum with 1 Hz resolution; for 7.5 kHz and a 0.1 s gate the count is 750 (resolution 10 Hz).