1111 1110 0000 0000
1111 1101 0000 0000
1111 1011 0000 0000
1111 0111 0000 0000
...
The 8 zeros on the right are for the row pattern. Those will get shifted into the last shift register.
The code is essentially just going through each one of those in a for loop. The for loop has a variable called J it counts up. I also have a slice of code to take the row of the array and turn it into an integer and then I OR the array with the integer with the number above to get the data into a full binary pattern. Then I use the code I wrote to latch, load, and clear the shift register. The data is first written into the shift register. The problem with the shift register is that you need to display pattern all at once instead of doing it while the data is shifted down. So first you clock in the 1's and 0's. Then you latch the register to actually output the data in the registers. All in all it sounds simple but it was a little tough to do. It does not even use any interrupts. The next micro-controller class I will take will utilize interrupts and more advance timing techniques. I was able to control this matrix that was comprised of 28 pins with only 3 pins of a micro-controller. A video can be found here:
Here is a video below of a simple 4x4 multiplexed pattern I did to make sure I knew what I was doing before I went on to design the 8x8 configuration: