16 LEDs on Daisychained shift registers - Go4itOttersoft/Ottersoft_Arduino_projects GitHub Wiki

Two daisychained shift registers steer 16 LEDs

In this project, two daisychained 74HC595N shift registers steer 16 LEDs. The pattern of the leds is given in the initialiser of the global variable named 'leds'. After latching, the MSB is in the first shift register and the LSB in the second. The LEDs light up very much like the famous Night Rider's KITT car. When the pattern hits the final or first LED, the direction of the shifting changes from up to down or vice versa. The shift register attached to the Arduino gets the LSB first, and shifts it to the second when the MSB is shifted in it. Only after that the latch is done.

Pin 4 is the data pin. It goes into pin 14 of the first 74HC595N named DS. Pin 5 is the latch pin. It goes into pins 12 of both shift registers named RCLK. Pin 6 is the clock pin. It goes into pins 11 of both shift registers named CRCLK.

To daisychain the two 74HC595N, connect pin 9 named Q_H' of the first to pin 14 named DS on the second shift register. The output pins of the shift registers is fed to the 16 LEDs via 1K resistors. I have run this code on an Arduino UNO, but it is likely to work on other Arduino devices with little changes. Feel free to share your experiences. Happy coding!

Kind regards, Go4it from Ottersoft

January 8th 2016