I am working on an 8x24 multiplexed LED grid that I am running with shift registers. I am running it with an Arduino nano that uses SPI to send 32 bytes out to 4x 74HC595 shift registers.
The shift registers are linked such that the output of the first one feeds the second one, and so on. The first shift register in sequence controls the anodes on the horizontal rows and the other three handle the cathodes for the columns. So the Arduino outputs 4 bytes with the first three being the columns and the last one being the row.
I would like to be able to scroll the contents of the display left or right. I believe in order to do this, I need to be able to shift each of the three column bytes left or right. I believe I can do this with bitwise shifts, however, this will shift each byte individually. I actually would need to gradually shift the contents of one byte into another.
To clarify, here is an example. Let us suppose I am merely working with one row. So I will ignore the first shift register (row anode). I want a group of three bits to scroll from right to left. I'd like the sequence of events to appear as follows.
First iteration: 00000000 00000000 01110000
Second iteration: 00000000 00000000 11100000
Third iteration: 00000000 00000001 11000000
Fourth iteration: 00000000 00000011 10000000
Fifth iteration: 00000000 00000111 00000000
Sixth iteration: 00000000 00001110 00000000
If I merely do bitwise shifts, the bits will "fall off" their respective bytes that they originated on when they reach the "edges" of the bytes. They won't be handed off to the next byte as I am hoping to do.
How could I go about accomplishing this?
Let me know if more information is needed to clarify what I'm asking.