Hi all,
I am really new so please don't mind if this is a dumb question.
I have cascaded 15 shift register and was testing them with a dummy code (given below). All is working fine the only problem being that all the ICs arehave syncronised outputs except when it goes from 12th to the 13th IC. When it overflows to the 13th IC it is delayed bye one clock cycle. After this the outputs are all fine and syncronised. Attached is a image from a logic analyzer. I would be really glad if some one can help me know the reason for this delay.
Please note that the code i was using is not meant for this application. It was just for testing purpose.
int dataPin = 2; //Define which pins will be used for the Shift Register control
int latchPin = 3;
int clockPin = 4;
int seq1[14] = {1,2,4,8,16,32,64,128,64,32,16,8,4,2}; //The array for storing the byte #1 value
int seq2[14] = {128,64,32,16,8,4,2,1,2,4,8,16,32,64}; //The array for storing the byte #2 value
void setup()
{
pinMode(dataPin, OUTPUT); //Configure each IO Pin
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
}
void loop()
{
for (int x = 0; x < 14; x++) //Array Index
{
digitalWrite(latchPin, LOW); //Pull latch LOW to start sending data
shiftOut(dataPin, clockPin, MSBFIRST, seq1[x]); //Send the data byte 1
shiftOut(dataPin, clockPin, MSBFIRST, seq2[x]); //Send the data byte 2
digitalWrite(latchPin, HIGH); //Pull latch HIGH to stop sending data
delay(75);
}
}
Thanks in advance guys
rhl