Find file History

Demonstrates using a shift register to create a simple animation with 16 LEDs, while only using 3 GPIO pins of the Raspberry Pi.

Raspberry Pi connected to a shift register

Watch a demonstration video

The example should run on the Raspberry Pi Debian Squeeze distro, with the standard Python and no additional libraries.


I used the Texas Instruments TLC5925 Shift Register, which I had conveniently mounted on a breakout board available from SparkFun.

Refer to the eLinux Low Level Peripherals page for pin-out diagrams of the Pi.


Pi         Shift register
=======    ==============

GPIO 17 -> SDI (Data in)
GPIO 21 -> CLK (Clock)
GPIO 22 -> LE  (Latch)

# Power
5V      -> VCC
Ground  -> Ground

# In addition, you should connect the TLC5925 OE pin to Ground, to ensure the LEDs are enabled.

Just a demo! Come see more stuff at