Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

3 state output?

Status
Not open for further replies.

Marks256

New Member
What does "3 state output mean"? I know there is HIGH and there is LOW, what is #3?
 
#3 is open circuit so you can have a bunch of outputs on a single wire and activate only one while the rest are disconnected by their 3-state.
 
So it is serial? I am confused. What does "Open circuit mean"? Sorry if these questions are dumb, but you must give me credit, i am trying to learn. :)
 
Open circuit means it is completely disconnected. You cannot connect two ordinary outputs together because they fight about whether their output is high or is low. But if you open circuit one of the outputs then there isn't the problem.
 
not to quibble but the third state of a tri-state pin is usually described as high impedence (often called high-Z). On microcontrollers, it is done by changing the pin to an input. many logic chips have a high z contol pin. It doesn't truely disconnect the pin, though it draws an insignificant amount of current so for design purposes, you can ignore it. On a pic, you set the coresponding bit in the TRIS registor - TRIS is short for tri-state.
 
Ok, i have heard of high impendence. What does that mean though? I looked up the definetion, but led me to more questions? Can you explain the tri-state pins to me please? Also, could you give examples? Thanks for all of your help so far!
 
HIgh impedence means high resistance- disconnected. Impedence is "complex resistance". It's resistance with a real and imaginary number parts. Resistance usually means impedence with 0 for the imaginary part.

So you the states you have are a 1, 0, and disconnected (or floating).

Pins sometimes have a high impedence state so you can use pull-resistors on the line. You output a 0 when you want a 0, and you output high impedence when you want a one, rather than outputting 1. THis allows a 5V device to have output a 1 that is higher than 5V (more than the device can supply), all that is needed is for one end of the pull-up resistor to be connected to the line (obviously) and the other end is connected a voltage supply however high you need the 1 to be.
 
Last edited:
Impedance is a general term which may inclued capacitive or inductive reactance and resistance. It would be more accurate to say the 3rd state is high resistance because a frequency is not specified.
 
So, if you were to turn on the third output, then a one nor a zero would show up? It would just be nothing?
 
Imagine a wire at ground potential, or at 5V. These are the two states we are familiar with. Now imagine the wire is disconnected from the rest of the circuit. That is the "tri" or 3rd state.
 
It would show up as something...but what that something is, is unknown and unpredictable. It changes all the time and floats around, some ever changing voltage. It's basically "disconnected". Using a voltmeter to measure the voltage between power supply ground and a high impedence pin is simiilar to measuring the voltage between that same ground and some random piece of metal lying around somewhere.
 
Oh! I see now! Thanks! But then what is the purpose of the pin state? If it is so unstable, what is it good for?
 
Marks256 said:
Oh! I see now! Thanks! But then what is the purpose of the pin state? If it is so unstable, what is it good for?
You make the output pin of a device its disconnected 3rd state when you want to use the wire that its output is connected to by another IC's output.

Like I said before, the wire that the output pin is connected to can be used by many IC's that have 3-state outputs when only one output is enabled at a time.
 
Marks256 said:
Oh! I see now! Thanks! But then what is the purpose of the pin state? If it is so unstable, what is it good for?
YOu can use it for as an open collector output with the pull-up resistors so you can have a high voltage that is larger than the device's supply voltage.

And like audioguru said, if you have a Y connection between 3 pins, you can use the high-impedence to switch back and forth between one branch and the other. So you could conceivably have 3 or 4 uC using the same sensor over the same wire one after another. Similar to demultiplexing. (Right now, let's just say one output to several inputs instead of multiplexing which is several outputs to one inputs)
 
Last edited:
Well, say you have several memory chips on the same bus. Let's say there are eight data lines, D0 to D7 on each chip, for simplicity. Let us think about having two pins on each of these memory chips which controls the tri-state data pins. Now, if we want to write data to the memory chip, we use those two pins to set the tri-states to inputs, and put our data on the bus. If we want to read from the memory chip, we set the tri-states to outputs, and read the data from the bus. If, however, we do not want to read or write from or to this chip, we set the tri-states to high-Z, and it will appear, for all intensive purposes, that this chip is not on the bus. This way we can have multiple memory chips all sharing the same data bus. Hope this sheds some light on it.
 
Oh, ok. I understand now. So basically, it will cut off one chip, and allow another onw to use the wire, without disturbing the other chip's data?
 
Never mind the data. You don't connect active outputs together if you don't want smoke.
 
Yah. Ok, i understand now. Thanks.
 
Tri-state is a bit like five people sitting around rocking a baby in its cradle, but each person wants to rock at a different rate, which we know, won't work well at all. If four of the people take their hands off the cradle (high-impedance state) and only one allowed to do the rocking (0,1,0,1,.....), the cradle will rock at a certain rate. You have your choice of which person rocks the cradle as long as that person does the rocking and the other four keep their hands off.

RAM and other memory is typical of 3-state logic (Tri-state is a National Semiconductor trademark) where only one RAM chip at a time is allowed to take control of the memory bus while the others keep their hands off (high impedance state).

Dean
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top