This is part of series of articles to break jargon used in Embedded Programming world. Here I brief about various output modes and various ways to use these output pins.
The output pin of an IC can be a Open Collector type (In case of MOSFET instead of transistor, it is called Open Drain). What does it mean? It means that Collector Pin of a transistor is kept open in this IC which can be connected to your own +ve supply rail through a right valued external resistor. The base of transistor is controlled by logic output for this pin. So when base input is high, collector is grounded through grounded emitter, collector becomes level zero. When base voltage is below threshold voltage, collector goes to voltage of +ve rail which it is connected, so it is level one.
So open collector can be used to interface two different circuits of different operating voltage. i.e., The IC may be 3.3V, but Open Collector can be connected with 5V supply. Another advantage is connecting multiple Open Collector outputs together in single line results in “Wired AND”.
The figure below shows the Open Collector.
I had mentioned a resistor in last paragraph, right? It can be connected either from collector to +ve supply rail or from emitter to ground. If it is connected between Supply rail and collector, it is called Pull-up Resistor, in case of between Emitter and ground, it is Pull-Down Resistor as shown below. Some times the IC has Internal Pull-up/Pull-down resistors. If not the design can connect a external resistor, in that case it is called as External Pull-up/Pull-down resistor.
Another concept worth noting down is “Strong” and “Weak” Pull-up/Pull-down resistors. Strong means low resistance value and Weak means higher resistance value comparatively. Using lower resistance value results in fast switching (rise/fall) where as higher resistance results in lower power consumption.
Tri-state logic output mode is like a switch. The input logic is available at output in case of switch is ON else the output goes to high impedance state. Don’t panic with the word High impedance, it is basically your output pin is almost isolated from rest of the internal circuit in IC. The following figure shows it clearly. Here B is switch control. If B is 1, C will get logic level of A – Otherwise C goes high impedance state.
Example of this Tri-state logic: Many memory devices in a system may share a common address bus and data bus. When a memory device is selected through its “Chip Select” line, rest of the devices are not chip selected. Those devices which are not chip selected will take all its output lines to High impedance state – i.e., it isolates its output lines from bus, so that the memory device which is selected will drive the bus.