Skip to content

74HC595 Tutorial

Complete 74HC595 Projects | Easily Expand Arduino Inputs and Outputs

Master the 74HC595 shift register with this complete, beginner-friendly tutorial. Learn how to expand Arduino outputs, wire the circuit, and run example projects. Includes diagrams, step-by-step instructions, and expert tips for real-world applications. Ideal for LED displays, relay control, and other projects where more I/O pins are needed.


Introduction

If you’ve ever built a project with Arduino and run out of digital pins, you’ve faced the exact challenge that the 74HC595 solves. As a shift register IC, it lets you send data serially from your microcontroller and get parallel outputs on 8 separate pins. Over the last decade, I’ve used the 74HC595 in everything from LED chasers to industrial control panels—and it has never disappointed. In this guide, we’ll go through how it works, how to connect it, and a few projects you can build today.


74hc595-pin

74HC595 Pinout and Functions.

Pin No.Pin NameFunction
1Q1Output pin 1 (bit 1 of storage register). Drives LEDs or loads.
2Q2Output pin 2 (bit 2 of storage register).
3Q3Output pin 3 (bit 3 of the storage register).
4Q4Output pin 4 (bit 4 of storage register).
5Q5Output pin 5 (bit 5 of the storage register).
6Q6Output pin 6 (bit 6 of storage register).
7Q7Output pin 7 (bit 7 of the storage register).
8GNDGround (0V reference).
9Q7’Serial data output (used for daisy-chaining to the next 74HC595).
10MRMaster Reset (Active LOW). Clears register when LOW. Usually tied to VCC for normal operation.
11SH_CPShift Register Clock. On the rising edge, data in DS is shifted into the register.
12ST_CPStorage Register Clock (Latch). On the rising edge, transfers shift register contents to output pins Q0–Q7.
13OEOutput Enable (Active LOW). When HIGH, outputs go to a high-impedance state.
14DSSerial Data Input. Data from Arduino enters here.
15Q0Output pin 0 (bit 0 of storage register).
16VCCPositive supply voltage (+5V typical).

What is the 74HC595 IC?

  • Type: 8-bit serial-in, parallel-out shift register with latch

  • Purpose: Expands microcontroller outputs without needing more pins

  • Package: 16-pin DIP or SMD

  • Voltage: Operates from 2V to 6V

  • Speed: Works reliably up to 20 MHz

How it works:

  1. Your microcontroller sends bits (0 or 1) one at a time to the chip.

  2. The chip stores these bits in its register.

  3. When the latch pin is toggled, the bits appear on the output pins simultaneously.


Advantages of Using 74HC595?

  • Expands outputs using only 3 MCU pins

  • Daisy-chainable for more outputs (8 per chip)

  • Reduces wiring clutter in large projects

  • Cost-effective (often under $0.30 per IC)

  • Compatible with Arduino, Raspberry Pi, ESP32, and more


Materials for the Project 

ComponentQuantityDescription
74HC595 IC18-bit serial-in, parallel-out shift register
Arduino Uno1Main controller
LEDs85 mm LEDs
Resistors 220Ω8Current-limiting for LEDs
Breadboard1Prototyping board
Jumper wires~15Male-to-male
USB cable1For programming Arduino
Power supply15V source

Circuit Diagram Explanation

Think of the 74HC595 as an “output expander.” Instead of dedicating 8 separate pins from your Arduino, you use only:

  • SER (DS) – Serial data in

  • SRCLK (SH_CP) – Shift register clock

  • RCLK (ST_CP) – Latch clock

Other pins:

  • OE – Output enable (active low) → connect to GND

  • MR – Master reset (active low) → connect to VCC for normal use

  • Q0–Q7 – Parallel outputs to LEDs or other loads

When data is shifted in via SER and SRCLK, it’s stored but not shown on the outputs until RCLK is toggled HIGH.


Download Circuit Diagram

Complete 74HC595 Tutorial


Step-by-Step Wiring Guide

  1. Connect VCC and GND from Arduino to the 74HC595.

  2. Connect SER to Arduino pin 11.

  3. Connect SRCLK to Arduino pin 12.

  4. Connect RCLK to Arduino pin 8.

  5. Tie OE to GND and MR to VCC.

  6. Connect Q0–Q7 through 220Ω resistors to LEDs.

  7. Upload the example sketch to Arduino.


Example Arduino Code

int latchPin = 8;

int clockPin = 12;
int dataPin = 11;
byte leds = 0;

void setup() {
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}

void loop() {
leds = 0;
for (int i = 0; i < 8; i++) {
bitSet(leds, i);
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, leds);
digitalWrite(latchPin, HIGH);
delay(200);
}
}


7 Project Ideas 

  1. LED chaser lights

  2. 7-segment display driver

  3. LED matrix controller

  4. Relay bank for automation

  5. Traffic light simulator

  6. Sensor data bar graph

  7. Custom scoreboard display


FAQs

Q1: Can I use multiple 74HC595 chips?
A: Yes, daisy-chaining lets you add more outputs.

Q2: Can it drive high-current loads?
A: Not directly—use transistors or MOSFETs for heavy loads.

Q3: Is it compatible with 3.3V logic?
A: Yes, it works from 2V to 6V.

Leave a Reply

Your email address will not be published. Required fields are marked *