74HC shift register and counter 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 20 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $23. On Mokxi they're free.
What you'll learn
- Why unused logic inputs must be tied high or low
- How a shift register moves bits one clock at a time
- How binary and decade counters count clock pulses
- Using a chip's truth table to plan its wiring
- Difficulty: Beginner
- Time: About 20 minutes
- Parts: 18
How it works
This is a parts drawer, not a finished circuit. Eleven chips sit on three breadboards, each one powered from a 5 V supply. Every input is tied to ground with a wire, so nothing floats.
The set has four shift registers (74HC164, 74HC166, 74HC597, TPIC6B595) and seven counters (74LS90, 74LS93, 74HC390, 74HC393, 74HC190, 74HC191, 74HC192). Nothing else is wired. You choose a chip, move one input wire to the 5 V rail, and watch what it does.
Parts list
18 parts, plus the jumper wires. They retail for about $23; on Mokxi they're free.
- 3 × Full-size breadboard
- 3 × Power, 5 V
- 1 × 74HC164 shift register
- 1 × 74HC166 shift register
- 1 × 74HC597 shift register
- 1 × TPIC6B595 power shift register
- 1 × 74LS90 decade counter
- 1 × 74LS93 binary counter
- 1 × 74HC390 dual decade counter
- 1 × 74HC393 dual 4-bit counter
- 1 × 74HC190 up/down decade counter
- 1 × 74HC191 up/down binary counter
- 1 × 74HC192 up/down decade counter
- 1 × 74HC194 universal shift 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 |
|---|---|
| 74HC164 shift register pin VCC | 5 V |
| 74HC166 shift register pin VCC | 5 V |
| 74HC597 shift register pin VCC | 5 V |
| TPIC6B595 power shift register pin VCC | 5 V |
| 74LS90 decade counter pin VCC | 5 V |
| 74HC164 shift register pin DSA | Ground |
| 74HC164 shift register pin DSB | Ground |
| 74HC164 shift register pin GND | Ground |
| 74HC164 shift register pin CP | Ground |
| 74HC164 shift register pin MR | Ground |
| 74HC166 shift register pin DS | Ground |
| 74HC166 shift register pin D0 | Ground |
| 74HC166 shift register pin D1 | Ground |
| 74HC166 shift register pin D2 | Ground |
| 74HC166 shift register pin D3 | Ground |
| 74HC166 shift register pin CE | Ground |
| 74HC166 shift register pin CP | Ground |
| 74HC166 shift register pin GND | Ground |
| 74HC166 shift register pin MR | Ground |
| 74HC166 shift register pin D4 | Ground |
| 74HC166 shift register pin D5 | Ground |
| 74HC166 shift register pin D6 | Ground |
| 74HC166 shift register pin D7 | Ground |
| 74HC166 shift register pin PE | Ground |
| 74HC597 shift register pin D1 | Ground |
| 74HC597 shift register pin D2 | Ground |
| 74HC597 shift register pin D3 | Ground |
| 74HC597 shift register pin D4 | Ground |
| 74HC597 shift register pin D5 | Ground |
| 74HC597 shift register pin D6 | Ground |
| 74HC597 shift register pin D7 | Ground |
| 74HC597 shift register pin GND | Ground |
| 74HC597 shift register pin MR | Ground |
| 74HC597 shift register pin SHCP | Ground |
| 74HC597 shift register pin STCP | Ground |
| 74HC597 shift register pin PL | Ground |
| 74HC597 shift register pin DS | Ground |
| 74HC597 shift register pin D0 | Ground |
| TPIC6B595 power shift register pin SERIN | Ground |
| TPIC6B595 power shift register pin SRCLR | Ground |
| TPIC6B595 power shift register pin G | Ground |
| TPIC6B595 power shift register pin GND | Ground |
| TPIC6B595 power shift register pin GND2 | Ground |
| TPIC6B595 power shift register pin RCK | Ground |
| TPIC6B595 power shift register pin SRCK | Ground |
| TPIC6B595 power shift register pin GND3 | Ground |
| 74LS90 decade counter pin CKB | Ground |
| 74LS90 decade counter pin R01 | Ground |
| 74LS90 decade counter pin R02 | Ground |
| 74LS90 decade counter pin R91 | Ground |
| 74LS90 decade counter pin R92 | Ground |
| 74LS90 decade counter pin GND | Ground |
| 74LS90 decade counter pin CKA | Ground |
| 74LS93 binary counter pin VCC | 5 V |
| 74HC390 dual decade counter pin VCC | 5 V |
| 74HC393 dual 4-bit counter pin VCC | 5 V |
| 74HC190 up/down decade counter pin VCC | 5 V |
| 74HC191 up/down binary counter pin VCC | 5 V |
| 74LS93 binary counter pin CKB | Ground |
| 74LS93 binary counter pin R01 | Ground |
55 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 shift register and counter 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 outputs flicker or show garbage while data is shifting. 74HC164 shift register
The 74HC164 has no output latch, so every shift shows on the pins. Use a 74HC595 if you need to hold the output, or blank the display while loading. - Nothing shifts in, or only zeros appear. 74HC164 shift register
Pins A and B are ANDed together, so tie unused one high. Data is read on the rising clock edge. Master reset (MR) is active low, so tie it to VCC. - The data does not load, or shifts out wrong. 74HC166 shift register
Set SH/LD low and clock once to load the parallel inputs. Then set it high to shift. Check the clock inhibit pin and that the master reset is high. - The bits come out in a surprising order. 74HC166 shift register
The last input H comes out first at QH. Reverse your bit order in software if needed. Tie unused inputs to a level and decouple the supply. - The shifted data is wrong or arrives in the wrong order. 74HC597 shift register
Data is first sampled into the input register by the input clock, then loaded to the shift register with its own latch, then shifted out. Pulse them in the right order, and watch the bit order (MSB first or LSB first). - The chip ignores clocks or gives random output. 74HC597 shift register
Hold the clear pin (active low) high and the output enable correctly. Never leave the control inputs floating. Add a 0.1 uF decoupling capacitor between VCC and GND. - The LED or load does not light when you connect it from the output to ground. TPIC6B595 power shift register
Outputs sink current, like open drain. Connect the load from the supply (up to 50 V) to the output pin. Add a resistor for LEDs. A high bit turns that output on. - No outputs respond. TPIC6B595 power shift register
G (output enable) is active low, so tie it to GND. SRCLR is active low, so tie it to VCC. Shift data in with SRCK, then pulse RCK to latch it to the outputs.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.