This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLC59711: RGB LED flickering issue

Part Number: TLC59711
Other Parts Discussed in Thread: TIDA-00979, TLC5971

Hi,

I am using RGB LED drivers (2 No's) in daisy chain to drive 8 RGB LEDS. When I try to drive single RGB LED with yellow color, other RGB LEDS are flickering with same yellow color with less intensity.

Observation:
 With single write operation to the LED drivers (224 bit for each driver), LED flickering is seen. LEDs which should remain OFF was turning ON for a moment and then goes OFF.(Like Flickering).

Thanks and Regards,

Mohammed Ismail

  • Hi, Mohammed,

    Can you please try just send one TLC59711 data to test whether it is OK for one device?

    Please send me your schematic so I can check the hardware.

    Thanks.

    Regards,

    Kenneth

  • Hi Kenneth,

    Thanks for your reply.

    I tried by removing one LED driver IC. It worked fine with one LED driver.

    Below are the schematics.

    Thanks and Regards,

    Mohammed Ismail

  • Hi, Mohammed,

    The schematic is OK.

    Since one device works well, I think it's probably the code is not correct.

    Here are the TLC5971 code for TIDA-00979:

    4135.3113.TLC5971.c
    #include "TLC5971.h"
    
    // Initialisation of array with 5 lamps
    char lamps[5][4][3] = { { { 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 } },
    						{ { 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 } },
    						{ { 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 } },
    						{ { 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 } },
    						{ { 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 },{ 0x00, 0x00, 0x00 } } };
    
    
    //command setup
    char cd[5][4] = {{ WRITECMD, DSPRPT + 0x1F, 0xFF, 0xFF },
    				 { WRITECMD, DSPRPT + 0x1F, 0xFF, 0xFF },
    				 { WRITECMD, DSPRPT + 0x1F, 0xFF, 0xFF },
    				 { WRITECMD, DSPRPT + 0x1F, 0xFF, 0xFF },
    				 { WRITECMD, DSPRPT + 0x1F, 0xFF, 0xFF }};
    
    //data set to be written
    void sendData()
    {
    	char l = 5;
    
    	do
    	{
    		l--;
    
    		char b = 0;
    
    		while (b < 4)
    		{
    			write(cd[l][b]);
    			b++;
    		}
    		write(lamps[l][3][BLUE_OR_GREEN]);
    		write(lamps[l][3][BLUE_OR_GREEN]);
    		write(lamps[l][3][GREEN_OR_BLUE]);
    		write(lamps[l][3][GREEN_OR_BLUE]);
    		write(lamps[l][3][RED]);
    		write(lamps[l][3][RED]);
    
    		write(lamps[l][2][BLUE_OR_GREEN]);
    		write(lamps[l][2][BLUE_OR_GREEN]);
    		write(lamps[l][2][GREEN_OR_BLUE]);
    		write(lamps[l][2][GREEN_OR_BLUE]);
    		write(lamps[l][2][RED]);
    		write(lamps[l][2][RED]);
    
    		write(lamps[l][1][BLUE_OR_GREEN]);
    		write(lamps[l][1][BLUE_OR_GREEN]);
    		write(lamps[l][1][GREEN_OR_BLUE]);
    		write(lamps[l][1][GREEN_OR_BLUE]);
    		write(lamps[l][1][RED]);
    		write(lamps[l][1][RED]);
    
    		write(lamps[l][0][BLUE_OR_GREEN]);
    		write(lamps[l][0][BLUE_OR_GREEN]);
    		write(lamps[l][0][GREEN_OR_BLUE]);
    		write(lamps[l][0][GREEN_OR_BLUE]);
    		write(lamps[l][0][RED]);
    		write(lamps[l][0][RED]);
    	}
    	while (l > 0);
    	_delay_cycles(0x1FF);
    }
    
    //Funtion to blanking or turning on LEDs
    void blank(char lamp, char status)
    {
    	if (status)
    	{
    		cd[lamp][1] |= BLANK;
    	}
    	else
    	{
    		cd[lamp][1] &= ~BLANK;
    	}
    }
    
    //set global brightness function
    void setGlobalBrightness(char lamp, char color, char value)
    {
    	if (color == RED)
    	{
    		cd[lamp][3] &= 0x80;
    		cd[lamp][3] |= (0x7F & value);
    	}
    	else if (color == GREEN_OR_BLUE)
    	{
    		(value & BIT0) ? (cd[lamp][3] |= BIT7) : (cd[lamp][3] &= ~BIT7);
    		cd[lamp][2] &= 0xC0;
    		cd[lamp][2] |= (0x3F & (value >> 1));
    	}
    	else
    	{
    		(value & BIT0) ? (cd[lamp][2] |= BIT6) : (cd[lamp][2] &= ~BIT6);
    		(value & BIT1) ? (cd[lamp][2] |= BIT7) : (cd[lamp][2] &= ~BIT7);
    		cd[lamp][1] &= 0xE0;
    		cd[lamp][1] |= (0x1F & (value >> 2));
    	}
    }
    
    //set brightness function
    void setBrightness(char lamp, char row, char color, char value)
    {
    	lamps[lamp][row][color] = value;
    }
    
    //Get brightness function
    char getBrightness(char lamp, char row, char color)
    {
    	char roworder [4] = {1,0,3,2};
    	return lamps[lamp][roworder[row]][color];
    }
    
    //Set color function
    void setColor(char lamp, char row, char red, char green, char blue)
    {
    
    	char roworder [4] = {1,0,3,2};
    	lamps[lamp][roworder[row]][RED] = red;
    	lamps[lamp][roworder[row]][GREEN] = green;
    	lamps[lamp][roworder[row]][BLUE] = blue;
    
    }
    
    //data write
    void write(char data)
    {
    	while (!(UCB1IFG & UCTXIFG));
    	UCB1TXBUF = data;
    }
    
    //TODO: eliminate this function completely
    // delay func in milliseconds (with 100ms resolution)
    volatile int delay_timer;
    void delay(int i)
    {
    	/*for(; i>0; i--)
    		__delay_cycles(1000);*/
    	if(i/100 == 0)i = 100; //to fix delays below 100ms
    	delay_timer = 0;
    	while(delay_timer < i/100);
    }
    
    
    
    
    
    2043.TLC5971.h

    Please take for reference and check your code.

    Thanks.

    Regards,

    Kenneth

  • Hi Kenneth,

    I see that the issue is with internal latch timing requirement. During heavy loading of the system, we are not able to meet this requirement.

    Thanks and Regards,
    Mohammed Ismail