← back to legend
Physical / electrical concepts

Open-drain vs push-pull

Open-drain: the chip can only pull a line low; it relies on an external pull-up resistor to make it high. Push-pull: the chip can drive both states actively. I2C is open-drain, SPI is push-pull.

How it looks

Drawing
OPEN-DRAINPUSH-PULLpulls low; a resistor lifts itdrives both ways itself
Left: one switch plus a resistor. Right: two switches.

How it works

  1. Open-drain can only pull low; an outside pull-up makes the high. Slower, but many chips can share one wire safely. I2C works this way.
  2. Push-pull drives high and low itself. Fast, but two outputs on one wire can fight (contention). SPI works this way.

Where it fits

Details on the open-drain and push-pull cards; the safe sharing is wire-OR.

← back to legend