74HC flip-flop and register drawer
12 chips on breadboards, powered, every input tied low and ready to rewire. There is no microcontroller in it: the simulator solves the 12 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Beginner About 25 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $21. On Mokxi they're free.
What you'll learn
- How a flip-flop stores one bit
- The difference between a latch and an edge-triggered register
- What a clock edge does to the stored value
- How JK inputs set, reset, hold and toggle
- Using reset and output enable pins
- Difficulty: Beginner
- Time: About 25 minutes
- Parts: 18
How it works
This is a drawer of 12 chips on three breadboards: JK flip-flops, D flip-flops, registers and latches. Each has 5 V on VCC and ground on GND.
Every input is wired to ground, so nothing floats. Nothing else is connected, and no code runs, because there is no microcontroller.
You pick a chip, move a data wire to the plus rail, then give the clock or latch pin a pulse by moving its wire up and back down. Put an LED and a resistor on an output to see what the chip remembers.
Parts list
18 parts, plus the jumper wires. They retail for about $21; on Mokxi they're free.
- 3 × Full-size breadboard
- 3 × Power, 5 V
- 1 × 74HC73 dual JK flip-flop
- 1 × 74HC76 dual JK flip-flop
- 1 × 74HC107 dual JK flip-flop
- 1 × 74HC112 dual JK flip-flop
- 1 × 74HC173 4-bit register
- 1 × 74HC174 hex D flip-flop
- 1 × 74HC175 quad D flip-flop
- 1 × 74HC273 octal D flip-flop
- 1 × 74HC373 octal latch
- 1 × 74HC374 octal register
- 1 × 74HC573 octal latch
- 1 × 74HC574 octal register
Wiring table
Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.
| Part and pin | Connects to |
|---|---|
| 74HC73 dual JK flip-flop pin VCC | 5 V |
| 74HC76 dual JK flip-flop pin VCC | 5 V |
| 74HC107 dual JK flip-flop pin VCC | 5 V |
| 74HC112 dual JK flip-flop pin VCC | 5 V |
| 74HC173 4-bit register pin VCC | 5 V |
| 74HC73 dual JK flip-flop pin 1CP | Ground |
| 74HC73 dual JK flip-flop pin 1R | Ground |
| 74HC73 dual JK flip-flop pin 1K | Ground |
| 74HC73 dual JK flip-flop pin 2CP | Ground |
| 74HC73 dual JK flip-flop pin 2R | Ground |
| 74HC73 dual JK flip-flop pin 2J | Ground |
| 74HC73 dual JK flip-flop pin 2K | Ground |
| 74HC73 dual JK flip-flop pin GND | Ground |
| 74HC73 dual JK flip-flop pin 1J | Ground |
| 74HC76 dual JK flip-flop pin 1CP | Ground |
| 74HC76 dual JK flip-flop pin 1SD | Ground |
| 74HC76 dual JK flip-flop pin 1RD | Ground |
| 74HC76 dual JK flip-flop pin 1J | Ground |
| 74HC76 dual JK flip-flop pin 2CP | Ground |
| 74HC76 dual JK flip-flop pin 2SD | Ground |
| 74HC76 dual JK flip-flop pin 2RD | Ground |
| 74HC76 dual JK flip-flop pin 2J | Ground |
| 74HC76 dual JK flip-flop pin 2K | Ground |
| 74HC76 dual JK flip-flop pin GND | Ground |
| 74HC76 dual JK flip-flop pin 1K | Ground |
| 74HC107 dual JK flip-flop pin 1J | Ground |
| 74HC107 dual JK flip-flop pin 1K | Ground |
| 74HC107 dual JK flip-flop pin GND | Ground |
| 74HC107 dual JK flip-flop pin 2J | Ground |
| 74HC107 dual JK flip-flop pin 2CP | Ground |
| 74HC107 dual JK flip-flop pin 2R | Ground |
| 74HC107 dual JK flip-flop pin 2K | Ground |
| 74HC107 dual JK flip-flop pin 1CP | Ground |
| 74HC107 dual JK flip-flop pin 1R | Ground |
| 74HC112 dual JK flip-flop pin 1CP | Ground |
| 74HC112 dual JK flip-flop pin 1K | Ground |
| 74HC112 dual JK flip-flop pin 1J | Ground |
| 74HC112 dual JK flip-flop pin 1SD | Ground |
| 74HC112 dual JK flip-flop pin GND | Ground |
| 74HC112 dual JK flip-flop pin 2SD | Ground |
| 74HC112 dual JK flip-flop pin 2J | Ground |
| 74HC112 dual JK flip-flop pin 2K | Ground |
| 74HC112 dual JK flip-flop pin 2CP | Ground |
| 74HC112 dual JK flip-flop pin 2RD | Ground |
| 74HC112 dual JK flip-flop pin 1RD | Ground |
| 74HC173 4-bit register pin OE1 | Ground |
| 74HC173 4-bit register pin OE2 | Ground |
| 74HC173 4-bit register pin CP | Ground |
| 74HC173 4-bit register pin GND | Ground |
| 74HC173 4-bit register pin E1 | Ground |
| 74HC173 4-bit register pin E2 | Ground |
| 74HC173 4-bit register pin D3 | Ground |
| 74HC173 4-bit register pin D2 | Ground |
| 74HC173 4-bit register pin D1 | Ground |
| 74HC173 4-bit register pin D0 | Ground |
| 74HC173 4-bit register pin MR | Ground |
| 74HC174 hex D flip-flop pin VCC | 5 V |
| 74HC175 quad D flip-flop pin VCC | 5 V |
| 74HC273 octal D flip-flop pin VCC | 5 V |
| 74HC373 octal latch pin VCC | 5 V |
74 more connections: open it in the simulator to see them all.
The notes that come with it
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// 74HC flip-flop and register drawer.
//
// Every chip is on a breadboard and powered, and every one of its inputs is
// tied low by a wire to a ground rail, so nothing floats. Nothing else is
// wired: pick a chip, move an input's wire to the + rail, put an LED with a
// resistor on an output, and see what it does. Each chip's help page has its
// pins and its truth table.
Troubleshooting
The usual mistakes with this circuit, and the fix for each.
- The output does not change when you set a data input. This project
A flip-flop only copies its input on a clock edge. Move the clock wire to the plus rail, which is the rising edge, to load the value. - A latch or register output stays off. This project
Check the output enable (OE) and reset (MR) pins. The help page says which level each one needs. - The flip-flop does not toggle. 74HC73 dual JK flip-flop
Hold J and K high to toggle on each falling clock edge. Make sure the reset input is not held low, since reset is active low and overrides the clock. - The output changes at the wrong time. 74HC73 dual JK flip-flop
It triggers on the falling edge of the clock. Use a clean clock, not a bouncing switch, and tie unused inputs to a level. Add a 100 nF cap near the supply pin. - The flip-flop output starts in a random state. 74HC76 dual JK flip-flop
PRE and CLR are active low and work any time. Tie them high when unused, or pulse one low to set the starting state. - It changes at the wrong time or races. 74HC76 dual JK flip-flop
It clocks on the falling edge of the clock. Tie J and K high to toggle. Use a clean clock and a 0.1 uF decoupling capacitor. - The chip does nothing or acts randomly. The supply pins are not where you expect. 74HC107 dual JK flip-flop
On the 74HC107 power is at a corner: VCC on pin 14 and GND on pin 7. Add a 100 nF capacitor close to them. Supply can be 2 to 6 V. - The flip-flop never toggles, or it sticks. 74HC107 dual JK flip-flop
Clear is active low, so tie it high when not used. The clock is falling edge triggered. Tie J and K high to toggle, and do not leave any input floating.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.