Electrical Engineering › Section X · Processors and integrated circuit technologies › Topic X.5

CMOS circuits

Almost every digital chip made today, from a microcontroller to a phone processor, is built from CMOS gates. Pairing n-channel and p-channel MOSFETs so that one is always off is what lets billions of transistors run on so little power.

Why CMOS won

CMOS stands for complementary metal-oxide semiconductor: every gate uses both n-channel and p-channel enhancement MOSFETs, arranged so that in either steady output state one path is switched off. A CMOS gate therefore draws almost no current from the supply except while it switches, which is why its power depends on frequency, as the topic IC operating characteristics and parameters showed. Low static power, wide supply ranges and transistors that shrink well with each new process have made CMOS the technology of nearly all digital chips. This topic treats each MOSFET as a voltage-controlled switch; its physics is in Insulated-gate FETs (MOSFETs) and IGBTs.

The MOSFET as a switch

A MOSFET's gate is insulated from its source and drain by a thin oxide layer, so no steady current flows into it. An n-channel MOSFET (nMOS) turns on when its gate is more positive than its source by more than a threshold voltage \(V_{th}\), typically a few tenths of a volt up to about 1 V depending on the process. On, it is a small resistance between drain and source; off, it is effectively open. A p-channel MOSFET (pMOS) works the opposite way: it turns on when its gate is sufficiently below its source. In logic, nMOS sources go to ground and pMOS sources to \(V_{DD}\), so a HIGH gate turns nMOS on and pMOS off, and a LOW gate does the reverse.

The CMOS inverter

The inverter is one pMOS and one nMOS in series between \(V_{DD}\) and ground, with their gates joined as the input and their drains joined as the output. With the input HIGH, the nMOS is on and the pMOS off, so the output connects to ground: LOW. With the input LOW, the pMOS is on and the nMOS off, so the output connects to \(V_{DD}\): HIGH. Either way one transistor is off, so no steady current flows from supply to ground, and the output swings almost rail to rail. Current flows only while switching: mainly to charge or discharge the load capacitance, plus a brief spike while both transistors are partly on.

Worked example: where gate delay comes from

Model an inverter's output as a switch with an on-resistance driving the total load capacitance of the wiring and the inputs it feeds. Take \(R_{on} = 500\,\Omega\) for the pMOS and 20 pF of load, and let the input fall so the pMOS turns on. 1. The pMOS charges the load from 0 V towards \(V_{DD}\) with time constant \(\tau = R_{on}C\). 2. \(\tau = 500 \times 20 \times 10^{-12} = 10\,\text{ns}\). 3. The output reaches 50% of \(V_{DD}\) when \(e^{-t/\tau} = 0.5\), at \(t = \tau \ln 2\), about 6.9 ns. 4. Propagation delay is measured at that 50% crossing, so \(t_{PLH}\) is roughly 7 ns. Check: 40 pF of load would double it, which is why CMOS fan-out is limited by speed.

The CMOS NAND gate

A 2-input NAND gate uses four transistors. The pull-up network is two pMOS in parallel from \(V_{DD}\) to the output; the pull-down network is two nMOS in series from the output to ground. Input A drives one transistor of each type, and input B the other pair. If either input is LOW, its pMOS is on and connects the output to \(V_{DD}\), while its nMOS is off and breaks the series path to ground: the output is HIGH. Only when both inputs are HIGH are both nMOS on, completing the path to ground, while both pMOS are off: the output is LOW. That is exactly \(X = \overline{AB}\).

The CMOS NOR gate

A 2-input NOR gate swaps the arrangement: two pMOS in series from \(V_{DD}\) to the output, and two nMOS in parallel from the output to ground. If either input is HIGH, its nMOS connects the output to ground and its pMOS breaks the series pull-up, so the output is LOW. Only when both inputs are LOW are both pMOS on and both nMOS off, pulling the output HIGH: \(X = \overline{A + B}\). The general rule is duality: where the pull-down network has transistors in series, the pull-up has them in parallel, and the reverse. Because pMOS transistors conduct less well than nMOS of the same size, stacked pMOS are slow, so designers usually prefer NAND to NOR.

