How to Use Shift Register 74HC595 with Arduino Uno?

In ARDUINO we have 20 I/O pins, so we can program 20 pins of UNO to be used as either input or output. Although there are more pins on ATMEGA328P controller than on UNO, this is because while designing the board some pins are defaulted. Now for some applications we need more than 30 pins, say if we want to design a 5x5x5 LED CUBE, so for this we need 5×5+5=30pins. For such cases we use serial to parallel converter chips or shift register. A shift register chip takes data from UNO board serially and gives output in 8 bit parallel configuration.

Arduino-Uno-Shift-Register

Components Required

Hardware: Arduino uno board, connecting pins, 220Ω resistor, LED (eight pieces), 74HC595 IC, bread board.

Sofware: Arduino nightly

Circuit Diagram and Working Explanation

Here we are going to send data in eight bit size through a single channel to shift register. The shift register takes the data serially and stores that data in its memory. Once the data is sent by the controller, we are going to send a command to shift register to show the data at the output, with this command the shift register puts out data parallel.

This output is shown by eight LED connected at output.

For connecting the shift register to Arduino UNO we need to do two things:

  1. pinMode();
  2. shiftOut(dataPin, clockPin, data);

First we need to set any three pins of UNO as output. Then we need to connect digital pin, clock pin and latch pin to these three output pins. After that we need to tell the UNO which pin of chip is connected to UNO board pins. This is done by simple writing in command “shiftOut(dataPin, clockPin, data);”. The data here can be in binary or decimal or hexadecimal.  The eight bit information which needs to be sent is written in place of “data”.

Read More:  How to Use Shift Register 74HC595 with Arduino Uno?


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top