hIOTron
Created August 24, 2021 © GPL3+

Shift Register 74HC595 with Arduino Uno

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

Shift Register 74HC595 with Arduino Uno

Things used in this project

Hardware components

Arduino uno board
×1
connecting pins
×1
Resistor 220 ohm
Resistor 220 ohm
×1
74HC595 IC
×1

Software apps and online services

Arduino nightly

Story

Read more

Code

Run a Program

Arduino
// 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

                }             

}

Credits

hIOTron

hIOTron

78 projects • 2 followers
hIOTron is an internet of things based company that offers an IoT Platform, products, IoT Solutions, and IoT Training.

Comments