30 Days Lost in Space → Help Center

Circuits

Shift Register: Pin Expansion

Control 8+ outputs using only 3 Arduino pins. Shift registers expand your I/O capacity for LED arrays and multi-digit displays.

What is a Shift Register?

A shift register (74HC595) takes serial data (one bit at a time) and outputs it in parallel (8 pins at once). This lets you control 8 outputs using only 3 Arduino pins.

Why Use One?

The Arduino Uno/HERO only has 14 digital pins. When you need to control lots of LEDs or a multi-digit display, you quickly run out. Shift registers solve this.

Pin Connections (74HC595)

| 595 Pin | Name | Arduino Pin | |---------|------|-------------| | 14 | SER (Data) | Any digital | | 12 | RCLK (Latch) | Any digital | | 11 | SRCLK (Clock) | Any digital | | 8 | GND | GND | | 16 | VCC | 5V | | 10 | SRCLR | 5V (active low) | | 13 | OE | GND (active low) | | Q0-Q7 | Outputs | LEDs etc. |

How It Works

  1. Pull LATCH low
  2. Shift 8 bits in one at a time (MSB first)
  3. Pull LATCH high → all 8 outputs update simultaneously

Arduino's shiftOut() function handles the bit-shifting:

shiftOut(dataPin, clockPin, MSBFIRST, byte);

Chaining

You can daisy-chain multiple 595s by connecting Q7' (pin 9) to SER of the next chip. This gives you 16, 24, 32+ outputs using the same 3 pins!