Shift Register 74HC595 With Arduino Uno

by hIOTron IoT in Circuits > Arduino

4 Views, 0 Favorites, 0 Comments

Shift Register 74HC595 With Arduino Uno

arduino uno and shift register.jpg

Let's see how to use shift register with Arduino uno

Supplies

Hardware Components

Arduino uno board

connecting pins

Resistor 220 ohm

74HC595 IC

About Project

Shift register.jpg

A shift register chip gats data from the UNO board serially and provides output in an 8-bit parallel configuration.
To connect the shift register to Arduino UNO first, we require to set any three pins of UNO as output. Then we require to attach the digital pin, clock pin as well as latch pin to these three output pins.

After that, we require to tell the UNO which pin of the chip is attached to the UNO board pins. Disable latch, this indicates the chip not to display output for now. For eight times we will transfer data with clock serially, so clock high low-data-clock low- and so on. Enable latch, which will indicate the chip to show eight-bit bit data.

Run a Program

// The setup function runs once when you press reset or power the board volatile int i=0; void setup() { pinMode(2, OUTPUT); // sets the pin2 as output pinMode(1, OUTPUT); // sets the pin1 as output pinMode(0, OUTPUT); // sets the pin0 as output } void loop() { for (int i=0;i<255;i++) //if binary count is less than 255 { digitalWrite(2,HIGH); shiftOut(0,1,2,i); //send eight bit data serially for each time there is a increment digitalWrite(2,LOW); delay(500); //wait for half a second } }