All tutorials

3 · Outputs & actuators

Expand outputs (74HC595)

Expert25 min

Goal

Drive 8 LEDs with only 3 pins using a shift register.

Why it matters

When pins run out, you serialise: that is the principle behind every bus.

Steps

  1. 01Wire DATA, CLOCK and LATCH to 11, 12 and 8.
  2. 02Pull LATCH LOW, send a byte with shiftOut(), pull LATCH HIGH again.
  3. 03Scroll the bits with shifts (1 << i).

This tutorial runs inside the Circuitly simulator: your wiring and your code are checked automatically at every step.

Next tutorials