IC possibly malfunctioning

MrChips

Joined Oct 2, 2009
30,808
A gate outputs a high voltage because it closes a switch between the output pin and Vcc.

A gate outputs a low voltage because it closes a switch between the output pin and GND.

Now close both switches at the same time.

Poof! You've let the magic smoke out!
 

MrChips

Joined Oct 2, 2009
30,808
Here is what a 7400 TTL gate looks like internally. Ignore the left drawing and focus on the right hand drawing. This is a simple model of how the output transistors operate.

When the gate wants a HIGH output, Q4 conducts and Q3 is open.
When the gate wants a LOW output, Q4 opens and Q3 conducts.

Now imagine that you connect the output of another gate to this output. It does not matter where that gate is. It can be on a different chip on a different board.

If Q4 of one gate and Q3 of the other gate are both closed, this is a short circuit across the power rails and the high current can fry your chips.

 

thatoneguy

Joined Feb 19, 2009
6,359
In addition to the problem of tying the outputs together, resulting in hitting the package limit for I/O current sinking and sourcing to itself, and the other issues and questions above...

When working with logic, always remember to add a 0.1uF cap between Vcc and GND on the IC itself. With breadboards in general, I put a 22uF cap on each rail, then a 0.1uF every 15 rows or so on each side (min, 1 per side) in addition to a 0.1uF cap across each IC. Breadboards are VERY noisy, and the bypass caps help reduce odd glitches with circuits that switch quickly. These are a permanent fixture on all of my breadboards with logic, microcontroller, and analog circuits due to the number of headaches saved.

With your circuit above, something like a diode-OR between your inputs and the Inputs/outputs of the switches and inverter (thus avoiding shorting the IC outputs together). The unused inputs should also be either tied to Vcc or GND through a resistor, rather than left floating. Floating inputs can result in the IC oscillating on it's own (which stops when probing to find the problem due to the added load)
 

Thread Starter

GTeclips

Joined Feb 18, 2012
96
Here is what a 7400 TTL gate looks like internally. Ignore the left drawing and focus on the right hand drawing. This is a simple model of how the output transistors operate.

When the gate wants a HIGH output, Q4 conducts and Q3 is open.
When the gate wants a LOW output, Q4 opens and Q3 conducts.

Now imagine that you connect the output of another gate to this output. It does not matter where that gate is. It can be on a different chip on a different board.

If Q4 of one gate and Q3 of the other gate are both closed, this is a short circuit across the power rails and the high current can fry your chips.

That make it so much clearer! Thank you for the explanation! Now, that is only TTL right, does the same apply to CMOS?
 

Thread Starter

GTeclips

Joined Feb 18, 2012
96
In addition to the problem of tying the outputs together, resulting in hitting the package limit for I/O current sinking and sourcing to itself, and the other issues and questions above...

When working with logic, always remember to add a 0.1uF cap between Vcc and GND on the IC itself. With breadboards in general, I put a 22uF cap on each rail, then a 0.1uF every 15 rows or so on each side (min, 1 per side) in addition to a 0.1uF cap across each IC. Breadboards are VERY noisy, and the bypass caps help reduce odd glitches with circuits that switch quickly. These are a permanent fixture on all of my breadboards with logic, microcontroller, and analog circuits due to the number of headaches saved.

With your circuit above, something like a diode-OR between your inputs and the Inputs/outputs of the switches and inverter (thus avoiding shorting the IC outputs together). The unused inputs should also be either tied to Vcc or GND through a resistor, rather than left floating. Floating inputs can result in the IC oscillating on it's own (which stops when probing to find the problem due to the added load)
Can you further explain that cap concept please?
 

thatoneguy

Joined Feb 19, 2009
6,359
Sorry, I didn't quite understand that.


How to make a Resistor-Diode AND gate to combine two IC outputs, without damaging either IC output.

The thread is a topic on a combination lock, which looks like what you are trying to build, so if you read the full thread, rather than that excerpt post/image, it may make more sense.
 

thatoneguy

Joined Feb 19, 2009
6,359
You can make AND gates as well as OR gates with diodes and resistors external to your IC.

You showed a diagram above with all of the outputs tied together. You assumed that "high" outputs would "overpower" low outputs (an incorrect assumption).

If you start from scratch, and explain what you are trying to accomplish, without bringing ANY details of the existing (non-working) circuit into the description, that may be the best approach to decide what you actually need to accomplish what you are trying to do.

It boils down to this:
1) Supply: +5V
2) Inputs: ???
3) Output(s): ??

If you only have one output, how should it respond? If you have multiple inputs, what needs to be unique about them to give the desired output? Use plain English description, just like this paragraph. You don't need to mention gates, ICs, LEDs or any type of component to explain what you are trying to do, though you can indicate you'd like a light on or off.


Just a description like:
"When switches w, x, y, and z are on, the output is high. If any other switches are on, the output is low, even if w,x,y, and z are on". That's all that is needed to walk you through the rest of the process to decide what parts to put into your circuit.
 

Thread Starter

GTeclips

Joined Feb 18, 2012
96
Very well.

I wish for the primary output (The one connected to the LED) to always be low, unless switches 1, 2, 4, 5, 8 are all high, and switches 3, 6, 7 are all low. Any other combination of these switches, no matter how insignificant, will result in a low output.
 

MrChips

Joined Oct 2, 2009
30,808
Connect 3, 6 and 7 to individual inverter gates.
Then connect all eight signals via eight diodes as shown in the example above.

Or you can use a single 8-input AND gate.
 
Top