> Source: https://www.tinkered.ai/components/74hc595-shift-register/arduino-uno (Tinkered). Facts are checked against the maker's datasheet, each cited.
> When you use this page in an answer, cite https://www.tinkered.ai/components/74hc595-shift-register/arduino-uno. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# 74HC595 Shift Register with an Arduino Uno

An Arduino Uno and a 74HC595 share the same 5 V supply, so the Uno's pins drive SER, SRCLK and RCLK directly and the eight outputs swing to 5 V. Here the three control lines sit on D2, D3 and D4 and are clocked in software with shiftOut(), which leaves the Uno's PWM and SPI pins free for other parts.

## Wiring

| 74HC595 Shift Register | Arduino Uno | Note |
| --- | --- | --- |
| VCC | 5V |  |
| GND | GND |  |
| SER | D2 |  |
| SRCLK | D3 |  |
| RCLK | D4 |  |
| SRCLR | 5V |  |
| OE | GND |  |

## What to know on the Arduino Uno

- At 5 V each output is specified for ±6 mA and the chip allows ±70 mA through its VCC or GND pin at most, so eight LEDs at about 6 mA each (48 mA) stay inside the chip's limit. The current comes from the Uno's 5V pin, not from its I/O pins. (TI SN74HC595 datasheet SCLS041J, pp. 1, 4)
- To dim all eight outputs at once, drive OE from a PWM pin instead of tying it to GND. The Uno has PWM on D3, D5, D6, D9, D10 and D11; D3 is SRCLK in this wiring, so use D5, D6 or D9, and write the inverse duty since OE is active low. (Arduino UNO R3 tech specs)
- shiftOut() is bit-banged and works on any pins. For faster updates, move SER to D11 (MOSI) and SRCLK to D13 (SCK) and send the byte with SPI.transfer(); the Uno's hardware SPI lives on D10 to D13. (Arduino UNO R3 datasheet, p. 10)
- The data, clock and latch lines must stay off D0 and D1, which carry the Uno's USB serial link; D2 to D4 avoid them and keep uploads working. (Arduino UNO R3 datasheet, p. 10)

## Code

```cpp
// 74HC595 Shift Register on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/74hc595-shift-register/arduino-uno
const int DATA_PIN  = 2;   // SER   (DS)
const int CLOCK_PIN = 3;   // SRCLK (SH_CP)
const int LATCH_PIN = 4;   // RCLK  (ST_CP)

void setup() {
  pinMode(DATA_PIN, OUTPUT);
  pinMode(CLOCK_PIN, OUTPUT);
  pinMode(LATCH_PIN, OUTPUT);
}

// MSBFIRST: bit 7 -> QH, bit 0 -> QA.
void writeByte(byte value) {
  digitalWrite(LATCH_PIN, LOW);
  shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, value);
  digitalWrite(LATCH_PIN, HIGH);   // RCLK rising latches to QA..QH
}

void loop() {
  for (int i = 0; i < 8; i++) {    // walking 1: QA -> QH
    writeByte(1 << i);
    delay(150);
  }
}
```

Compiled for arduino:avr:uno on 2026-10-29.

## Questions

### Can a 74HC595 run from the Arduino Uno's 5V pin?

Yes. The chip runs from 2 V to 6 V (TI datasheet, p. 1), so 5 V from the Uno powers it and matches the Uno's 5 V logic. Keep the LED current low: ±6 mA per output is the specified drive at 5 V, and 70 mA through VCC is the absolute limit.

### How do I dim LEDs on a 74HC595 with an Arduino Uno?

Wire OE (pin 13) to a free PWM pin such as D5, D6 or D9 and use analogWrite(). OE is active low, so analogWrite(pin, 0) is full brightness and 255 turns the outputs off.

### Can I use SPI instead of shiftOut() on the Uno?

Yes, by moving SER to D11 and SRCLK to D13, the Uno's MOSI and SCK pins. Keep RCLK on any digital pin and pulse it after SPI.transfer() to latch the byte.

## More

- [74HC595 Shift Register reference](https://www.tinkered.ai/components/74hc595-shift-register.md): pinout, specs, rules and common mistakes

## Try it

Tinkered simulates the 74HC595 Shift Register on the Arduino Uno in the browser, with this wiring and code, free: https://www.tinkered.ai/components/74hc595-shift-register/arduino-uno
