Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 74HC595: Examples, Pinouts, and Specs

Image of 74HC595
Cirkit Designer LogoDesign with 74HC595 in Cirkit Designer

74HC595 Shift Register Documentation

Introduction

The 74HC595 is an 8-bit serial-in, parallel-out shift register with an output latch. It is designed to enable serial-to-parallel data conversion, allowing microcontrollers to control multiple outputs using fewer pins. This component is widely used in applications where GPIO (General Purpose Input/Output) pin limitations are a concern, such as driving LED arrays, 7-segment displays, or controlling relays.

Manufactured by Arduino, the 74HC595 (Part ID: UNO) is a versatile and cost-effective solution for expanding the output capabilities of microcontrollers like the Arduino UNO. It supports cascading, which means multiple 74HC595 chips can be connected in series to control even more outputs.

Common Applications

  • Driving LED matrices or 7-segment displays
  • Controlling relays or other high-power devices
  • Expanding GPIO pins for microcontrollers
  • Multiplexing and demultiplexing signals
  • Digital signal processing

Technical Specifications

The following table outlines the key technical details of the 74HC595 shift register:

Parameter Value
Supply Voltage (Vcc) 2V to 6V
Input Voltage (Vin) 0V to Vcc
Output Current (Iout) ±6mA per pin
Maximum Clock Frequency 25 MHz (at 4.5V)
Operating Temperature -40°C to +125°C
Propagation Delay 15 ns (typical at 5V)
Package Type DIP-16, SOIC-16, TSSOP-16

Pin Configuration and Descriptions

The 74HC595 has 16 pins, as described in the table below:

Pin Number Pin Name Description
1 Q1 Parallel output pin 1
2 Q2 Parallel output pin 2
3 Q3 Parallel output pin 3
4 Q4 Parallel output pin 4
5 Q5 Parallel output pin 5
6 Q6 Parallel output pin 6
7 Q7 Parallel output pin 7
8 GND Ground (0V)
9 Q7' Serial data output for cascading additional 74HC595 chips
10 MR (Reset) Master reset (active LOW)
11 SH_CP Shift register clock input (rising edge triggered)
12 ST_CP Storage register clock input (latch pin)
13 OE (Enable) Output enable (active LOW)
14 DS Serial data input
15 Q0 Parallel output pin 0
16 Vcc Positive supply voltage

Usage Instructions

How to Use the 74HC595 in a Circuit

  1. Power the Chip: Connect the Vcc pin to a 5V power supply and the GND pin to ground.
  2. Connect Control Pins:
    • DS (Pin 14): Connect to the microcontroller's data pin for serial input.
    • SH_CP (Pin 11): Connect to the microcontroller's clock pin to shift data into the register.
    • ST_CP (Pin 12): Connect to the microcontroller's latch pin to transfer data to the output pins.
    • OE (Pin 13): Connect to ground to enable the outputs (active LOW).
  3. Connect Outputs: Use the Q0–Q7 pins to drive LEDs, relays, or other devices.
  4. Optional Cascading: To expand outputs, connect the Q7' (Pin 9) of the first 74HC595 to the DS (Pin 14) of the next chip.

Best Practices

  • Use current-limiting resistors (e.g., 220Ω) on the output pins when driving LEDs to prevent damage.
  • Keep the clock signal clean and free of noise to ensure reliable data shifting.
  • Use decoupling capacitors (e.g., 0.1µF) between Vcc and GND to stabilize the power supply.

Example Arduino Code

The following example demonstrates how to use the 74HC595 with an Arduino UNO to control 8 LEDs:

// Define 74HC595 control pins
const int dataPin = 2;  // DS (Pin 14) - Serial data input
const int latchPin = 3; // ST_CP (Pin 12) - Latch pin
const int clockPin = 4; // SH_CP (Pin 11) - Clock pin

void setup() {
  // Set control pins as outputs
  pinMode(dataPin, OUTPUT);
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
}

void loop() {
  // Example pattern: Turn on LEDs one by one
  for (int i = 0; i < 256; i++) {
    digitalWrite(latchPin, LOW); // Disable latch to shift data
    shiftOut(dataPin, clockPin, MSBFIRST, i); // Send data to 74HC595
    digitalWrite(latchPin, HIGH); // Enable latch to update outputs
    delay(500); // Wait for 500ms
  }
}

Code Explanation

  • shiftOut(): Sends 8 bits of data to the 74HC595, one bit at a time.
  • Latch Control: The latch pin is toggled LOW to HIGH to transfer data from the shift register to the output pins.
  • Pattern: The loop cycles through values from 0 to 255, lighting up LEDs in a binary pattern.

