Introduction: How to Make a 74HC595 Shift Resistor Circuit

Picture of How to Make a 74HC595 Shift Resistor Circuit

This is how to make a shift resistor circuit. If you are having trouble or first time users of a shift resistor this is the tutorial for you.so have some fun!

Step 1: What You Need

Picture of What You Need

You will need

1 74hc595 shift resistor

8 leds

8 resistors (any will do i think)

Lost of jumpers

Breadboard

Arduino

And that's basically it

Step 2: Shift Resistor

Picture of Shift Resistor

The picture will tell you what to do for the wires and the components

Step 3: The Code

/*

This code lights up each LED connected to a 74HC595 as determined by the binary value of a counter. *

/ Pin connected to SRCLK of 74HC595 int CLOCK = 12; // Pin connected to RCLK of 74HC595 int LATCH = 11; // Pin connected to SER of 74HC595 int DATA = 10;

byte counter = 0;

void setup() { //set pins to output so you can control the shift register pinMode(LATCH, OUTPUT); pinMode(CLOCK, OUTPUT); pinMode(DATA, OUTPUT); }

void loop() { // take the latchPin low digitalWrite(LATCH, LOW); // shift out the bits: shiftOut(DATA, CLOCK, MSBFIRST, counter); //take the latch pin high so the LEDs update: digitalWrite(LATCH, HIGH); // pause before next value: delay(100);

counter = counter + 1;

}

Step 4: Finished

So if it worked like and comment on this project bye

Comments

diy_bloke (author)2014-05-11

sadly your code comes across a bit crooked, but as far as i can see you have a mistake in it
The '/' before 'Pin connected to SRCLK' probably belongs to the '*' above in order to end the multi line comment, but then you need a '//' before 'Pin connected to'
and of course insert breaks at the proper places:

/*
This code lights up each LED connected to a 74HC595 as determined by the binary value of a counter. */
//Pin connected to SRCLK of 74HC595
int CLOCK = 12; // Pin connected to RCLK of 74HC595
int LATCH = 11; // Pin connected to SER of 74HC595
int DATA = 10;

byte counter = 0;

void setup() {
//set pins to output so you can control the shift register
pinMode(LATCH, OUTPUT);
pinMode(CLOCK, OUTPUT);
pinMode(DATA, OUTPUT);
}

void loop() {
// take the latchPin low
digitalWrite(LATCH, LOW);
// shift out the bits:
shiftOut(DATA, CLOCK, MSBFIRST, counter);
//take the latch pin high so the LEDs update:
digitalWrite(LATCH, HIGH);
// pause before next value:
delay(100);

counter = counter + 1;

}

AnderD (author)diy_bloke2017-04-24

Thank you! The other code didnt work!

diy_bloke (author)AnderD2017-04-25

My pleasure

Jedfor made it! (author)2015-10-25

Easy, Great schematic! Thanks!

Dylan91 made it! (author)2015-08-12

Awsome tutorial. That was the first time i used a shift register and it helped me a lot. Thank you and nice work:)

Zuhdan Ubay made it! (author)2015-03-03

yeah. need more instructions

Unclerojelio made it! (author)2014-05-27

Thanks for posting this. The clear, concise schematic, description and code were very helpful.

cmonster959 (author)2014-05-12

Just noting that the 74HC595 shift register is a CMOS IC, if you are not grounded the IC will short.

coolyyz (author)2014-05-11

I could be making a updated version of this

Andersv209 (author)2014-05-11

the 74HC595 chips are called shift registers not "Resistor"

coolyyz (author)Andersv2092014-05-11

i did not see that

About This Instructable

6,601views

34favorites

License:

More by coolyyz:How To Convert AC To DCHow To Make A Music PlayerHow To Make a 74HC595 Shift Resistor Circuit
Add instructable to: