EE Primers · Communication interfaces · Driver Topologies · 1 of 9

Push-pull outputs: two switches, one wire

A push-pull output has an active device to each rail. One connects the pin to VDD, the other to ground, and the input decides which is on. Both edges are driven hard, the output never fights a resistor, and the circuit draws almost nothing when it is not switching. The same property makes it dangerous on a shared wire: two push-pull outputs disagreeing form a near-short from VDD to ground. This page builds the output from the transistor up: on-resistance, levels and noise margins, edge time, where the power goes, what happens on a long trace, ground bounce, contention and back-powering.

How it works, step by step

  1. Two switches, one pin. A PMOS connects the pin to VDD and an NMOS connects it to ground. Both gates share the input, so in steady state exactly one of them is on.
  2. The load is a capacitor. The trace, connector and receiver input add up to a few picofarads to ground. Driving high means filling that capacitor with charge from VDD; driving low means emptying it to ground.
  3. The on switch is a resistor. A fully-on MOSFET with little voltage across it behaves as a resistance Ron of tens of ohms. The pin therefore charges like an RC: 30 Ω into 10 pF is a 0.3 ns time constant.
  4. Both edges are driven. The rise comes through the PMOS and the fall through the NMOS. Neither edge waits on a passive resistor, so both are fast and roughly symmetric.
  5. No current when it is still. Once the pin settles, the off transistor blocks the only path between the rails. A held level draws only leakage.
  6. Power is paid per edge. Each rising edge takes C·VDD2 from the supply: half is stored on the load, half heats the PMOS, and the stored half is dumped into the NMOS on the next fall. Average power is C·VDD2·f, plus a brief crowbar current while both devices conduct mid-transition.
  7. Strength is also the hazard. The low impedance that makes clean edges reflects waves on a long trace and moves the ground when many pins switch at once. Two push-pull outputs driving opposite levels on one wire put two Ron in series across the supply: tens of milliamps.
01 · Intuition

Two switches that take turns

Strip the output stage to its essence and it is two switches stacked between the rails with the pin in the middle. Close the top one and the pin is connected to VDD; close the bottom one and it is connected to ground. In CMOS the top switch is a PMOS transistor and the bottom one an NMOS transistor, and both gates are tied to the same input. A low input turns the PMOS on and the NMOS off; a high input does the opposite. That is a CMOS inverter, and every CMOS output pin is one, usually preceded by a chain of progressively larger inverters (the pre-driver) so that the small internal logic can switch the large output transistors quickly.

Whatever is connected to the pin (trace, connector, the input capacitance of the receiver) behaves electrically like a capacitor to ground. Switching the output means filling that capacitor with charge from VDD through the PMOS, or emptying it to ground through the NMOS. Click the states below and follow the current.

Amber: where current flows. In either steady state one transistor is fully off, so no current flows from VDD to ground. During the transition both conduct briefly.
What "push-pull" means

The output pushes current into the load (sourcing, through the top device) and pulls current out of it (sinking, through the bottom device). Both directions are active and comparably strong.

What "totem pole" means

The older bipolar name: in TTL the two NPN transistors are stacked one above the other like a totem pole. Today the term is used loosely for any two-transistor push-pull stage.

Where you find it

Every default GPIO output, SPI SCLK/MOSI/CS, UART TX, logic gates and buffers, MOSFET gate drivers, the PWM pin driving a buck controller. Anything with exactly one driver per wire.

02 · The transistor as a resistor

On-resistance and drive strength

A fully-on MOSFET with a small drain-source voltage is in its triode (linear) region, where the square-law model gives

$$I_{\text{D}}=\mu C_{\text{ox}}(W/L)[(V_{\text{GS}}-V_{\text{T}})V_{\text{DS}}-V_{\text{DS}}^{2}/2]$$

For \(V_{\text{DS}}\ll V_{\text{GS}}-V_{\text{T}}\) the quadratic term vanishes and the device is a resistor:

$$R_{\text{on}}=\partial V_{\text{DS}}/\partial I_{\text{D}}\approx 1/[\mu C_{\text{ox}}(W/L)(V_{\text{GS}}-V_{\text{T}})]$$

Worked example. An NMOS with \(\mu _{\text{n}}C_{\text{ox}}=300\ \text{µA}/\text{V}^{2}\), \(W/L=40\), \(V_{\text{GS}}=3.3\ \text{V}\) and \(V_{\text{T}}=0.6\ \text{V}\):

$$R_{\text{on}}=1/(300\ \text{µA}/\text{V}^{2}\times 40\times 2.7\ \text{V})=1/32.4\ \text{mS}\approx 31\ \Omega$$

Three consequences follow directly from the formula.

  • PMOS must be wider. Hole mobility is roughly 2–3 times lower than electron mobility, so for equal rise and fall strength the PMOS is made 2–3 times wider. A pin whose datasheet shows equal IOH and IOL has paid for that in silicon area.
  • Ron rises at low supply. At 1.8 V the overdrive is 1.2 V instead of 2.7 V, so the same transistor is 2.25 times weaker. The same pin has a slower edge at 1.8 V than at 3.3 V.
  • Ron rises with temperature. Mobility falls roughly as T−1.5; expect 30–50 % more resistance at 125 °C than at 25 °C. Worst-case timing is hot, slow-process, low-voltage.

Reading drive strength from a datasheet

Datasheets do not quote Ron. They give a guaranteed output level at a test current, for example "\(V_{\text{OL}}\le 0.4\ \text{V}\) at \(I_{\text{OL}}=8\ \text{mA}\)" and "\(V_{\text{OH}}\ge V_{\text{DD}}-0.4\ \text{V}\) at \(I_{\text{OH}}=-8\ \text{mA}\)". Dividing gives the worst-case output resistance:

$$R_{\text{out},\max}=\Delta V/I=0.4\ \text{V}/8\ \text{mA}=50\ \Omega \qquad (\text{typical is often half of this})$$

Many FPGAs and SoCs let firmware choose the drive strength (2, 4, 8, 12, 16 mA). Each setting switches in more parallel output fingers, so the "mA" number is really a resistance selection: \(2\ \text{mA}\approx 200\ \Omega\), \(4\ \text{mA}\approx 100\ \Omega\), \(8\ \text{mA}\approx 50\ \Omega\), \(12\ \text{mA}\approx 33\ \Omega\), \(16\ \text{mA}\approx 25\ \Omega\) (worst case, at 3.3 V). The current it will actually deliver into a capacitor is much larger than the label; the label is the current at which the output level is still guaranteed.

Not a current limitAn "8 mA" output shorted to the opposite rail will happily pass 50–100 mA. The rating is a test condition for VOH/VOL, not a protection feature. The absolute-maximum pin current (often ±20–25 mA for MCUs) is a separate, lower number you must not exceed.
03 · Static levels

Output levels, input thresholds and noise margin

With a DC load current I the output sits away from the rail by the drop across the on-device:

$$V_{\text{OH}}=V_{\text{DD}}-I_{\text{OH}}\cdot R_{\text{p}}\qquad V_{\text{OL}}=I_{\text{OL}}\cdot R_{\text{n}}$$

A CMOS input draws essentially no DC current (picoamps of gate leakage plus the microamps of its ESD diodes), so between two CMOS chips the output reaches the rails. The receiver decides 0 or 1 by comparing against its input thresholds, VIL (highest voltage guaranteed read as 0) and VIH (lowest voltage guaranteed read as 1). Between them is the undefined region. The noise margins are how much noise can be added before a correct output is misread:

$$NM_{\text{H}}=V_{\text{OH},\min}-V_{\text{IH},\min}\qquad NM_{\text{L}}=V_{\text{IL},\max}-V_{\text{OL},\max}$$
Family (JEDEC)VDDVIL maxVIH minVOL max (load)VOH min (load)NML / NMH
LVTTL / LVCMOS 3.3 V (JESD8C)3.3 V0.8 V2.0 V0.4 V (2 mA)2.4 V (−2 mA)0.4 / 0.4 V
LVCMOS 3.3 V, light load3.3 V0.8 V2.0 V0.2 V (100 µA)3.1 V (−100 µA)0.6 / 1.1 V
LVCMOS 2.5 V (JESD8-5)2.5 V0.7 V1.7 V0.4 V (2 mA)2.0 V (−2 mA)0.3 / 0.3 V
LVCMOS 1.8 V (JESD8-7)1.8 V\(0.35\cdot V_{\text{DD}}=0.63\ \text{V}\)\(0.65\cdot V_{\text{DD}}=1.17\ \text{V}\)0.45 V (2 mA)VDD − 0.45 V0.18 / 0.18 V
Mixed railsA 1.8 V output \((V_{\text{OH}}\approx 1.8\ \text{V})\) into a 3.3 V LVCMOS input \((V_{\text{IH}}=2.0\ \text{V})\) is never read as a 1. A 3.3 V output into a 1.8 V input forward-biases the input's upper ESD diode and pushes current into the 1.8 V rail. Push-pull signals need a level translator whenever the two ends are on different rails, unless one side is explicitly specified as tolerant.
04 · Edges

Edge time: an RC, then a current source

If the trace is short enough to be one node (see Transmission Lines for Interfaces), the rising output is VDD charging the load capacitance CL through Rp. Kirchhoff's current law at the pin, \(C_{\text{L}}\,dv/dt=(V_{\text{DD}}-v)/R_{\text{p}}\), gives

$$v(t)=V_{\text{DD}}(1-\text{e}^{-t/\tau}),\quad \tau =R_{\text{p}}C_{\text{L}}$$

The time to cross any fraction k of the swing is \(t=-\tau \,\ln (1-k)\), so

$$t_{10\text{–}90}=\tau (\ln 0.9-\ln 0.1)=\tau \,\ln 9=2.197\,\tau \qquad t_{50\%}=0.693\,\tau$$

Worked example. An 8 mA pin (typical \(R_{\text{p}}\approx 30\ \Omega\)) driving 5 pF of its own pad, 3 pF of trace (≈ 2 pF per inch) and a 5 pF receiver input: \(C_{\text{L}}=13\ \text{pF}\), \(\tau =0.39\ \text{ns}\), \(t_{10\text{–}90}=0.86\ \text{ns}\). That edge has spectral content to \(0.35/0.86\ \text{ns}\approx 400\ \text{MHz}\), regardless of whether the signal is a 1 MHz SPI clock.

Why real edges look straighter than an RC

The resistor model holds only when VDS is small. At the start of a rising edge the PMOS has the full VDD across it and is in saturation, delivering a roughly constant current \(I_{\text{sat}}=\tfrac{1}{2}\mu C_{\text{ox}}(W/L)(V_{\text{GS}}-V_{\text{T}})^{2}\). A constant current into a capacitor makes a straight ramp, \(dv/dt=I_{\text{sat}}/C_{\text{L}}\). Only for the last part of the swing, once \(V_{\text{DS}}\lt V_{\text{GS}}-V_{\text{T}}\), does it become exponential. Because the saturation current, Vov/(2Ron) in square-law terms, is about half the VDD/Ron the RC model assumes at the start, the real edge is both straighter and a little slower than the RC estimate. The plot below shows both models. Many I/O cells add deliberate slew-rate control: the output fingers are switched on one after another (or the pre-driver is made weak) so the ramp is slower than the transistors allow, trading speed for lower ringing, crosstalk and EMI.

Rule of thumbFor a single load near the driver, \(t_{\text{r}}\approx 2.2\,R_{\text{out}}C_{\text{L}}\), and up to about 1.3× that once the transistor's saturation is included (see the plot). Doubling the drive strength halves the edge time; doubling the fan-out doubles it. To toggle cleanly, each half-period should be at least about 3τ–5τ so the output reaches 95–99 % of the rail.
05 · Power

Where the power goes: CV²f and the crowbar

Dynamic power from first principles

During a rising edge the supply delivers charge \(Q=C_{\text{L}}V_{\text{DD}}\) at a constant voltage VDD, so the energy drawn from the supply is

$$E_{\text{supply}}=Q\cdot V_{\text{DD}}=C_{\text{L}}V_{\text{DD}}^{2}$$

Only half ends up in the capacitor \((E_{\text{C}}=\tfrac{1}{2}C_{\text{L}}V_{\text{DD}}^{2})\). The other half is dissipated in the PMOS, and this is true for any value of Rp: integrate i²R over the exponential and R cancels. On the falling edge the stored half is dumped into the NMOS. So every full cycle (one rise, one fall) costs CLVDD², and with a fraction α of cycles containing a rising edge,

$$P_{\text{dyn}}=\alpha \,C_{\text{L}}\,V_{\text{DD}}^{2}\,f\qquad (\text{clock at}\ f:\,\alpha =1;\ \text{random NRZ data at bit rate}\ f:\,\alpha =0.25)$$

Worked example. A 25 MHz clock at 3.3 V into 20 pF: \(P=20\ \text{pF}\times 10.9\ \text{V}^{2}\times 25\ \text{MHz}=5.4\ \text{mW}\), or 1.65 mA average from the I/O supply. Thirty-two data lines switching randomly at 100 Mbit/s (\(\alpha =0.25\) per bit) into 10 pF each draw \(32\times 0.25\times 10\ \text{pF}\times 10.9\times 100\ \text{MHz}=87\ \text{mW}\). The drive strength does not appear: a stronger driver delivers the same energy faster, in a taller current spike.

Short-circuit (crowbar) current

While the input to the output stage is between VTn and VDD − |VTp|, both transistors conduct and current flows straight through. For an input ramp of duration τin repeated with period T, Veendrick's estimate for a symmetric inverter is

$$P_{\text{sc}}=(\beta /12)(V_{\text{DD}}-2V_{\text{T}})^{3}\,(\tau _{\text{in}}/T)$$

With \(\beta =2\ \text{mA}/\text{V}^{2}\), \(V_{\text{DD}}=3.3\ \text{V}\), \(V_{\text{T}}=0.6\ \text{V}\), \(\tau _{\text{in}}=1\ \text{ns}\) and \(T=40\ \text{ns}\): \((2\ \text{mA}/12)\times 9.26\ \text{V}^{3}\times 0.025=39\ \text{µW}\), about 1 % of the dynamic power above. Pre-drivers are designed to turn the conducting device off slightly before the other turns on (break-before-make), so this term stays small.

It becomes large when the input is slow or floating. An input resting at mid-rail holds both devices on continuously: \(I\approx \tfrac{1}{2}\beta (V_{\text{DD}}/2-V_{\text{T}})^{2}=1\ \text{mA}/\text{V}^{2}\times (1.05\ \text{V})^{2}\approx 1.1\ \text{mA}\), forever, per input. That is why unused CMOS inputs must be tied to a rail and why a 1 µs edge from an RC filter into a plain CMOS input both wastes power and can oscillate as noise moves it back and forth across the threshold. Use a Schmitt-trigger input for slow edges.

Floating inputsThe usual cause of a board drawing a few milliamps more than predicted in sleep: an input left floating, or connected to a tri-stated bus with no pull resistor. See Tri-State.
06 · Long traces

When the wire is a transmission line

When the round-trip delay of the trace is comparable to the edge, the driver does not see CL; it sees the line's characteristic impedance Z0. The first step launched onto the line is set by a voltage divider between Rout and Z0:

$$V_{\text{launch}}=V_{\text{DD}}\cdot Z_{0}/(R_{\text{out}}+Z_{0})$$

A CMOS receiver is an open circuit \((\Gamma _{\text{L}}=+1)\), so the wave doubles at the far end. A strong push-pull driver \((R_{\text{out}}=20\ \Omega )\) on a 50 Ω line launches 0.71 VDD; the far end jumps to 1.43 VDD (4.7 V on a 3.3 V rail), the reflection returns, is re-reflected by the low source impedance with \(\Gamma _{\text{S}}=(20-50)/(20+50)=-0.43\) and rings. This is the push-pull output's main weakness on long traces: its low impedance is a poor match to the line.

The fix is series (source) termination: a resistor right at the driver so that \(R_{\text{out}}+R_{\text{s}}=Z_{0}\). Here \(R_{\text{s}}=30\ \Omega\). The launched wave is then exactly ½VDD, it doubles to VDD at the open receiver, and the reflection is absorbed at the source. It costs nothing in DC power, unlike a parallel termination to ground, which would draw \(V_{\text{DD}}/Z_{0}=66\ \text{mA}\) whenever the output is high. The full treatment, with a bounce-diagram simulator, is in Transmission Lines for Interfaces.

