I’ve had my 8x8 array of RGB LEDs working perfectly for some time now.
The DOUT SR setup being (predictably):
DOUT_MATRIX n=1 rows=8 inverted=1 sr_dout_sel1=1 sr_dout_r1=2 sr_dout_g1=3 sr_dout_b1=4 led_emu_id_offset=1001
The array uses the 1st 4 SR’s in the chain. The id’s go from 1001 (row1,col1) to 1064 (row8, col8)
Now, as I develop the application I realise I have 3 spare DOUT SR’s that I could use to change the array into 4 rows of 16.
The expected benefits are:
- more colours (hues)
- less flicker (1/4 duty rather than 1/8)
- brighter output
So I break the columns in the middle of the array (easy to do, because I constructed the rows as modules, with a plug connection down the columns). Then I wire the new SR’s to the disconnected columns.
DOUT_MATRIX n=1 rows=4 inverted=1 sr_dout_sel1=1 sr_dout_r1=2 sr_dout_r2=5 sr_dout_g1=3 sr_dout_g2=6 sr_dout_b1=4 sr_dout_b2=7 led_emu_id_offset=1001
This is what seems to work right. The first point of confusion is that sr_dout_r2=5 is actually SR#6 in the DOUT chain as I use #5 to drive 8 standard LEDs.
What is the method of counting SR’s here?
As for the row ordering, I have the row drivers (inverted) connected the same as the 8x8 array (that is unchanged).
I did this because the manual says:
rows=4: 4 selection pulses are output by the DOUT register specified with sr_dout_sel1. The pulses are available twice: at D7:D4 and D3:D0.
I find the ordering of the rows is thus:
addressed row LED row lit
1 1
2 5
3 2
4 6
5 3
6 7
7 4
8 8
I admit I’m confused.
Is there a simple way to unscramble the rows in the way I declared the shift registers?
I don’t intend to rewire anything. If I have to, I’ll create a lookup table in the macro processor to provide for LEDs in a linear sequence. But I’d rather not have to if there is a way of declaring them that avoids this.
