Testing a 74LS181

Does anyone have a schematic for hooking up a 74LS181 ALU with dip switches so that I could test whether or not it works? I'm having a hell of a time hooking it up on a breadboard; the output pins seem to float around although they generally give the expected output. Also, the chip pulls 200mA and gets slightly warm, so I've probably fried at least part of the chip, or is this normal with the LS group? They were only $1.25 on Tayda, as opposed to $7 on digikey so maybe they're fakes...

Any Cmos device is likely to draw a lot of current if it’s inputs are left floating. Try tying the inputs to ground with 10K resistors and see if the current is the same from the data sheet at least pins 1 thru 7 and use the same resistor and tie them high as they are marked active low on the data sheet Also I’d put a .1uF bypass cap directly on that part… There’s a lot of transistors in that package and the inputs are fairly high resistance as it is an LS (Low Power Schottky) part. The originals were TTL compatible and as fast as Cmos at the time they were introduced. Since they were pin for pin replaceable with regular TTL or Schottky logic and drew about 10 - 20% of the other non cmos logic families, they caught on for lower speed applications. The data sheet indicates differently but it was my experience when I actively worked with TTL logic that the LS family was slower than the TTL counterparts. Have you ever tried Eprom logic?.. It was a cheap method to interface a 7 or 15 Segment LED to a computer it takes an eprom and an 8 bit latch for each display I used to drive some of the led displays directly from the latch’s. Eprom logic was at that time just a step or so out of line with PLa’s or PLD’s. (I talk too much)

Bob

74LS181.pdf (159 KB)

Haha, so it turn out my circuit was fine, my input pulldowns just weren't strong enough. I guess I'm used to sensitive microcontroller inputs where less than 1 mA is usually enough. I still can't imagine why it's pulling 200mA from the power rail though. The datasheet says 37mA max.

either you don't have all the inputs tied high or low as the data sheet indicates or you did cook the part. You do only have 5V on it? don't you. The 7400 series family is about 6V max Vcc (was an old trick to increase the Vcc on some counters to make them run faster 10-15%)

Bob

Oops, posted before I read your first post. All of the inputs are driven so that's not the problem (I've heard CMOS can self-destruct if it's inputs are left floating?) and I'm only putting 5v on it

It is not a CMOS device, the clue is in the part number it is the LS bit that tells you it is TTL and not CMOS.
Pull downs on TTL need to be about 330R or less. Have you got a decoupling capacitor on?

Yup, I have a 22uf and a 100nF caps. I assume connecting inputs directly to Vcc or Gnd rather than through a resistor wouldn't pull extra current since they're high impedance.

If your output floats, something else is wrong in the circuit. Those chips are fairly simple to use, if you just follow the datasheet.

bobthebanana:
Does anyone have a schematic for hooking up a 74LS181 ALU with dip switches so that I could test whether or not it works? I'm having a hell of a time hooking it up on a breadboard; the output pins seem to float around although they generally give the expected output. Also, the chip pulls 200mA and gets slightly warm, so I've probably fried at least part of the chip, or is this normal with the LS group? They were only $1.25 on Tayda, as opposed to $7 on digikey so maybe they're fakes...

The data for the LS181 suggests supply current of 20 to 35mA or so, 200mA suggests you have got something badly wrong or the chip is burnt out.

The output was floating because the pulldowns on my inputs weren't strong enough. That's all fixed now. I just tried another chip and it also pulls 200 mA. They all do what they're supposed to though. Exact part number is SN74LS181N if it makes a difference.

The output was floating because the pulldowns on my inputs weren't strong enough. That's all fixed now.

A "floating" input doesn't cause a "floating" output - the floating input will be read as either a logic 0 or 1.

I assumed the floating input began to oscillate (as I've read they can do, at least on CMOS which this chip apparently is not) giving the impression that the output was floating. Either way, using 220 ohms instead of 1k fixed it.

Floating inputs, depending on logic family, can cause various problems.

For LS family floating inputs read high IIRC, but 10k pull-ups are advised to prevent noise-pickup. To hold an LS input low you'd normally short to ground (although this increases sensitivity to fast spikes on the ground line)

For CMOS floating inputs can oscillate, draw lots(*) of current.

In general after a couple of gates the indeterminant input signal will settle down to a clean logic state, but
this may happen too late in the chain to prevent it affecting an output that you wouldn't expect to be sensitive
to that input - unlikely but would be very confusing to debug.

The ATmega has a small amount of hysteresis on inputs to reduce the problem, so it isn't typically worried about
for Arduino pins. The old CMOS 4000UBE family (unbuffered CMOS) can be used happily as high gain analog amplifiers
if the inputs are allowed to vary about the crossing-point - floating inputs definitely an issue there.

(*) lots for a CMOS gate isn't much, but affects battery life since it can be 4 or 5 orders of magnitude more than the rest
of the device!

using 220 ohms instead of 1k fixed it.

That, I would say, is a sign of some serious problem somewhere else.

I also thought that the value was lower than usual. But it seems to coincide with what Grumpy_Mike said. The datasheet, however, says 1.2mA is enough to pull it low.

That, I would say, is a sign of some serious problem somewhere else.

And I would not.
It chimes in with my experience of using TTL over the last 40 or so years.

I also thought that the value was lower than usual.

If you post a schematic, I am sure we can help you find out what's wrong.

bobthebanana:
I also thought that the value was lower than usual. But it seems to coincide with what Grumpy_Mike said. The datasheet, however, says 1.2mA is enough to pull it low.

No, the worst case inputs (S inputs) require -1.6mA when low. Thus to bring below 0.8V you need less than 500 ohm pull downs, to bring down to 0.4V suggests less than 250 ohms (you do want noise immunity!).

Ok, I drew up and attached a schematic. I’ve also noticed that if all of the A and B inputs are pulled low my current draw is ~150mA and when they’re high it gets up to ~300mA!

74ls181.bmp (1.78 MB)

TTL logic of the 70's was very power hungry... it is probably the best explanation for why CMOS logic was accepted with open arms by many designers and it ended up being used wherever it made sense.