Hi,
I am using two cascaded TLC5916 chips to drive 12 LEDs, mixed green and red. this is a very straight forward task, which doesn't require brightness control or anything like, just turning on LEDs and OFF as required.
My implementation is as follow. I use a 16 bit field variable ( uint16_t current alarms), which is then streamed into the two chip as follow:
void update_status_leds(unsigned int CurrentAlarms){
int i = 0;
//clear outputs
P1OUT &= ~(LATCH_ENABLE|OUTPUT_ENABLE|CLOCK_PIN);
for(i = 0; i < 16; i++){
if(CurrentAlarms&0x01){
P1OUT |= SERIAL_DATA;
}else{
P1OUT &= ~SERIAL_DATA;
}
//toggle clock
P1OUT |= CLOCK_PIN;
P1OUT &= ~CLOCK_PIN;
//shift to the next bit
CurrentAlarms >>= 1;
}
//latch stored data to output registers
P1OUT |= LATCH_ENABLE;
P1OUT &= ~LATCH_ENABLE;
}
I believe the code above is/ might be correct.
Once this function is called, the LEDS are turned or off as expected, except that after a few seconds 10-20 seconds they all turn off.
I have no Idea why that is happening. I have tried to refresh the update in an infinite loop, but that only led to annoying flickering of LEDs...i.e after similar time frame elapsed ( 10-20 secs) the leds started to flicker...
On hardware side of things:
Rext = 1kohm,
Vled = Vcc = 3.6V, i.e connected on the same supply line ( can this be a problem actually?)... a decoupling capacitor of 100nF is used on both TLC5916
Anybody has had a similar issue?
Any help would be great, thanks!
Olivier