Other Parts Discussed in Thread: TIDA-03026
We are experiencing unwnated short flashes of some LEDs if we dim the LEDs dynamically via the GRPPWM register.
Background:
We want to display some kind of a "breathing effect", i.e. slow, continuously dimming up and down of 16 RGB-Leds which are connected to three TLC59116.
Vled is 5V; Vcc is 3.3V
Rext is 1k69
This is the initialization of the ICs:
setChipRegister(I2C_ADR_LED_DRIVER_1, MODE1, 1);
setChipRegister(I2C_ADR_LED_DRIVER_2, MODE1, 1);
setChipRegister(I2C_ADR_LED_DRIVER_3, MODE1, 1);
/* oscillator internal to led-driver-chip needs approx. 0.5ms startup time */
CyDelay(1); // delay of 1ms
setChipRegister(I2C_ADR_LED_DRIVER_ALL, MODE2, 0);
setChipRegister(I2C_ADR_LED_DRIVER_ALL, GRPPWM, 0);
setChipRegister(I2C_ADR_LED_DRIVER_ALL, LEDOUT0, 0xFF);
setChipRegister(I2C_ADR_LED_DRIVER_ALL, LEDOUT1, 0xFF);
setChipRegister(I2C_ADR_LED_DRIVER_ALL, LEDOUT2, 0xFF);
setChipRegister(I2C_ADR_LED_DRIVER_ALL, LEDOUT3, 0xFF);
setChipRegister(I2C_ADR_LED_DRIVER_ALL, IREF, 0x3F);
The used I2C-addresses are as follows:
#define I2C_ADR_LED_DRIVER_1 (0xC0)
#define I2C_ADR_LED_DRIVER_2 (0xC2)
#define I2C_ADR_LED_DRIVER_3 (0xC4)
#define I2C_ADR_LED_DRIVER_ALL (0xD0)
After setting the individual brightness registers PWM0 to PWM15,
we send every 30ms the following command, where brightness is incremented from 0 to max (i.e. 0x40) and back to zero again in steps of one:
setChipRegister(I2C_ADR_LED_DRIVER_ALL, GRPPWM, brightness);
But there are unwanted intermittent (very short) changes of brightness, which look like short flashes.
I can prepare a video if necessary.
We checked the I2C communication and the commands are all send correctly.
Tests were done with 100kBit and 400kBit.
No difference there and no errors on the I2C lines.
Are we doing something wrong?
Is there another way to achieve the desired effect?
Thanks in advance and best regards,
Martin