TLC5940 and dot correction

Hi,

I have an Arduino mega 2560, and one (later man) TLC5940 to control RGB LEDs.
It works all great.

I want to use the dot correction in order to get better color (yellow, is more green etc...).

So, I connect the pin 27 of the TLC to the pin 50 of my arduino, and enable VPRG in the config file.

Thats my code: (from the TLC5940 library Arduino Tlc5940 Library: Functions that Require VPRG_ENABLED)

#include "Tlc5940.h"
#include "tlc_progmem_utils.h"


prog_uint8_t dcArray1[NUM_TLCS * 12] = {
		DC_QUARTET(32, 63, 32, 63), DC_QUARTET(32, 63, 32, 63),
		DC_QUARTET(32, 63, 63, 63), DC_QUARTET(32, 63, 32, 63),
	};
// treid with differents values  for the dot correction
	
void setup(void)
{
	Tlc.init();
	
	tlc_setDCfromProgmem(dcArray1);
	
	while (Tlc.update()); // tried with and without this line
}

void loop(void)
{
	Tlc.clear();
	
	// set red color to all rgb lights
	
	Tlc.update();

}

The RGB light are no more red but more cyan/white.

I don't really understand how it should work.
Did somebody already get dot correction working on an arduino mega?

Thanks for your help!

I could be wrong, but I was under the impression that dot correction on a TLC5940 is to compensate between brightness levels of different LEDs, for example if you are using banks of LEDs from different manufacturers.

If you want to adjust the actual color an RGB LED is producing I think you would want to do something like an HSL to RGB color space transformation, because then you could adjust the hue until you're happy.

or, en Français,

Good luck!

Moderator edit: link corrected

oh ok I thought dot correction was to get better colors.

Thank you very much for your help!

The RGB led is really three separate leds, and you can use the dot correction to adjust the
relative brightness of the three leds, which is going to give you better colour combinations.

I just implement the HSL color space, and it's really better to change the colors.

But my problem still the same, I don't get a real Yellow. So I think I need the dot correction.

Do someone have an answer to my first question? (how to use dot correction with arduino 2560 and tlc5940)

The datasheet is pretty clear. You set a pin so the chip can tell it is dot correction data and then you clock out
six bits for each output and then set into the register.

You can also lock the data somehow into eprom, haven't tried that, don't have 23 volts to do it.