Arduino Basic Input Output Circuits
Digital Out - Run out of Pins? Using Multiple Shift Register ICs
So the first Shift Register example showed how you can control 8 output pins with 3 Arduino Digital Pins
In this example we will use 2 x 74HC595 Shift Registers to control 16 Digital outs (in this case drive LED's) using the same 3 Arduino DO pins.
This example will also add 3 additional LEDs to monitor the Data entering the 1st Shift Register, the 2nd Shift Register and the common clock.
Again my specific hardware is the Arduino Duemilanove platform, but the concept is the same regardless of the exact platform.
Before continuing make sure you have read and understand the warning notice here.
19x Resistor (560Ohm)
2x 74HC595 Shift Register
This circuit diagram for this example is shown below;
The Enable pins and the Reset pins on each Shift Register are active LOW, this means that the Enable must be tied to 0v and the Reset held at the Vcc level.
The Shift Registers used will provide Vcc at the outputs of Q0 to Q7 and has a supply current in the region of 20mA.
The Overflow/SerialOut pin on the 1st Shift Register will pass the serial data onto the 2nd Shift Register. You could go on and extend this further should you so wish.
Something extra to try;
Once you have uploaded one of the code examples and got your circuit working, if you disconnect the data line from the 1st Shift Register (Pin 9) and connect to the same source data line from the Arduino, you will see the second shift register LED's copy the 1st Shift Register, demonstrating that the bytes are being passed through correctly. Remember to put it back again after you have satisfied yourself that this is happening.
You can also see on the Extra 3 LED's that the data lines are indeed doing different things and the clock is a constant pulse.
Upload any of the following code examples to the Arduino to do the relevant example;