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.
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:
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”.
This Post / Project can also be found using search terms:
- using arduino nano with serial to parallel chips
- arduino uno memory storage projects
- arduino uno shift register progrram
- how to connect 5x5x5 led cube to shift registers