How-to · Intermediate · 3 min read
74HC595 Shift Register
More Outputs from Three Pins
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
The 74HC595 turns three microcontroller pins (data, clock and latch) into eight outputs, and you can chain more chips to get 16, 24 or more outputs from the same three pins. Send a byte with shiftOut, then pulse the latch so all outputs update at once. It is ideal for LED bars, 7-segment digits and relay boards, but each pin should supply only a few milliamps and the chip about 70 mA in total.
Key specs at a glance
- Outputs
- 8 per chip (QA to QH); Q7' / QH' to chain
- Control pins
- DS (data), SHCP (clock), STCP (latch); optional OE and MR
- Supply
- 2 to 6 V (works at 3.3 V and 5 V)
- Output current
- About 6 mA per pin recommended; 70 mA total
- Speed
- Tens of MHz; far faster than shiftOut needs
- Input expander
- Use a 74HC165 to read 8 inputs
Pinout and wiring
| 74HC595 pin | Name | Connect to |
|---|---|---|
| 15, 1 to 7 | QA (Q0), QB to QH (Q1 to Q7) | Outputs (LEDs through resistors) |
| 14 | DS / SER | Arduino D11 (data) |
| 11 | SHCP / SRCLK | Arduino D12 (clock) |
| 12 | STCP / RCLK | Arduino D8 (latch) |
| 13 | OE (active LOW) | GND (or a PWM pin for brightness) |
| 10 | MR / SRCLR (active LOW) | VCC |
| 16 | VCC | 5 V or 3.3 V, with a 100 nF capacitor to GND |
| 8 | GND | GND |
| 9 | QH' / Q7' | DS of the next chip when chaining |
- 15, 1 to 7
- Name:
- QA (Q0), QB to QH (Q1 to Q7)
- Connect to:
- Outputs (LEDs through resistors)
- 14
- Name:
- DS / SER
- Connect to:
- Arduino D11 (data)
- 11
- Name:
- SHCP / SRCLK
- Connect to:
- Arduino D12 (clock)
- 12
- Name:
- STCP / RCLK
- Connect to:
- Arduino D8 (latch)
- 13
- Name:
- OE (active LOW)
- Connect to:
- GND (or a PWM pin for brightness)
- 10
- Name:
- MR / SRCLR (active LOW)
- Connect to:
- VCC
- 16
- Name:
- VCC
- Connect to:
- 5 V or 3.3 V, with a 100 nF capacitor to GND
- 8
- Name:
- GND
- Connect to:
- GND
- 9
- Name:
- QH' / Q7'
- Connect to:
- DS of the next chip when chaining
Arduino code: show a pattern on 8 LEDs
const int DATA = 11, CLOCK = 12, LATCH = 8;
void write595(byte value) {
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, value);
digitalWrite(LATCH, HIGH); // outputs change together here
}
void setup() {
pinMode(DATA, OUTPUT); pinMode(CLOCK, OUTPUT); pinMode(LATCH, OUTPUT);
}
void loop() {
for (int i = 0; i < 8; i++) { // running light
write595(1 << i);
delay(120);
}
}
// Two chained chips: send the far chip's byte first, then the near one,
// all between one LOW and one HIGH on the latch.Chaining several chips
Connect QH' (pin 9) of the first chip to DS (pin 14) of the next, and share the clock and latch lines between all chips. Send one byte per chip in a row before pulsing the latch; the first byte you send ends up in the last chip. Long chains work fine, but add a 100 nF capacitor at each chip and keep clock wires short.
Current limits and bigger loads
Each output can drive one LED at about 5 mA (use 680 Ω to 1 kΩ at 5 V), and the whole chip should stay under about 70 mA. For brighter LEDs, relays or motors, let the 595 drive transistors or a ULN2003; the TPIC6B595 is a power version with open-drain outputs for 150 mA per pin. For multiplexed 7-segment displays, a dedicated driver such as the TM1637 or MAX7219 is simpler.
Try it: LED resistor calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Leaving OE floating or HIGH, so outputs stay off.
- Leaving MR floating, so the register clears randomly.
- Driving LEDs at 20 mA each and overloading the chip.
- Forgetting the latch pulse, so nothing changes.
- No decoupling capacitor, causing flicker in long chains.
Frequently asked questions
What does a 74HC595 do?
It converts serial data from three pins into eight parallel outputs, and chips can be chained for more outputs.
How many 74HC595 chips can I chain?
As many as you like in principle; dozens are common. Each extra chip adds eight outputs and one more byte to send per update.
Does the 74HC595 work with ESP32 and 3.3 V?
Yes. Power it from 3.3 V. Output current is a little lower than at 5 V.
Can a 74HC595 drive a relay?
Not directly. Use the output to switch a transistor or a ULN2003 that drives the relay coil.
How do I read more inputs?
Use a 74HC165 parallel-in serial-out shift register, which is the input counterpart of the 74HC595.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 367 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.




