Yes, they are daisy chained.
Is there a standard way they should be hooked up? Like, should the first display be on the far left or far right?
Here is what I show with my display and how it's hooked up.
Serial In goes to #1, then Serial out of 1 goes to in of #2, etc...
Using your suggestions, here is my test code. Works so far.
// Test sketch using 6 TPIC6B595 shift registers
#include <SPI.h>
const static byte charTable[128] = {
// B-DP-g-f-e-d-c-b-a
// a
//f b
// g
//e c
// d DP
//0 1 2 3 4 5 6 7
B00111111,B00000110,B01011011,B01001111,B01100110,B01101101,B01111101,B00000111,
//8 9
B01111111,B01100111
};
const byte LATCH = 10; //Arduino Latch Pin = 10
const byte NumberOfSR = 6; //Number of Shift Registers
byte DisplayData [NumberOfSR]; //Array for numbers that go in the 6 digit display
void refreshDisplay ()
{
digitalWrite (LATCH, LOW);
for (byte i = 0; i < NumberOfSR; i++)
SPI.transfer (DisplayData [i]);
digitalWrite (LATCH, HIGH);
}
void clockDisplay ()
{
DisplayData [0] = charTable[1];
DisplayData [1] = charTable[2];
DisplayData [2] = charTable[3];
DisplayData [3] = charTable[4];
DisplayData [4] = charTable[5];
DisplayData [5] = charTable[6];
refreshDisplay ();
}
void setup ()
{
SPI.begin ();
}
void loop ()
{
clockDisplay ();
}
I'll most likely use the decimal points for my lights and just use 2 more TPIC6B595's for the other 2 larger digits. Or, I may even use another 595 for the lights. That way I can daisy chain everything with some headers & cables.