- Three-state logic
In digital
electronics three-state, tri-state, or 3-state logic allows output ports to have a value of logical 0, 1, or Hi-Z. A "Hi-Z" output puts the pin in ahigh impedance state, effectively removing the pin from its influence on the circuit. The intent of this state is often to allow multiple circuits to share the same output line or bus, or allow a device to monitor signals without affecting the signal (as used inanalog-to-digital converter s). "Tri-state" is a registered trademark of National Semiconductor but is often used to describe devices made by any manufacturer.Three-state outputs are implemented in various families of digital
integrated circuit s such as the7400 series of TTL gates, and often in the data and address bus lines ofmicroprocessor s. Three-state outputs may be found on individual logic gates, or in multiples in one integrated circuit package as a buffer for connection to a bus.On some bus drivers or port expander ICs, setting an input pin called OE (output enable) low puts all the outputs in a Hi-Z state; setting that pin high makes all the outputs active, driving the bus to either 1 or 0.
This form of gate should not be confused with
ternary logic ("3-value" logic).Uses of three-state logic
The whole concept of the third state (Hi-Z) is to effectively remove the device's influence from the rest of the circuit. If more than one device is electrically connected, putting an output into the Hi-Z state is often used to prevent short circuits (when one device drives high (logical 1) against another device driving low (logical 0)).
Three-state buffers can also be used to implement efficient
multiplexer s, especially those with large numbers of inputs.Fact|date=May 2008Three-state logic can reduce the number of wires needed to drive a set of LEDs (tristate multiplexing or
Charlieplexing ).Use of pull-ups/pull-downs
When outputs are tri-stated (in the Hi-Z state, also known as Floating) their influence on the rest of the circuit is removed. Circuit designers will often use pull-up or pull-down resistors (usually with in the range of 1 - 100k ohms) to influence the circuit when the output is tri-stated. For example, the
I2C bus protocol (a bi-directional communication bus protocol often used between devices) specifies the use of pull-up resistors on the two communication lines. When devices are inactive, they "release" the communication lines and tri-state their outputs, thus removing their influence on the circuit. When all the devices on the bus have "released" the communication lines, the only influence on the circuit is the pull-up resistors, which pull the lines high. When a device wants to communicate, it comes out of the Hi-Z state and drives the line low. Devices communicating using this protocol either let the line float high, or drive it low -- thus preventing any short circuit situation where one device drives a line high and another low.Alternatives to 3-state bus
A 3-state bus is typically used between chips on a single PCB, or sometimes between PCBs plugged into a common
backplane .An
open collector bus is often used between PCBs plugged into a common backplane, or connected over longer cables.Usage of three-state logic is not recommended for on-chip connections but rather for inter-chip connections. Basic multiplexers can be used on chip since the number of components and wires is not limited to the extent as in PCB (printed circuit board). [ [http://vswww.kaist.ac.kr/ENGLISH/old_lecture/ee878-2002/lecture/SoC_22-OCNetwork-1113.pdf "On-Chip Buses/Networks for SoC"] "On-Chip Buses [have] No use of tri-state signals [because] Tri-state bus is difficult for static timing analysis"]
=See also=
*Logic level
*Buffer
*Ternary logic ources
[http://www.cs.umd.edu/class/spring2003/cmsc311/Notes/CompOrg/tristate.html What's a Tri-state Buffer?]
[http://ledkit.biz/acad.php Principle of Tristate Multiplexing]
Wikimedia Foundation. 2010.