Pages: [1]   Go Down
Author Topic: Shift Register Library  (Read 440 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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

Thanks,
max
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 (http://www.elcojacobs.com/shiftpwm/) if you want to blink some LEDs...

Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

France
Offline Offline
God Member
*****
Karma: 29
Posts: 898
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://code.bildr.org/project/Shift%20Register%208-Bit%20-%2074HC595/Arduino
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a page about the 595 chip:

http://www.gammon.com.au/forum/?id=11518

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

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

Toronto
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Love Electronics
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Sparkie
Logged

Don't Shoot The Messenger

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 452
Posts: 18694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is SPI in your code.

http://gammon.com.au/spi
Logged

Pages: [1]   Go Up
Jump to: