Open-drain vs push-pull outputs
Key number. An open-drain line at 3.3 V with a 4.7 kΩ pull-up and 50 pF, and two push-pull pins fighting. Result: Open-drain is safe to share and slow to rise; push-pull is fast and unsafe to share. Worked out below
Worked numbers
The book keeps the mechanism and the numbers you would say out loud. The arithmetic is here, worked from the inputs to the result. Every number in this section is computed from the stated inputs.
A typical case. An open-drain line at 3.3 V with a 4.7 kΩ pull-up and 50 pF, and two push-pull pins fighting.
- Rise time 10–90%: 2.2·R·C = 2.2 × 4.7 kΩ × 50 pF = 517 ns, against a few ns for push-pull.
- Held low: 3.3 V / 4.7 kΩ = 702 µA through the pull-up, continuously.
- Two push-pull outputs in conflict, about 25 Ω each: 3.3 V / 50 Ω = 66 mA, far above a typical 25 mA pin rating.
Result. Open-drain is safe to share and slow to rise; push-pull is fast and unsafe to share.
Sanity check. To shift I²C between 1.8 V and 3.3 V, use one NMOS per line, gate on 1.8 V, with a pull-up on each side.
Calculators for this question
Run your own numbers. Each tool shows its formula and a worked example.
Going deeper: open drain vs push pull in practice
The longer explanation the book has no room for: where people go wrong, and how to say it in the room.
Open-drain can pull low or let go. An external pull-up makes the high level, so any device on the line can pull it low and the line is high only when all let go: a wired-AND. That is why I²C, interrupt lines and resets use it.
Push-pull drives both ways. Fast edges both directions and no static current, but two push-pull outputs that disagree short the supply through a PMOS and an NMOS.
Level shifting. The pull-up sets the high level, so a 3.3 V device can share a 1.8 V or 5 V line if its pin tolerates that voltage and has no protection diode to its own supply. Check the rating with the device unpowered too.
Where people go wrong
- Lowering the pull-up for speed until the weakest driver can no longer pull a valid low.
- Forgetting the continuous current V/R whenever the line is held low.
- Tying two push-pull GPIOs together for a shared line.
Say it in the room: "Push-pull for one fast driver; open-drain when devices share a line or the high level differs from the driver's supply. The cost is an RC rising edge."
Errata
None known. All errata
Questions or corrections
Related
← BX-06 What twisting a pair doesBX-08 NMOS small-signal gain →