Electronics & Circuits · Study deck
GPIO Output Stage Contracts
Picture a sensor board and an add-on board sharing one alert line.
Voltage Vera is your guide for this deck.

After studying this chapter
Learning objectives
You will be able to:
- Distinguish push-pull outputs from open-drain/open-collector outputs at the transistor-stage level.
- Choose push-pull or open-drain behavior for SPI, PWM, chip-select, I2C, shared interrupt, and cross-rail interface lines.
- Explain how a pull-up resistor defines the HIGH level and why the resulting edge is slower than an actively driven HIGH.
- Identify bus-contention failure modes when multiple push-pull outputs are tied together.
Major section
Start Simple
If both sides drive opposite levels, the logic trace may look odd while excess current stresses the parts.
- GPIO means a general-purpose input/output pin.
- I2C is a shared two-wire link whose devices normally pull lines low and let resistors raise them.
- SPI is a clocked link with separate driven data paths.
- PWM is its short name.
Major section
Start Simple (continued)
Pulse-width modulation means carrying an output setting in the on-time share of a switching signal.
- This runway does not select a resistor or prove electrical ratings.
- The deeper sections compare push-pull and open-drain stages, edge timing, contention, shared lines, and the release checks for each use.
- GPIO output stages define whether a pin actively drives both directions, only pulls LOW, or must rely on a resistor.
Major section
Overview: Two Ways an Output Stage Drives a Pin
The transistors at an output pin are wired in one of two ways, and the choice decides how the pin can be used.
- The easiest way to read a schematic is to ask who owns the wire in each state.
- The default for ordinary signals (SPI, PWM, chip-selects).
Major section
Overview: Two Ways an Output Stage Drives a Pin (continued)
A push-pull output owns the wire all the time: HIGH is an active source path and LOW is an active sink path.
- That difference is why push-pull suits private, point-to-point outputs, while open-drain suits shared or active-LOW signals.
- The labelled progression means an I2C bus is the familiar open-drain case: every device can pull SDA or SCL LOW, but the pull-up resistors define the released HIGH level for the shared wires.
- When the low-side transistor turns on, the pin is strongly connected to ground and can sink current.
Major section
Overview: Two Ways an Output Stage Drives a Pin (continued)
For overview: two ways an output stage drives a pin, that order identifies what to measure or calculate before accepting the hardware choice.
- Level flexibility An open-drain line's pull-up can go to any allowed rail, setting the HIGH voltage independent of the chip's own Vcc.
- For I2C, shared interrupt lines, reset aggregators, fault outputs, and presence-detect pins, the board often wants several devices to share one wire without coordinating who may talk first.
- When it turns off, the pin becomes high impedance and needs the external circuit to define the voltage.
Major section
Practitioner: Which Stage for Which Job
A small resistor gives a faster rise but wastes more current whenever any device pulls LOW.
- It gives clean, quick edges in both directions.
- A transistor low-side load switch is the same idea in power form: the MOSFET pulls the load's return to ground while the load's other end sits at the supply.
- Without those checks, "open-drain" is only a schematic label, not a verified interface.
Major section
Practitioner: Which Stage for Which Job (continued)
If two chips both default to push-pull output while their firmware is still starting, the schematic may be unsafe even if the application code later avoids simultaneous drive.
- The GPIO only has to swing the gate; the drain switches the 12 V load the pin could never drive directly.
- A large resistor saves current but may rise too slowly or lose noise margin when leakage, long cables, ESD structures, or unpowered devices load the bus.
- The design review should name the rail, the resistor value, the expected line capacitance, the required rise time, and the worst-case LOW sink current.
Major section
Under the Hood: Bus Contention and the Passive-Edge Cost
The contention current can be much larger than the normal load current because both output transistors are turned on hard.
- The danger open-drain avoids is bus contention.
- Large current flows, the logic level is ambiguous, and the output transistors can be damaged.
- That safety has a price.
Deck summary
Key takeaways
If both sides drive opposite levels, the logic trace may look odd while excess current stresses the parts.
- Pulse-width modulation means carrying an output setting in the on-time share of a switching signal.
- The transistors at an output pin are wired in one of two ways, and the choice decides how the pin can be used.
- A push-pull output owns the wire all the time: HIGH is an active source path and LOW is an active sink path.
- For overview: two ways an output stage drives a pin, that order identifies what to measure or calculate before accepting the hardware choice.
Retrieval practice
Recall check 1 of 3

Voltage Vera says: answer from memory, then check your reasoning.
Q1What can an open-drain output do on its own, and what does it require to produce a HIGH?
Show answer
Answer: A Open-drain has just the low-side transistor, so it sinks LOW or releases; the HIGH comes from an external pull-up to the chosen rail.
Retrieval practice
Recall check 2 of 3

Voltage Vera says: answer from memory, then check your reasoning.
Q2Why is I2C defined with open-drain outputs and pull-up resistors rather than push-pull drivers?
Show answer
Answer: A Open-drain lets devices only pull low or release, enabling multiple devices, acknowledgements, and multi-master on shared lines without two drivers fighting.
Retrieval practice
Recall check 3 of 3

Voltage Vera says: answer from memory, then check your reasoning.
Q3Two push-pull outputs are accidentally wired to the same line; one drives HIGH and the other LOW. What happens, and why does open-drain avoid it?
Show answer
Answer: A Two opposing push-pull drivers short the rails through their output transistors, drawing large current and risking damage.
Print reference
Answers
Answer key.
- A · Open-drain has just the low-side transistor, so it sinks LOW or releases; the HIGH comes from an external pull-up to the chosen rail.
- A · Open-drain lets devices only pull low or release, enabling multiple devices, acknowledgements, and multi-master on shared lines without two drivers fighting.
- A · Two opposing push-pull drivers short the rails through their output transistors, drawing large current and risking damage.