Push-pull driver with series termination into a point-to-point line. The intermediate half-amplitude step exists only near the driver; probe at the receiver.
07 · Ground bounce

Simultaneous switching: why fast edges move the ground

The charge for every edge returns through the package's power and ground pins, which have inductance L (0.5–5 nH each, depending on package and how many are shared). A current that changes by ΔI in time tr develops a voltage across that inductance:

$$V_{\text{bounce}}=N\cdot L\cdot \text{d}i/\text{d}t\approx N\cdot L\cdot \Delta I/t_{\text{r}}$$

Worked example. Sixteen outputs falling together, each into a 50 Ω line \((\Delta I\approx 3.3\ \text{V}/(25+50)\,\Omega =44\ \text{mA})\) in 1 ns, sharing an effective 1 nH of ground: \(V=16\times 1\ \text{nH}\times 44\ \text{mA}/1\ \text{ns}=0.70\ \text{V}\). For that nanosecond the chip's internal ground is 0.7 V above board ground. A quiet output that is meant to be low rises to 0.7 V at its pin; a quiet input referenced to the bouncing ground sees a 0.7 V negative glitch. Both can cross a threshold.

The remedies are all in the formula: fewer simultaneous outputs (stagger them), lower ΔI (weaker drive or series resistors), slower edges (slew control), lower L (more ground pins, flip-chip packages, short wide return paths on the board). FPGA vendors publish SSO tables giving the maximum number of outputs per bank per ground pin for each I/O standard and drive strength.

08 · Contention

Two push-pull outputs on one wire

Tie two push-pull outputs together and set them to opposite levels. The PMOS of the one driving high and the NMOS of the one driving low form a resistive path straight across the supply:

$$I_{\text{contention}}=V_{\text{DD}}/(R_{\text{p}1}+R_{\text{n}2})\qquad V_{\text{node}}=V_{\text{DD}}\cdot R_{\text{n}2}/(R_{\text{p}1}+R_{\text{n}2})$$

Worked example. Two 3.3 V GPIOs, \(R_{\text{p}1}=40\ \Omega\) and \(R_{\text{n}2}=30\ \Omega\): \(I=47\ \text{mA}\), the wire sits at 1.41 V (squarely in the undefined region, so every receiver on it now draws crowbar current too), the PMOS dissipates \(47^{2}\times 40=88\ \text{mW}\) and the NMOS 66 mW. In reality the transistors leave the triode region and the current saturates somewhat lower, but it is still several times the pin's absolute-maximum rating.

What it does to the parts depends on duration:

  • Nanoseconds (bus turnaround overlap): extra supply noise and EMI, no damage. Normal on poorly timed tri-state buses.
  • Milliseconds to seconds (two micros both driving after a reset, a GPIO set to output against a button to ground): pad metal and output fingers heat locally; supply droop can brown out the chip; repeated events cause electromigration in the I/O ring.
  • Continuous: permanent damage to the output stage is likely, and the injected current can trigger latch-up.
Two drivers on one net. When they agree, nothing flows between them. When they disagree, the high-side device of one and the low-side device of the other short the rails through the wire.
Design rulesOne push-pull driver per net. If ownership of a net can change (bidirectional GPIO, a shared reset, a debug header), put a 100 Ω – 1 kΩ series resistor in the line so an accidental fight is current-limited, or use open-drain. Make every GPIO an input at reset and only enable outputs after the firmware knows the board configuration.
09 · Back-powering

The hidden diodes: driving an unpowered chip

Every CMOS pin has ESD clamp diodes from the pin to VDD and from ground to the pin, and the PMOS drain–body junction forms another diode to VDD. If chip A is powered and drives a high into chip B while B's supply is off, current flows from A's output through B's upper diode into B's VDD rail. That rail rises to about VOH − 0.6 V, partially powering B and anything else on that rail. Symptoms: a "powered-off" device that half-boots, a power sequencer that never sees its rail fall, a supply that latches up when finally enabled, and extra current from A.

