When working with Arduino, you’ll often find yourself running out of GPIO (General Purpose Input/Output) pins, especially when connecting multiple devices such as LEDs, sensors, or modules. To overcome this limitation and expand the number of output or input pins, shift registers are a reliable and efficient solution.
Understanding Shift RegistersShift registers are digital memory circuits found in many microcontrollers and digital systems. They are mainly of two types:
- SIPO (Serial-In Parallel-Out) – Used to increase the number of output pins. Example: 74HC595.
- PISO (Parallel-In Serial-Out) – Used to increase the number of input pins. Example: 74HC165.
In this article, we’ll focus on the 74HC595, one of the most widely used SIPO shift registers. It enables control of 8 output devices using just 3 Arduino pins. Even better, you can daisy-chain multiple 74HC595 chips to expand output control even further.
Whether you’re designing an LED matrix, controlling a display, or building a project that requires multiple digital outputs, the 74HC595 is a go-to component.
Features of the 74HC595 Shift Register- 8-bit parallel output
- Serial-to-parallel data conversion
- Ability to cascade multiple ICs
- Low power consumption
- Compatible with 5V logic
- Operates between 2.0 to 6.0V
The 74HC595 IC consists of two internal registers:
Shift Register: Temporarily holds the serial data.Storage Register (Latch): Holds the final data and updates the output pins.
Data Shifting- Data is fed serially via the SER (Serial Data Input) pin.
- Each SRCLK (Shift Register Clock) pulse shifts data one bit left through the shift register.
- After loading 8 bits, a HIGH pulse to the RCLK (Latch Clock) pin transfers the data to the storage register.
- Output pins (QA to QH) reflect the data in the storage register.
If using multiple 74HC595 ICs, the QH’ (Cascade Output) of one IC connects to the SER pin of the next. This allows you to control 16, 24, or more outputs with the same 3 Arduino pins.
74HC595 Pinout and Functions
- QA to QH (Pins 15, 1–7): 8 parallel output pins.
- SER (Pin 14): Serial Data Input.
- SRCLK (Pin 11): Clock input for the shift register.
- RCLK (Pin 12): Latch Clock; moves data from shift register to output.
- OE (Pin 13): Output Enable (Active LOW). Connect to GND to enable outputs.
- SRCLR (Pin 10): Clears shift register (Active LOW). Connect to 5V for normal operation.
- QH’ (Pin 9): Cascade Output for chaining.
- VCC (Pin 16): Supply voltage (typically 5V).
- GND (Pin 8): Ground.
In this section, we will interface a 74HC595 with an Arduino UNO to control 8 LEDs.
- Connect Pin 16 (VCC) and Pin 10 (SRCLR) to 5V on Arduino
- Connect Pin 8 (GND) to Arduino GND.
- Connect Pin 13 (OE) to Pin 9 of Arduino.
- Connect Pin 14 (SER) to Pin 11 on Arduino.
- Connect Pin 11 (SRCLK) to Pin 12 on Arduino.
- Connect Pin 12 (RCLK) to Pin 10 on Arduino.
- Connect anodes of 8 LEDs to QA–QH (Pins 15, 1–7).
- Place 220-ohm resistors in series with each LED.
- Connect cathodes to GND.
To learn how to wire Multiple 74HC595 Shift Registers to an Arduino checkout: Shift Register with Arduino UNO
Comments