Shift registers allow you to drive unlimited digital output pins from just a few control pins on a microcontroller or digital logic circuit.

These high-speed shift registers will each handle up to 8 independent output channels and can be daisy-chained together to create huge arrays of LEDs.

They work easily with any Arduino, Raspberry Pi or BoardX and simplify the design of both hardware and software by minimizing the number of MCU GPIOs needed to drive lots of LEDs. Plus they can also be driven using SPI hardware, minimizing software overhead.

Diagrams and Schematics:

To clear things up a bit, we've provided this handy design sample for you.

Notice that you can daisy chain the data output from one shift register to the data input of another. This means you can use something like your MCU's SPI controller to shift one long string of reversed data, like this (with blue's data coming first since it has to travel the furthest in the daisy chain): B[7]..B[0],G[7]..G[0],R[7]..R[0]

Daisy chaining the shift registers helps reduce the complexity of your code, since all the shifters will now act like one giant register with only a single set of control signals needed.

You'll want to tune the color balance with resistors so that your colors mix properly, since blue and green LEDs tend to overpower red.

Code Example:

/*
74HC595 Example Arduino Code (C++)
Written by UPGRADE INDUSTRIES
-This creates a pattern that of LEDs that scans a single
light back and forth on a shift register.
-More shift registers can be added by daisy chaining
and shifting out more data.
The Arduino Shift out library
is required for this code to work,
and is included in the SDK by default for
new sketches.
*/
// Connect to data latch (ST_CP) on 74HC595
#define DATA_LATCH (8)
// Connect to clock (SH_CP) on 74HC595
#define SERIAL_CLOCK (12)
// Connect to data innput (DS) on 74HC595
#define SERIAL_DATA (11)
//which LED should we light up?
static int bitToSet = 0;
//are we scanning left, or right?
static int inc = 1;
void setup() {
//set pins to output because they are addressed in the main loop
pinMode(DATA_LATCH, OUTPUT);
pinMode(SERIAL_DATA, OUTPUT);
pinMode(SERIAL_CLOCK, OUTPUT);
Serial.begin(9600);
Serial.println("Re-starting");
}
//Moves the LED to one to the left or right
//and changes direction at each end
void loop() {
//move left
if( bitToSet == 7){
inc = -1;
}
else if(bitToSet == 0){
//the move right
inc = 1;
}
//update the register
bitToSet+=inc;
registerWrite(bitToSet, HIGH);
delay(250);
}
// This method sends bits to the shift register:
void registerWrite(int whichLED, int whichState) {
// the bits you want to send
byte bitsToSend = 0;
// turn off the output so the pins don't light up
// while you're shifting bits:
digitalWrite(DATA_LATCH, LOW);
// turn on the next highest bit in bitsToSend:
bitWrite(bitsToSend, whichLED, whichState);
// shift the bits out:
shiftOut(SERIAL_DATA, SERIAL_CLOCK, MSBFIRST, bitsToSend);
// turn on the output so the LEDs can light up:
digitalWrite(DATA_LATCH, HIGH);
}

You have disabled javascript from running on this site. This page may display improperly and will have reduced functionality.