bitGateLab Digital · Learn
English
Open the simulator

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:

Quick rule: two terminals are connected only if they are in the same row and on the same side of the channel, or on the same rail (and in the same half, if the rail is split). Everything else needs 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.

123 456 7 141312 11109 8 74HC00 1A1B1Y 2A2B2Y GND VCC4B4A 4Y3B3A 3Y
74HC00 (four 2-input NAND gates) seen from above. Each gate n has inputs nA, nB and output nY.

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:

ChipFunctionGate 1Gate 2Gate 3Gate 4
74HC00NANDA=1, B=2, Y=3A=4, B=5, Y=6A=9, B=10, Y=8A=12, B=13, Y=11
74HC08AND
74HC32OR
74HC86XOR

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.

  1. R = (5 − 2) / 0.004 = 750 Ω.
  2. The next standard value up is chosen, 820 Ω.
  3. 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:

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.

  1. 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.
  2. 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.
  3. A to pin 1 and B to pin 2 of the 74HC08. Its pin 3 (A·B) goes to pin 1 of the 74HC32.
  4. 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.
  5. On both chips, tie the inputs of the leftover gates to GND: pins 4, 5, 9, 10, 12 and 13.

Step-by-step debugging

  1. 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.
  2. 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.
  3. Inputs: verify that every input is at the level you expect, including those of unused gates.
  4. 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.
  5. Mechanical: look for leads bent under the chip, wires that went into the neighboring row or loose jumpers.

Common mistakes

Try it in the simulator

The virtual breadboard lets you practice placement and wiring before touching real components.

  1. Build F = A·B + C in the circuit editor and verify its truth table.
  2. Switch to the virtual breadboard and place a 74HC08 and a 74HC32 across the center channel.
  3. Connect VCC to pin 14 and GND to pin 7 of each chip.
  4. Wire the inputs, the link between the chips and the output to an LED, following the list in the example.
  5. Change A, B and C and watch that the LED follows the truth table.

Exercises

  1. 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.

  2. 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.

  3. 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.

  4. 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.