Hi nospam and John
Thanx a lot for all your comments and suggestions.
Just to make clear what you mean here...... I'm driving the matrix like
this: At start I make the first column (vertical) high. Than I set
which of the eight LEDs (the "row") must be turned on. This is how I'm
driving the matrix now.
Which is as I thought, and bad news if you want a consistent
intensity.
Do you mean that I need to drive it like this:
Make the first column high, than lets say that LED 2 and 4 must be
turned on, I first shift this into the shift register: 0000 0010 (LED
2), than I put LED 2 off: 0000 0000 And than I put LED 4 on: 0000 1000.
Is this correct? If so, I think this will take a lot of processing
power from my uC.
Yes, it would but that's also not usually how it would be done. As
that wouldn't be so good as other options.
I'll assume that your schematic should be expanded so that it is
looked at this way:
row 1: 000000000000000000000000000000000000000000000000
row 2: 000000000000000000000000000000000000000000000000
row 3: 000000000000000000000000000000000000000000000000
row 4: 000000000000000000000000000000000000000000000000
row 5: 000000000000000000000000000000000000000000000000
row 6: 000000000000000000000000000000000000000000000000
row 7: 000000000000000000000000000000000000000000000000
row 8: 000000000000000000000000000000000000000000000000
col: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv
And that in this case what you use to drive each column is as you
showed, similarly for each row. In other words, staying with your own
definition of 'row' and 'column' and no one else's.
Since you are only permitted to drive zero or one LED per column at a
time, the idea would be to enable just row 1 after latching in each of
the column enables depending on your data for that row. Then disable
row 1, latch row 2's column data into the columns, enable row 2. Then
disable row 2, latch row 3's column data into the column enables, then
enable row 3. Etc. This provides a 1:8 multiplexing and that will
suggest that you will need to significantly over-drive each LED enough
so that they will appear sufficiently bright for your needs. That
affects the resistor size you were talking about before.
So let's say the image was this:
row 1: * * ***** * * *** * * * ***
row 2: * * * * * * * * * * *
row 3: * * * * * * * * * * *
row 4: ***** *** * * * * * ***** *
row 5: * * * * * * * * * * *
row 6: * * * * * * * * * * *
row 7: * * ***** ***** ***** *** * * * ***
row 8:
col: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv
You'd make sure all row drivers were off, to start. Then load in
"100010111110100000100000011100000010100010011100" into your column
shift register. Then enable row 1. Wait, as appropriate. Disable
row 1. Load "100010100000100000100000100010000100100010001000" into
your column shift register. Then enable row 2. Wait, ... Etc.
Does that make sense?
Jon