Troubleshooting and FAQs

Common Issues

  1. Outputs Not Responding

    • Ensure the OE (Pin 13) is connected to ground (active LOW).
    • Verify the connections to the control pins (DS, SH_CP, ST_CP).
  2. Flickering Outputs

    • Check for noise on the clock signal.
    • Add decoupling capacitors near the Vcc and GND pins.
  3. Incorrect Output Pattern

    • Verify the data being sent to the shift register.
    • Ensure the clock and latch signals are properly synchronized.

FAQs

  1. Can I cascade multiple 74HC595 chips?

    • Yes, connect the Q7' (Pin 9) of one chip to the DS (Pin 14) of the next chip.
  2. What is the maximum number of chips I can cascade?

    • Theoretically unlimited, but practical limits depend on signal integrity and power supply.
  3. Do I need pull-up or pull-down resistors?

    • Not typically required, but you may use them for noise suppression on control lines.

Conclusion

The 74HC595 shift register is a powerful and flexible component for expanding the output capabilities of microcontrollers like the Arduino UNO. Its ability to perform serial-to-parallel data conversion, combined with cascading support, makes it ideal for a wide range of applications. By following the guidelines and best practices outlined in this documentation, users can effectively integrate the 74HC595 into their projects.

Explore Projects Built with 74HC595

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
STM32-Controlled LED Display with 74HC595 Shift Register and 12-Bit DAC
Image of Harry Stim Breadboard: A project utilizing 74HC595 in a practical application
This circuit uses a 74HC595 shift register to control multiple LEDs via a common ground configuration, with a microcontroller providing serial data input. It includes decoupling capacitors for stability and a 12-Bit DAC, potentially for analog signal generation or reference voltage application.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled 74HC595 Shift Register LED Driver
Image of cube: A project utilizing 74HC595 in a practical application
This circuit consists of multiple 74HC595 shift registers daisy-chained together, controlled by an Arduino UNO. The shift registers are used to expand the number of digital outputs from the Arduino, allowing for control of multiple outputs with only a few pins. The circuit likely drives an array of LEDs or similar devices, as indicated by the series resistors connected to the outputs of the shift registers.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based LED Control System with Touch Sensor and Shift Registers
Image of 8*8*8 LED CUBE: A project utilizing 74HC595 in a practical application
This circuit is a microcontroller-based LED control system using an Arduino UNO and multiple 74HC595 shift registers to drive various colored LEDs. The circuit also includes touch sensors for user input and transistors for switching, allowing for complex lighting patterns and user interaction.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO WiFi-Controlled Display and LED Interface
Image of TS Antonio: A project utilizing 74HC595 in a practical application
This circuit is designed to control multiple LEDs via a 74HC595 shift register, interfaced with an Arduino UNO with WiFi capability. It features an LCD display for user interface, a trimmer potentiometer for adjusting the display contrast, and an IR receiver for remote control functionality.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 74HC595

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Harry Stim Breadboard: A project utilizing 74HC595 in a practical application
STM32-Controlled LED Display with 74HC595 Shift Register and 12-Bit DAC
This circuit uses a 74HC595 shift register to control multiple LEDs via a common ground configuration, with a microcontroller providing serial data input. It includes decoupling capacitors for stability and a 12-Bit DAC, potentially for analog signal generation or reference voltage application.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of cube: A project utilizing 74HC595 in a practical application
Arduino-Controlled 74HC595 Shift Register LED Driver
This circuit consists of multiple 74HC595 shift registers daisy-chained together, controlled by an Arduino UNO. The shift registers are used to expand the number of digital outputs from the Arduino, allowing for control of multiple outputs with only a few pins. The circuit likely drives an array of LEDs or similar devices, as indicated by the series resistors connected to the outputs of the shift registers.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 8*8*8 LED CUBE: A project utilizing 74HC595 in a practical application
Arduino UNO-Based LED Control System with Touch Sensor and Shift Registers
This circuit is a microcontroller-based LED control system using an Arduino UNO and multiple 74HC595 shift registers to drive various colored LEDs. The circuit also includes touch sensors for user input and transistors for switching, allowing for complex lighting patterns and user interaction.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of TS Antonio: A project utilizing 74HC595 in a practical application
Arduino UNO WiFi-Controlled Display and LED Interface
This circuit is designed to control multiple LEDs via a 74HC595 shift register, interfaced with an Arduino UNO with WiFi capability. It features an LCD display for user interface, a trimmer potentiometer for adjusting the display contrast, and an IR receiver for remote control functionality.
Cirkit Designer LogoOpen Project in Cirkit Designer