An alternate to tri-state logic is open drain output:
- the output signal is applied to the base of an internal NPN transistor.
- it controls the transistor switching.
- The emitter is grounded internally.
- The real output will be on the collector — open collector (the output is taken from between the collector and the emitter). The output would be either
- low, when the transistor is on, as the output is forced to nearly 0 volt; or
- nothing (no current flows), also called “high-Z”, high impedance, when the transistor is off.
In practice, a pull-up or pull-down resistor is required, to keep the digital output in a defined logic state. An external pull-up resistor can be used to raise the output voltage when the transistor is turned off.
The advantage of open drain circuit:
- all the devices can pull the signal line low, but can not drive it high.
- avoid conflicts where one device drives the line high, while another tries to pull it low.
- inactive devices would not try to hold the line high.
- pull up resistor can be external, no need to be connected to the chip supply voltage.