$$I_{\text{inject}}\approx (V_{\text{OH},\text{A}}-V_{\text{F}}-V_{\text{rail},\text{B}})/R_{\text{out},\text{A}}$$

Remedies: drive the line low (or tri-state it) until the far side's supply is good; use a series resistor sized so the injected current stays below the datasheet's injection limit (often 1–5 mA); use an input with "Ioff" or "partial power-down" specification (no upper diode, the input is high impedance when unpowered); or put a buffer that is powered from the receiving rail in between.

10 · History

The bipolar totem pole

In standard TTL the output is an NPN transistor (pull-down) with a second NPN above it in series with a diode (pull-up). The high level is therefore \(V_{\text{CC}}-V_{\text{BE}}-V_{\text{D}}\approx 5-1.4=3.4\ \text{V}\) with no load, and drive is strongly asymmetric: the classic 74-series gate sinks 16 mA but sources only 0.4 mA at its guaranteed levels. That asymmetry is why TTL-era designs used active-low signals (the strong edge is the asserting one) and why the TTL input thresholds of 0.8 V and 2.0 V sit low. LVTTL kept those thresholds on a 3.3 V supply, which is why 3.3 V CMOS inputs still list \(V_{\text{IH}}=2.0\ \text{V}\). CMOS replaced the stack with complementary devices that reach both rails and are symmetric by design.

11 · In practice

Where push-pull is the right answer

InterfaceWhy push-pull fitsWhat to watch
GPIO, enables, resetsOne owner per net; fast; no pull-up currentReset state; back-powering an unpowered peripheral; boards where the "owner" changes
SPI SCLK, MOSI, CSSingle controller drives them; edges can reach tens of MHzSeries termination above ~5–10 cm; CS must never float during reset (pull-up)
SPI MISOPush-pull while selected, tri-state otherwiseSee Tri-State
UART TX (logic level)Point to point, one driver per directionIdle high: hold TX high during boot so the far end does not see a break
Clock outputs (LVCMOS)Simple; reaches the railsOvershoot and double-clocking on long traces; use series R; above ~150–200 MHz move to LVDS or LVPECL
MOSFET gate driveLow impedance both ways charges the gate fastGate resistor to tame ringing; separate source return (Kelvin)
12 · Self-check

Questions

A datasheet says \(V_{\text{OL}}\le 0.4\ \text{V}\) at 4 mA. What is the worst-case Rout, and what is t10–90 into 25 pF?

\(0.4\ \text{V}/4\ \text{mA}=100\ \Omega\). \(\tau =100\ \Omega \times 25\ \text{pF}=2.5\ \text{ns}\); \(t_{10\text{–}90}=2.2\times 2.5=5.5\ \text{ns}\).

Doubling the drive strength: what happens to dynamic power?

Nothing, to first order. \(P=\alpha CV^{2}f\) does not contain R. The same energy is delivered faster, so the peak current and the ground bounce go up, not the average power.

Why does a floating CMOS input increase supply current?

It drifts toward mid-rail, where both input transistors conduct. A typical input draws hundreds of microamps to a milliamp of crowbar current there and may oscillate.

Two MCUs share a reset line, both push-pull. One drives low while the other drives high. Estimate the current with \(R_{\text{p}}=45\ \Omega\) and \(R_{\text{n}}=35\ \Omega\) at 3.3 V, and the fix.

\(3.3/80=41\ \text{mA}\), with the line near 1.4 V. Make the reset open-drain with one pull-up, or at minimum add a series resistor (e.g. 330 Ω limits a fight to \(3.3/(330+80)\approx 8\ \text{mA}\)).

A 20 Ω driver feeds a 50 Ω, 15 cm trace to one receiver. What series resistor, and why at the driver?

\(R_{\text{s}}=50-20=30\ \Omega\) (33 Ω standard). It must sit at the driver so that the source end of the line is matched and absorbs the reflection coming back from the open receiver.

Why is a push-pull output "unsafe" on a shared bus but an open-drain output safe?

Push-pull actively drives both levels, so disagreement shorts the rails. Open-drain only actively drives low; high is a resistor, so the worst case is a low winning over a pull-up, with current limited by that resistor.

← Driver topologies overviewNext: Tri-state →Transmission lines →