#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?
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.
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.
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.