74LS245 it doesn't work like i think

wayne francke

Jul 29, 2018
4
Joined
Jul 29, 2018
Messages
4
i am trying to use this for something other then its design but i am puzzled by what i see .
set up: pin 20 5v pin 10 0v pin1 high 5v (direction a to b) pin 2 (1a) high 5v

with pin 19 low (enabled) i see 4 volts on pin 18 (1b)
with pin 19 high(not enabled) i see 2 volts on pin 18 (1b)
i would not expect to see 2 volts on pin 18 (1b) with pin 19 high(not enabled)
can any of you fine experts help me??
thanks in advance

wayne francke
 

Attachments

  • 74ls245.PNG
    74ls245.PNG
    34.7 KB · Views: 37

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The problem may be in your thinking.

What output would you expect when the output is not enabled?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
0 volts or open

That's 2 different options.

It won't be 0V, and that much should be obvious.

If you look at the definition, that the output becomes "high impedance", then that is closer to open, but it's not the same as open.

It is easier to look a it as having undefined high resistance to a voltage level (and a voltage level that's not necessarily either supply voltage)

In your case, you are using a multimeter that has a high impedance, possibly higher than the impedance of the tri-state output. This allows you to read a voltage without loading it no very close to zero. As an experiment, if you had an old analog meter you could try measuring the voltage with that. With almost 100% certainty I would suggest you would find the value to be much lower, possibly zero.

If the output has a valid logic level (as it does when it is enabled) then you will find that adding some moderate resistance between the output and the negative rail (for a high logic level) or the positive rail (for a low logic level) will make very little difference to the voltage you read.

In this case, I would imagine that if you took a 100k resistor (quite a high value of resistance) and placed it between the output in a tri-state condition and either supply rail, then the output would move to a voltage which may be almost exactly that supply rail, i.e. that the voltage across the resistor would be almost 0V.

In essence the voltage on a pin in a tri-state condition will be the value impressed on it by external circuitry -- and that is the purpose of tri-state outputs.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
being a newbee i am not sure i was expecting 0volts
It won't be 0V, and that much should be obvious.

OK, maybe not obvious :)

When the output is at logic 0, the voltage on the output is typically close to 0V. When the logic level is 1, the output voltage is close to the supply rail.

But it's more complex than that. Different types of logic have a different range of voltages that are valid for a logic 1 and a logic 0. Depending on how these logic circuits are made, the outputs may or may not get really close to the supply rails. TTL (or LS TTL that you're using) is an example of a logic family that often can't get especially close to the positive supply rail.

So let's assume that the 4V you read on the enabled output is close enough to the +ve supply (which is probably 5V) for us to just call it the +ve supply. And if it was logic 0, let's assume the voltage is effectively 0V.

The output of normal logic is somewhat akin to having two little people with ropes who try to pull the output close to their respective voltage rail. When the output is set to 1, the man on the bottom lets his rope go slack and the man on the top pulls on his rope and the output goes high. When the output is 0, the man on the top lets his rope go slack and the man on the bottom pulls on his rope to take the output low. Importantly, those little men don't pull on their ropes at the same time, but in normal logic one man is always pulling on a rope..

This chip is a bus driver. It is designed to have many outputs connected together so that any of them can place a signal on the common bus. That signal could be a logic 0 or a logic 1.

If we connect many of these outputs together, all is fine if all are at logic 1, because all the men on top will be pulling their outputs (and thus the bus) up, or all are at logic 0 because all the men on the bottom are pulling their outputs (and thus the bus) low.

But the idea of a bus is that any gate can place a signal on the bus. Let's assume all the gates are low, and one gate decides to pull its output high. In this case the man on the bottom lets his rope go loose, and the man on the top tries to pull the output up. However that one man on the top finds he is pulling against many other little men on the bottom. Several things can happen:
  1. The man on the top tries, but can't pull hard enough
  2. The man on the top pulls really hard and breaks his rope
  3. The man on top pulls so hard, and with a strong enough rope that he breaks all the other bottom man ropes.
  4. The man on the top pulls really hard and overpowers all the men on the bottom.
None of these are really good. Anything where a rope breaks would be a failure in a chip that would need to be replaced. Either of the overpowering scenarios isn't good either because it depends on how many are pulling in the other direction, and all the expended effort will make the chips get hot.

The obvious solution in the little men case is to allow both little men to let their ropes go slack. If all of the outputs are in this state, and one output decided to enable it's little men and pull it's output high or low, the bus will follow and so will the outputs that are connected to it. The ropes are slack, so a slight pull from one top or bottom man is able to pull all the other outputs high or low.

Both ropes being left slack is one method of implementing a tri-state output.

Now, of course, these are no little men in logic chips, but there are transistors doing exactly what those little men do, and instead of ropes they have a low impedance state which pulls the output to the matching supply rail. In this case, one transistor (little man) is in a low impedance state (pulling on the rope) and the other transistor (little man) has a high impedance state (slack rope). The output goes toward the low impedance. Tri-state can be implemented as having both transistors go into the high impedance state (so the output is not pulled strongly either way). This is why is is also called a "high impedance" or "High-Z" (Z is the symbol for impedance) state.
 

wayne francke

Jul 29, 2018
4
Joined
Jul 29, 2018
Messages
4
gentlemen,
i wish to thank you for all your information that you provided. it turns out that after reading your helpful advice i decided that the path i was on was not the correct one. and have decided to go a different route. it is a long story and dont want to bore you with it. but i love to learn even if it is from my own stupid mistakes or the helpful advice of others. thanks again.

wayne francke
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,968
Joined
Jun 21, 2012
Messages
4,968
WTF is Whiskey Tango Foxtrot, a currently popular meme, perhaps inspired by dance shown below:

wtf.jpg
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Whiskey Tango Foxtrot is WTF in international phonetic alphabet (Alpha, Bravo, Charlie...) Waltz Tango Foxtrot is my takeoff of that, as a ballroom dancer.

BTW: The guys in the picture are certainly not doing any of those three :)
Bob
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,968
Joined
Jun 21, 2012
Messages
4,968
BTW: The guys in the picture are certainly not doing any of those three :)
Yeah, I think whatever they are doing was possibly aided by the Whiskey part of the meme.

My wife and I never acquired the grace of learning ballroom dancing, although I do admire any couples who are adept. We do like to boogie though, and boogie-woogie dancing is fun too, albeit a bit exhausting. Now that streaming video is an Internet reality, it is easy to find and watch old movies featuring the likes of Fred Astaire and Ginger Rogers.

So, Why The Fear? all you reticent posters. Go cut a rug, but please don't leave us guessing about what you are trying to DO. It's okay to re-purpose integrated circuits, if that accomplishes your goal, however it helps to know how it worked when used as the manufacturer intended. Thanks @(*steve*) for the very visual explanation... and with nary a drop of water anywhere in sight! :D Heave ho and heave to, me Mateys! We be seein' landlubbers here.
 
Top