3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

The 74HC164 Shift Register and your Arduino

Step 2Basic wiring and operation

Basic wiring and operation
Wiring
The 74HC164 is a 14 pin chip, it has 4 input pins, 8 output pins, power and ground, so lets start from the top.

Pins 1 and 2 are both serial inputs, they are setup as a logical AND gate, meaning that they both have to be logic high (ie 5 volts) in order for the bit to be seen as a 1, a low state (0 volts) on either will read as a zero.  We dont really need this and its easier to deal with in software, so choose one and tie it to V+ so it always reads high. I choose to use a jumper from pin 1 to pin 14 (V+) since you can just pop a breadboard jumper over the chip. The one remaining serial input (pin 2 in my schematics) will goto digital pin 2 of the arduino.

Pins 3,4,5,and 6 of the 74HC164 are the first 4 bytes of output

Pin 7 connects to ground

Jumping to the right, pin 8 is the clock pin, this is how the shift register knows the next serial bit is ready for it to read, this should be connected to digital pin 3 on the arduino.

Pin 9 is to clear the entire register at once, if it goes low, you have the option to use it, but nothing in this inscrutable does, so tie it to V+

pins 10, 11 12 and 13 are the last 4 bytes of output

pin 14 is the chips power

Operation
First you need to set the serial input of the register (digital pin 2 on the arduino) high or low, next you need to flip the clock pin (digital pin 3) from low to high, the shift register will read the data on the serial input and shift the output pins by 1, repeat 8 times and you have set all 8 outputs.

This can be done by hand with for loops and digital writes in the arduino IDE, but since this is a very common hardware level communications (SPI) they have a single function that does it for you.

shiftOut(dataPin, clockPin, bitOrder, value)

Just tell it where the data and clock pins are connected to the arduino, which way to send the data and what to send, and its taken care of for you (handy)

« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
57
Followers
13
Author:osgeld