TTL IC 7400

Last updated on 1 June 2024 by Suffocation

Four NAND gates in one IC. With the first IC of the TTL series, further basic circuits can be created, so that only one type of IC would be needed. This made the IC so versatile and popular in its time. Unfortunately, the era of TTL components is over; today, these are mostly replaced by small controllers that can map complex logic by being programmed with software. Nevertheless, this component also marks the beginning of my TTL series. The use of these components serves to improve basic understanding, which is helpful as a basis for more complex circuits or also for programming. It cannot be ruled out that such a component might one day find application with a microcontroller, for example, to require fewer GPIOs. (Example: OR circuit for two collision buttons. As soon as one is pressed, there is a collision, but only one GPIO is needed (I know this is possible without a component 😉).

Was ist ein TTL IC?

Facts

NAND symbol

NAND Gate Symbol – Source: https://de.wikipedia.org/wiki/Logikgatter

Schematic

Truth table

NAND gate

#1/2/3/4 A1/2/3/4 B1/2/3/4 YExplanation
1001Both inputs LOW => output HIGH
2101Input A HIGH, B LOW => Output remains HIGH
3011Input A to LOW, B to HIGH => Output remains HIGH
4110Both inputs HIGH => output LOW, only LOW state
Truth Table NAND

Logic tester

Data sheet

https://www.ti.com/product/de-de/SN7400

Areas of application

  • Activation of ICs via bus address
  • Input Control
  • Logical sequences

Views

Circuit

Test

NAND – Video about the images

Programme

/** AND function */
bool and(bool e1, bool e2) {
return e1 && e2;
}

/** Not a function */
bool not(bool e1){
return !e1;
}

/** NAND-funktion */
bool nand(bool e1, bool e2){
return not (e1 and e2);
}

void main(){
bool output1 = nand(true, true);
bool output2 = not(and(true, true));
// do some output
}

Problems

When idle, the red LED is off

Not all ICs automatically pull inputs to ground, to resolve this issue pulldown resistors must be wired between the input and ground. 1kOhm is fine, higher values are also acceptable.

Miscellaneous

NOT circuit

For an emergency circuit, two inputs of a NAND gate are connected. For example, pins 12 and 13 are connected; the input signal present at pin 12 is then output in inverted form at the output.

#Input A (12)B (13)Exit Z
11=A0Input to HIGH is inverted to output (LOW)
20=A1The input on LOW is also inverted to the output (HIGH).
NAND – Gate Inputs A and B connected => NOT Gate

AND circuit

For the AND circuit, two gates are needed, one configured as a NAND and one as a NOT.

#ABCDExplanation
10010Both inputs on LOW, output is also LOW
21010Input A HIGH, B LOW, Output LOW
30110Input A to LOW, B to HIGH, Output LOW
41101Both inputs high, therefore the output is high
NAND – Truth table AND circuit

OR circuit

The OR gate requires three gates. The output is HIGH as soon as one of the inputs is set to HIGH.

#ABA!BZ
100110Both inputs low, output low
210011Input A to HIGH and B to LOW, output to HIGH
301101Input A to LOW and B to HIGH, output to HIGH
411001Both inputs to HIGH, output to HIGH
NAND - Truth Table OR Circuit

OR gate

Naturally, a NOR gate circuit is also possible. For this, another gate must be added to negate the output. If one of the inputs is HIGH, the output is always LOW.

#ABA!BZExplanation
100111Both inputs LOW, the output is HIGH
210010Input A to HIGH and B to LOW, output to LOW
301100Input A to LOW and B to HIGH, Output to LOW
411000Both inputs are HIGH, the output is LOW
NAND - Truth Table NOR Circuit

RS-FlipFlop

An RS flip-flop can also be built with the 4 gates of the 7400. The S (set) and R (reset) inputs must be negated and the outputs fed back to an input respectively. In the simulation, the outputs initially have an undefined state. In reality, it is either set or reset. The interesting thing about the RS flip-flop is that the state remains after releasing the S button and is only reset again when the R button is pressed. Thus, we can store 1 bit.

Through feedback, the preceding state must always be taken into account. For example, if Set is set to HIGH and then back to LOW, Q1 remains HIGH.

#SR!S!RQ1!Q1Explanation
10011**Initial state
2100110Set to HIGH
3001110Set saved
4011001Rest on high
5001101Settings saved
6 110011Unacceptable condition
7011001Resetz is selected
8001101Reset saved
9110011Unacceptable condition (2)
10100110The set is chosen
11001110Zustand gespeichert
NAND – RS-Flipflop Truth Table Circuit

State 6, both inputs on HIGH, is impermissible. The subsequent process depends on which of the two inputs is set to LOW first. This results in the respective other one counting. If S is set to LOW first, the R input counts, meaning !Q1 is active. In the opposite case, if R is set to LOW first, the S input counts, and Q1 is active.

XNOR

The output is always HIGH when the inputs have the same potential (A=B= LOW or A=B=HIGH). This circuit requires more than just one IC.

#ABA!BCD
1001111
2100110
3011010
4110001
XNOR circuit truth table

XOR

In an XOR gate, the output is HIGH when the inputs are different. This circuit requires 1.5 ICs.

#ABA!BCD
1001010
2100011
3011111
4110100
XOR Circuit Truth Table

Soldered Plate

I apologise for the chaos on the circuit board, I had to retrieve skills I hadn't used for decades. The blueprint generally corresponds to the one shown above. The jumpers disconnect the LEDs and the switch from the IC to allow other circuits to be built. By the way, I am operating the circuit board with 6V (4x 1.5v AAA batteries).

I accidentally used a 16-pin IC socket. Desoldering was not an option and I didn't want to remove the bridge to ground anymore, so I simply connected pins 7 and 8 of the socket.

View

Materialliste

ComponentNumber
LED Green/Yellow/Red (Can also be the same colour)3
Jumper (Red, Green, and Yellow correspond to the selected LED colours)3
2 straight Polig pins3
2 angled pole pins for power supply1
7-pin plug for additional connections3
Buttons with long press2
1K resistor (pulldown/pre-resistor for LED)5
14-pin IC socket1
Silver wire for the connections on the back?
Solder?
7402 Solder board material list

Addendum If you connect the LEDs in series with the pulldown resistors, you can save two resistors. The voltage of 3.5V (5V supply voltage - 1.5V LED) at the input of the IC should be sufficient to generate a HIGH.

Conclusion

A fascinating IC. Very diverse in its function. With it, by using all the gates, one can create other basic logic functions such as AND, NOR, OR, NOT, and even higher logic functions like an R/S flip-flop.

Related Posts

Sources

https://de.wikipedia.org/wiki/7400

TTL Code Database

https://www.elektronik-kompendium.de

https://sourceforge.net/projects/circuit (Logic Sim, I use it for my drawings)

LogiSim – Circuit simulator

https://logigator.com/editor

Log

DateDescription
16.05.2024Entry created
18.05.2024Pictures taken, circuit assembled and tested.
24.05.2024Error corrected and link to TTL IC inserted. Logic circuits added.
25.05.2024Live
30.05.2024An RS flip-flop can be implemented using NAND gates. Board soldered.
31.05.2024Added RS-FlipFlop and made a few marginal improvements.
01.06.2024XOR and XNOR added. Photos of the circuit board added.
LOG

Leave a Reply

Your email address will not be published. Required fields are marked *