I’d like to have an RGB LED beside each encoder in my 64 Encoder LEDring MIDIbox NG beast.
An 8x8 colour matrix can easily be driven by a single DOUTx4 module.
1SR drives the 8 cathode rows, and remaining 3SR’s drive the red,green, and blue anodes.
Here’s a circuit:
If the standard SRIO scan rate is used, then each row is illuminated for 1ms each 8ms. This equates to 125Hz refresh rate.
To obtain different colours we need to adjust the brightness of red, green and blue separately.
This can be done by varying the “on” versus “off” time for each element R,G,B.
Say we call each 8 row scan a “frame”. By displaying 2 frames alternately, every R,G,B LED in the array has 3 “brightness” levels.
It can be off for both frames (0%).
It can be on in one of the frames (50%)
It can be on for both frames (100%)
This scenario gives us a mighty palette of 3*3*3=27 “colours” (including “off”)
Because it takes 16ms to display both frames, then the refresh rate is 62.5Hz. Any slower and there will be discernible flicker.
If we were able to somehow double the scan rate (with 4 frames) we could have 5*5*5=125 “colours”. This would be useful, I feel, as it would be a wide range of hues with variable brightness.
Question now is, how could such a setup be supported by NG?
Would it be possible to have a separate SRIO port running at a higher scan rate?
It is possible to represent each frame as a bitmap, and to have the DMA interrupt change memory pointer to alternate frames each scan cycle, so that there is no continuous CPU load.
Could NGC have a way of specifying an (R,G,B) triplet to a specific array LED? etc,etc.
[edit] changed the schematic from “sharemedia” to an “imagelink”, schematic is unchanged.