Worked example: designing a complex gate

Build \(X = \overline{AB + C}\) in one CMOS stage. 1. The pull-down network must conduct exactly when \(AB + C = 1\): nMOS A and B in series (the AND), with nMOS C in parallel with that pair (the OR). 2. The pull-up network is the dual: pMOS A and B in parallel, in series with pMOS C. 3. Count: six transistors, against ten for a separate AND (NAND plus inverter, 6) feeding a NOR (4). 4. Check A = 1, B = 1, C = 0: the A-B nMOS path conducts, and the parallel A-B pMOS pair is off, so X = 0. 5. Check A = 1, B = 0, C = 0: no pull-down path, and pMOS B and C are both on, so X = 1, as \(\overline{0 + 0} = 1\) requires.

Open-drain and tri-state outputs

An open-drain output keeps only the nMOS pull-down; the drain is brought out and an external pull-up resistor to the supply makes the HIGH. Several open-drain outputs can share one line, which is LOW if any output pulls it LOW, and the pull-up can go to a different supply voltage from the chip's, within the pin's rated maximum. The I²C bus uses this arrangement. The pull-up is a compromise: on 3.3 V, with an output rated to sink 3 mA at 0.4 V, \(R \ge (3.3 - 0.4) \div 3\,\text{mA}\), about 967 Ω, so 1 kΩ suits, while much larger values give slow rising edges. A tri-state output adds an enable input that can turn both output transistors off at once, giving a high-impedance state for shared buses.

Handling CMOS safely

The gate oxide is only nanometres thick, so electrostatic discharge (ESD) from a person or tool can puncture it, even though chips include protection diodes on their pins. Handle CMOS parts on a grounded mat with a grounded wrist strap, whose built-in series resistor of about 1 MΩ protects the wearer, store them in antistatic packaging, and never insert or remove chips with the power on. Tie every unused input to \(V_{DD}\) or ground, directly or through a resistor, as the logic requires. A floating input picks up charge and can drift to a level between LOW and HIGH, turning both transistors partly on, which wastes current and can make the output oscillate.

Common mistakes to avoid

First, putting the pMOS at the bottom: pMOS transistors pull up from \(V_{DD}\) and nMOS pull down to ground. Second, drawing the pull-up network the same as the pull-down: one must be the series-parallel dual of the other. Third, thinking CMOS gates draw steady current in a fixed state: apart from leakage they draw current only while switching. Fourth, forgetting the pull-up resistor on an open-drain output, which then can never go HIGH. Fifth, enabling two tri-state outputs on one line at once.

Key takeaways

CMOS uses complementary nMOS and pMOS enhancement MOSFETs as switches: a HIGH gate turns nMOS on and pMOS off. The inverter is a pMOS pull-up over an nMOS pull-down; one is always off, so static current is almost zero. NAND has parallel pMOS and series nMOS; NOR has series pMOS and parallel nMOS; any complex gate uses dual networks, as in a six-transistor AND-OR-invert. Gate delay comes from on-resistance charging load capacitance, about 0.69 R_on C to the 50% point. Open-drain outputs need pull-up resistors; tri-state outputs can float. Guard against ESD and never leave inputs floating.

Flashcards

Flashcard

CMOS

Complementary metal-oxide semiconductor: logic built from nMOS and pMOS pairs

One network is always off in a steady state.

Test your understanding

Question 1 of 5

Both inputs of a 2-input CMOS NAND gate are HIGH. Which statement describes the transistors?

Question 2 of 5

How are the transistors arranged in a 2-input CMOS NOR gate?

Question 3 of 5

A CMOS gate's pull-down network is nMOS A in series with the parallel pair nMOS B and nMOS C. What function does the gate produce?

Question 4 of 5

An inverter output with 1 kΩ on-resistance charges 15 pF of load. About how long does it take to reach 50% of V_DD?

Question 5 of 5

Why must an unused input on a CMOS gate never be left unconnected?

← Previous topicNext topic →