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.

TLC5940: Doesn`t have output

Part Number: TLC5940

We are using TLC5940 for PWM output, but now out0 - out 15 doesn`t have PWM output,we are using pin BLANK,DCPRG,XLAT,SIN,GSCLK. After upload program to chip, we test output pin with oscilloscope, chip will become heat, the voltage of external supply will pull down

TLC5940.h

TLC5940.c
/*
 * TLC5940.c
 *
 *  Created on: 2021��8��30��
 *      Author: admin
 */

#include "TLC5940.h"

unsigned char PWMtable1[24] = {	0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
								0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
								0x55, 0x55, 0x55, 0x55};

unsigned char PWMtable2[24] = {	0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
								0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
								0xaa, 0xaa, 0xaa, 0xaa};

unsigned char PWMtable[24] = {	0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
								0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
								0xcc, 0xcc, 0xcc, 0xcc};
void EnableAllPWM() {
	TLC5940_BLANK(0);
}

void DisableAllPWM() {
	TLC5940_BLANK(1);
}

void Refresh(){
	WriteXBit( &PWMtable[0], 24 );
}

void WriteXBit(unsigned char* pWriteData, unsigned char bitNumber) {
    unsigned char i;
    unsigned char index = 0;        	// �������±�
    unsigned char count = 0;        	// �����
    unsigned char Temp = 0;

    TLC5940_XLAT(0);
    TLC5940_DCPRGK(1);
    for (i = 0; i < bitNumber; i++) 	// ѭ��д������λ
    {
    	TLC5940_SCLK(0);
        Temp = (pWriteData[index] & 0x80);
        if (Temp == 0x80)           	// ��д����λΪ1����Ϊ0
        	TLC5940_SIN(1);             // Ϊ1ʱ����1�Ŀ��
        else
        	TLC5940_SIN(0);             // Ϊ0ʱ����0�Ŀ��
    	TLC5940_SCLK(1);
        pWriteData[index] <<= 1;    	// ��λ
        count++;                    	// 8�������1
        if (count >= 8) {
            index++;                	// ��8λ������д��һ���ֽڣ����±��1
            count = 0;              	// 8λ����������λ0�����¿�ʼ����
        }
    }
    TLC5940_XLAT(1);
}