Shift Register
Build a shift register that moves bits left or right on each clock pulse—used for serial communication, multiplication, and data manipulation.
Overview
A shift register is a chain of flip-flops where each one passes its value to the next on every clock pulse. Data shifts through the register like a conveyor belt. This is used for serial-to-parallel conversion (receiving serial data), multiplication/division by powers of 2, and LED displays. The 74HC595 is particularly popular for expanding microcontroller outputs.
Components Needed
- 1x SN74HC595 IC (8-bit Shift Register)
- 8x LED
- 1x Switch
- 2x Push button
- severalx Wires
Instructions
Study the 74HC595
The 74HC595 has a serial input (DS), shift clock (SHCP), storage clock (STCP), and 8 parallel outputs (Q0-Q7). It also has a serial output (Q7S) for cascading.
Wire the Shift Register
Connect power, wire a switch to the serial input, and buttons to both clock inputs. Connect 8 LEDs to the parallel outputs.
Shift Data In
Set the serial input high or low, then pulse the shift clock. Repeat 8 times to fill the register. Pulse the storage clock to transfer to outputs.
Observe the Shift Pattern
Watch how each bit moves one position with each shift clock. Your serial input pattern appears across the 8 LEDs after 8 clocks.
Challenges
- Cascade two 595s for 16-bit output
- Build a ring counter by connecting Q7S back to DS
- Create a knight rider LED chaser effect
- Use the shift register to control 8 outputs with only 3 microcontroller pins