A 74HC595 stores eight output bits. You send the bits one at a time, then pulse a latch so all outputs update together. This lets a small controller display eight status indicators while reserving pins for sensors.
Wire the chip by pin number
With power disconnected, place the DIP package across the breadboard trench. Identify pin 1 from the notch or dot and count pins using the manufacturer’s package drawing.
| Connection | Destination or purpose |
|---|---|
| 16 VCC / 8 GND | Uno 5 V / GND; fit 100 nF between them near the chip. |
| 10 SRCLR (active-low clear) | 5 V, so shifting is enabled. |
| 13 OE (active-low output enable) | GND, so outputs are enabled. |
| 14 SER / 12 RCLK / 11 SRCLK | D4 data / D5 latch / D6 clock. |
| Q0–Q7: pins 15, 1, 2, 3, 4, 5, 6, 7 | Each output through its own 1 kΩ resistor to an LED anode; each cathode to GND. |
| 9 QH′ | Leave disconnected for one chip; it can feed the next chip’s serial input. |
Use small indicator currents. Eight LEDs at a few milliamps each are a different load from eight motors. Observe the chip’s per-output and package limits; outputs are logic signals, not a power distribution system.
Upload the walking indicator
Download the complete Arduino sketch
const byte dataPin = 4, latchPin = 5, clockPin = 6;
byte pattern = 1;
unsigned long changedAt = 0;
void showPattern(byte value) {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, value);
digitalWrite(latchPin, HIGH);
}
void setup() {
pinMode(dataPin, OUTPUT); pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
showPattern(pattern);
}
void loop() {
if (millis() - changedAt >= 300) {
changedAt = millis();
pattern = pattern == 128 ? 1 : pattern << 1;
showPattern(pattern);
}
}
One LED should move along the eight positions. The output byte begins at binary 00000001, shifts left each time, and returns to the beginning after 10000000.
Shift and latch are separate jobs
shiftOut() supplies data and clock pulses. Keeping the latch low while shifting avoids showing intermediate bytes. Raising it copies the new value to the visible outputs. MSBFIRST chooses which bit travels first; changing bit order reverses the interpretation of a byte.
A 74HC165 performs a different task: it captures several inputs and shifts them out serially. Do not substitute it for a 74HC595 simply because both have “shift register” in their description.
Troubleshooting
- All outputs blank: check OE, SRCLR, supply, and LED polarity.
- Wrong pattern: verify chip orientation and the nonconsecutive Q0–Q7 pin numbers.
- Random changes: check the latch/clock distinction, bypass capacitor, and short ground wiring.
- Adding a second chip: connect QH′ to its SER, share clock and latch, and shift both bytes before latching.
Make an eight-channel “which windows are open?” display by assigning each bit to a sensor state. For a compact graphic status symbol, try a MAX7219 matrix. The TI datasheet defines the pinout and electrical limits.