There are a couple more topics to cover in
As a Stomach Turns.... even if MrDEB has moved on to massacre.... I mean conquer... other projects. Call this the appendix.
What happens if we want to add a second or even third matrix so we can display more information instead of scrolling it across the matrix a character at a time? If we expand the current scheme, we'll need another port to drive the columns on each additional matrix - the rows are connected in parallel, so the single port can support many digits when multiplexing. Four ports (32 port pins) to drive a three-matrix display isn't very practical.
One method to expand our display would be to replace the ULN2803 with a serial/parallel shift register such as the
TI TPIC6A596 Power Logic 8-bit Shift Register for each matrix. A single high bit is shifted out activating each row in turn. The shift registers cascade, the output of one feeding into the next. We'll need only three port pins to control any number of cascaded shift registers: clock, data and output enable.
The procedure is very similar to what we did previously:
1. Disable the shift register outputs.
2. Shift a single high bit into the register.
3. Set PortB to the data for the first column.
4. Enable the shift register outputs.
5. Wait a short period while column is displayed.
6. Disable the outputs.
7. Send one clock pulse to shift the single high bit.
8. Set PortB for the column output.
9. Enable the shift register outputs.
.... and so on.
There's a limitation to how many matrices we can support this way. In order to have a flick-free display, each additional display requires a faster scan rate and each column is activated for a shorter percentage of the time. Three matrices might be as many as are practical with this method. Each output of these shift registers can handle 350 mA so they have plenty of sink capacity. They cost less than two bucks.
There's an
on-line simulator for '595 shift registers so you can see how they work. Remember, we want only one output sinking current at a time - one active column.