Shift Register Library


I have 4 daisy-chained shift registers. I just wanted to know if anybody knows a special library which makes programming much easier.


Your question is a little vague...what do you want to do with them?

There's the SPI library, you can use that to send data to shift registers faster than shiftOut().

There's the ShiftPWM library ( if you want to blink some LEDs...

I want to control a matrix without using shiftout(), because that would enlarge my program wouldn't it?

If you use 74HC595 shift registers, you could try this one

I have a page about the 595 chip:

Here (from that page) is how to daisy-chain 4 shift registers, it hardly takes a lot of code:

  digitalWrite (LATCH, LOW);
  SPI.transfer (0xAB);
  SPI.transfer (0xCD);
  SPI.transfer (0xEF);
  SPI.transfer (0x42);
  digitalWrite (LATCH, HIGH);

Hi Nick

I went to your site and seen some of the code for the shift registers, and thought you might be able to help me.

What is SPI in your code.

I built a 4x4x4 led cube and am trying to creat a code to test each one of the leds from an X,Y,Z access.
Then eventually randomize the pattern.

If you want I could send the code I found and converted.


What is SPI in your code.