Shift Reg
A shift register serialises or de-serialises data. A serial-in/parallel-out (SIPO) type, like the 74HC595, lets a microcontroller drive 8 (or more) output lines using only three GPIO pins. A parallel-in/serial-out (PISO) type reads multiple inputs and sends them serially.
A chain of storage stages moves data one position on each active clock event. Serial-in/parallel-out and parallel-in/serial-out versions solve different interface problems. Devices such as the 74HC595 add a separate output-storage register so outputs can be updated after shifting; not every shift register has that extra latch. Check the selected part's clock edge, enable, reset and output-drive requirements.
In plain terms
A post-office queue of flip-flops: data enters at the back one bit at a time and shuffles forward with each clock pulse until every position holds a bit, then all the bits appear on their output pins simultaneously.
Why designers use it
- Drive a 16-LED bargraph from two microcontroller pins via a chain of 74HC595s.
- Scan a keyboard matrix with far fewer GPIO lines than keys.
- Interface SPI-based DACs and ADCs where data is serialised on the bus.
- Extend output or input pin count with no additional I²C bus overhead.
Best for
- GPIO expansion
- LED drivers
- SPI peripheral
Key specifications
- Logic family: 74HC, 74AHC, 74LV
- Stages: 8 (74HC595) – 32 (cascade)
- Clock frequency: Up to 100 MHz
- Drive current: 6 – 35 mA per output
- Supply: 2 V – 6 V
When not to use it
- When you need to update individual outputs at high speed — each update requires shifting all N bits, introducing latency proportional to N.
- When an I²C port expander would be simpler and the extra pins aren't worth the register's clocking overhead.
Common mistakes
- Forgetting the storage register latch — without latching, the outputs ripple while data is shifting and the LEDs flash briefly on every update.
- Chaining too many 74HC595s without buffering the clock and data signals, causing signal degradation past the fifth or sixth chip.
Where you will find it
- A scoreboard's seven-segment display uses a daisy-chain of six 74HC595 shift registers to drive 48 segments from a single three-wire SPI bus: the microcontroller shifts out 48 bits in 48 clock pulses and then latches them, refreshing all digits simultaneously.
- A pinball machine's solenoid driver board uses shift registers to address 32 coils from four microcontroller pins: the MCU shifts the coil command down the chain and latches, firing the exact bumper or flipper solenoid needed for each game event.
- A digital musical instrument's LED ring indicator uses a 74HC595 chain to light whichever of 24 position LEDs corresponds to the encoder's angle: the MCU computes the position and shifts one hot-bit down the register chain, creating a spinner effect that follows the knob with no additional driver ICs.
A short history
A shift register is a digital circuit made of a cascade of flip-flops sharing a single clock, where each flip-flop's output feeds the next one's input. On each clock pulse, stored bits shift one position down the chain. This design is commonly used to convert data between serial and parallel formats, and simple serial-in serial-out versions can also serve as delay circuits.
Good to know
- A serial-in/parallel-out register trades fewer controller connections for time spent clocking in the bits.
- A separate output latch can keep displayed outputs unchanged while the next pattern is being shifted in.
- A parallel-in/serial-out register performs the opposite interface conversion: many input states become a serial stream.