Learn › Topic 13
From the logic diagram to the breadboard with 74HC chips
8 min read · bitGateLab Team
A circuit that works in the diagram can fail on the breadboard because of details the diagram does not show: a split power rail, a chip inserted backwards, a floating input or an LED with no resistor. Here you will see how a breadboard is connected inside, how to read the pinout of a 14-pin 74HC DIP chip, how to calculate the resistor for an LED and how to debug methodically.
How a breadboard is connected
Under the holes there are metal strips that join groups of holes together. The typical layout is:
- Terminal strips: numbered rows (1, 2, 3…) and lettered columns (a to j). In each row, the five holes a, b, c, d, e are joined together, and so are the five holes f, g, h, i, j, but the two groups are separate.
- Center channel: the gap between columns e and f. DIP chips are placed straddling it, so that each pin lands in a different row with four free holes for connecting wires.
- Power rails: the long lines along the sides, marked + and −. They run the length of the breadboard. On many long breadboards they are interrupted in the middle; if you see a break in the painted line, join the two halves with a wire.
Pinout of a 14-pin DIP chip
Look at the chip from above with the notch (or the dot) facing up or to the left. Pin 1 is next to the notch, and the numbering continues counterclockwise: 1 to 7 going down one side and 8 to 14 going up the other. Pin 14 sits opposite pin 1.
On most 14-pin logic chips the power pins are at opposite corners: pin 14 = VCC and pin 7 = GND. The chips with four 2-input gates share the same pinout:
| Chip | Function | Gate 1 | Gate 2 | Gate 3 | Gate 4 |
|---|---|---|---|---|---|
| 74HC00 | NAND | A=1, B=2, Y=3 | A=4, B=5, Y=6 | A=9, B=10, Y=8 | A=12, B=13, Y=11 |
| 74HC08 | AND | ||||
| 74HC32 | OR | ||||
| 74HC86 | XOR |
Watch out for the exceptions. The 74HC02 (four NOR gates) has its outputs on pins 1, 4, 10 and 13, and the 74HC04 (six inverters) uses the input/output pairs 1→2, 3→4, 5→6, 9→8, 11→10 and 13→12. Before wiring any chip, confirm its pinout in the datasheet.
Current-limiting resistors for LEDs
An LED connected straight to an output would draw all the current the output can supply, which damages the LED or the chip. The series resistor sets the current:
R = (Vout − Vf) / I
where Vf is the LED's forward voltage drop (about 2 V for common red, yellow and green LEDs; about 3 V for blue and white). 74HC outputs are specified to deliver around 4 mA while keeping valid logic levels; asking for more pulls the output voltage away from VCC or GND.
Example: a red LED (Vf = 2 V) on a 74HC output powered at 5 V, with a target of 4 mA.
- R = (5 − 2) / 0.004 = 750 Ω.
- The next standard value up is chosen, 820 Ω.
- Actual current: I = 3 / 820 ≈ 3.7 mA, within the limit and enough to see the LED clearly.
With 330 Ω the current would be 3 / 330 ≈ 9.1 mA, more than twice what is specified for keeping valid levels.
For an LED that lights on a logic 1: output → resistor → anode (long lead) → cathode (short lead, flat side) → GND.
Unconnected inputs
A CMOS input has an extremely high impedance. If you leave it floating it reads neither "0" nor "1": it picks up any voltage from noise or stored charge, may sit halfway between the two levels and can make the gate oscillate or draw more current than normal. Therefore:
- For a switch, use a 10 kΩ resistor to GND (pull-down) and the switch to VCC, or else a resistor to VCC (pull-up) and the switch to GND. Without the resistor, the open switch leaves the input floating.
- Gates you do not use keep their inputs tied to GND or to VCC; their outputs are left open, never connected to GND or to VCC.
Decoupling capacitors
When it switches, a gate draws a brief pulse of current that the inductance of the wires does not let arrive in time from the power supply, and the voltage at the chip dips for an instant. The remedy is a 100 nF ceramic capacitor between VCC and GND, as close as possible to pins 14 and 7 of each chip, which supplies that current locally. It is also a good idea to put an electrolytic capacitor of 10 to 100 µF where the power enters the breadboard, observing its polarity.
From the diagram to the wiring
Example: F = A·B + C with a 74HC08 and a 74HC32.
- Place the 74HC08 across the channel, with the notch towards the lower-numbered rows. If pin 1 lands in row 10, pin 7 lands in row 16 and pin 14 lands in row 10, on the other side of the channel.
- Connect pin 14 to the + rail and pin 7 to the − rail. Repeat with the 74HC32. Put a 100 nF capacitor next to each chip.
- A to pin 1 and B to pin 2 of the 74HC08. Its pin 3 (A·B) goes to pin 1 of the 74HC32.
- C to pin 2 of the 74HC32. Pin 3 of the 74HC32 is F: connect it to an 820 Ω resistor and an LED to GND.
- On both chips, tie the inputs of the leftover gates to GND: pins 4, 5, 9, 10, 12 and 13.
Step-by-step debugging
- Power: with a multimeter, measure the voltage directly between pins 14 and 7 of each chip, not on the rails. That way you catch a split rail or a badly seated chip.
- Orientation: check the notch on each chip. A reversed chip gets power on the wrong pins and heats up; if you notice a hot chip, disconnect the power immediately.
- Inputs: verify that every input is at the level you expect, including those of unused gates.
- Gate by gate: start at the inputs and work towards the output, comparing each node with the truth table. The first node that does not match tells you where the problem is.
- Mechanical: look for leads bent under the chip, wires that went into the neighboring row or loose jumpers.
Common mistakes
- Assuming that the power rails run the whole length of the breadboard when they are split in the middle.
- Placing a chip without straddling the center channel, which leaves opposite pins joined in the same row.
- Leaving the inputs of an open switch or of unused gates floating.
Try it in the simulator
The virtual breadboard lets you practice placement and wiring before touching real components.
- Build F = A·B + C in the circuit editor and verify its truth table.
- Switch to the virtual breadboard and place a 74HC08 and a 74HC32 across the center channel.
- Connect VCC to pin 14 and GND to pin 7 of each chip.
- Wire the inputs, the link between the chips and the output to an LED, following the list in the example.
- Change A, B and C and watch that the LED follows the truth table.
Exercises
- On a 74HC86, which pins would you use for gate 3, and what function does it perform?
Answer
Inputs on pins 9 and 10, output on pin 8. It is an XOR.
- Calculate the resistor for a green LED (Vf = 2.1 V) at 5 V with a current of 3 mA and choose a standard value.
Answer
R = (5 − 2.1) / 0.003 ≈ 967 Ω. Use 1 kΩ, which gives I = 2.9 / 1000 = 2.9 mA.
- A circuit with three 74HC chips works intermittently and fails when several gates switch at once. What would you check first?
Answer
The decoupling capacitors: a 100 nF capacitor between pins 14 and 7 of each chip, close to it. Also the supply voltage measured at the pins of each chip.
- A chip is placed with pin 1 in row 20, side e. In which row and on which side does pin 8 end up?
Answer
Pin 7 lands in row 26 on side e, and pin 8 is opposite it: row 26, side f.