I'm implementing RGB color re-ordering on the Renard-px1, and I'd like to make this as close as reasonable to that on some of the other controllers/bridges.
Here is what I'm doing at the moment:
First, I assume that RGB is the standard order of the pixel colors as data is received from the wire. The incoming data is stored in the controller memory in the same order as it was received (although this is only an internal implementation detail).
The data is then read from internal memory in possibly a different order than it was stored, and sent out to the pixel strings. The data for all of the pixels attached to a single controller (up to 200 of them) has the data sent out in the same order. There are six possible re-orderings, namely RGB (no re-ordering), RBG (green and blue swapped), GRB, GBR, BRG, BGR. An index corresponding to these reorderings (in that order) is stored in the EEPROM in the microcontroller. The initial value of this index can be set up in the assembly code prior to programming the PIC, and can be changed later in the same manner as the Renard Start Addresses.
Is this close enough to how this is handled in the E68x controllers?
P. Short wrote:I'm implementing RGB color re-ordering on the Renard-px1, and I'd like to make this as close as reasonable to that on some of the other controllers/bridges.The data is then read from internal memory in possibly a different order than it was stored, and sent out to the pixel strings. The data for all of the pixels attached to a single controller (up to 200 of them) has the data sent out in the same order. There are six possible re-orderings, namely RGB (no re-ordering), RBG (green and blue swapped), GRB, GBR, BRG, BGR. An index corresponding to these reorderings (in that order) is stored in the EEPROM in the microcontroller. The initial value of this index can be set up in the assembly code prior to programming the PIC, and can be changed later in the same manner as the Renard Start Addresses.
Is this close enough to how this is handled in the E68x controllers?
Yes, this has been my experience with the SanDevices controllers I have, per cluster (or string/controller in this case) you define if it's RGB, BRG, etc....
Thanks,
-joni-
I pass the address of a 3-byte offset table to each cog that's running the ASM code to drive the pixels. Each byte in the table represents the offset from the 1st color channel to use for the R, G, and B channels respectively. For each pixel I calculate the first address in the DMX buffer that belongs to that pixel, then for each color channel within the pixel I add the corresponding offset value to that base address to get the address of the DMX byte for that channel.
RGBNAME byte "RGB","RBG","GRB","BRG","GBR","BGR"
RGBJMP byte 0,1,2, 0,2,1, 1,0,2, 1,2,0, 2,0,1, 2,1,0
