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.

[参考译文] CCS/MSP432P401R:如何在使用驱动程序 IC 时通过 code composer studio 对显示驱动程序的代码进行编程?

Guru**** 2541600 points
Other Parts Discussed in Thread: TLC5957

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/785452/ccs-msp432p401r-how-to-program-code-for-display-dirver-by-code-composer-studio-when-use-driver-ic

器件型号:MSP432P401R
主题中讨论的其他器件:TLC5957

工具/软件:Code Composer Studio

大家好!

我想使用 code composer studio 对 显示屏的代码进行编程。

驱动器 IC 为 TLC5957。 我有一个称为 10×16全色 RGB LED 矩阵 参考设计的参考设计。

但我对 c 语言不是很好、我无法理解 TI 支持的代码。

代码中突出显示了我不会裸体的地方。

代码如下所示:

秘书长的报告 /*

DriverLib 包括*/

#include 




/*标准包括*/


#include 


#include 


#include "TLC5957.H"


#include "LED.h"



/*#define CPU_F (((double) 48000000)


#define DELAY_us (x)_DELAY_CYCLES ((long)(CPU_F*(double) x/1000000.0)


)#define DELAY_ms (x)_ DELAY_AULT_DAULT_1 (long)#define UCP_AULT_UCP_AULT_1







(timer_A AULT_UCP_UCP_1)+ UCP_UTPL* 1)#define AULT_UCP_UCP_1 (UCP_UCP_UCP_1)#define AULT_1





Timer_A_CLOCKSOURCE_SMCLK、 // SMCLK 时钟源


Timer_A_CLOCKSOURCE_divider _1、 // SMCLK/1 = 3MHz


Timer_Period、 // 5000个周期


Timer_A_TAIE_INTERRUPT_DISABLE、 //禁用计时器中断


Timer_A_CCIE_CCR0_INTERRUPT_ENABLE,//启用 CCR0中断


Timer_A_do 清除 //清除值
};*/


int GSdata0[]=
{

0x0000.0x0000.0x0000.0x0000//D0B、D7G、D0R

0x0000.0x0000.0x0000.0x0000、//D1B、D6G、D1R

0x0000.0x0000.0x0000.0x0000、//D2B、D5G、D2R

0x0000.0x0000.0x0000.0x0000、//D3B、D4G、D3R

0x0000.0x0000.0x0000.0x0000、//D4B、D3G、D4R

0x0000.0x0000.0x0000.0x0000、//D5B、D2G、D5R

0x0000.0x0000.0x0000.0x0000、//D6B、D1G、D6R

0x0000.0x0000.0x0000.0x0000、//D7B、D0G、D7R

0x0000.0x0000.0x0000.0x0000、//D8B、D15G、D8R

0x0000.0x0000.0x0000.0x0000、//D9B、D14G、D9R

0x0000.0x0000.0x0000.0x0000、//D10B、D13G、D10R

0x0000.0x0000.0x0000.0x0000、//D11B、D12G、D11R

0x0000.0x0000.0x0000.0x0000、//D12B、D11G、D12R

0x0000.0x0000.0x0000.0x0000、//D13B、D10G、D13R

0x0000.0x0000.0x0000.0x0000、//D14B、D9G、D14R

0x0000, 0x0000, 0x0000//D15B,D8G,D15R

};


int GSdata1[]=
{

4、4、//D0 B、G、R

4、4、//D1 B、G、R

4、4、//D2 B、G、R

4、4、//D3 B、G、R

4、4、//D4 B、G、R

4、4、//D5 B、G、R

4、4、//D6 B、G、R

4、4、//D7 B、G、R

4、4、//D8 B、G、R

4、4、//D9 B、G、R

4、4、//D10 B、G、R

4、4、//D11 B、G、R

4、4、//D12 B、G、R

4、4、//D13 B、G、R

4、4、//D14 B、G、R

4、4、//D15 B、G、R

};



int GSdataR[]=
{

0x000、0x000、0xxif、//D0B、D7G、D0R

0x000、0x000、0xxfff、//D1B、D6G、D1R

0x000、0x000、0xxif、//D2B、D5G、D2R

0x000、0x000、0xxif、//D3B、D4G、D3R

0x000、0x000、0xxif、//D4B、D3G、D4R

0x000、0x000、0xxfff、//D5B、D2G、D5R

0x000、0x000、0xxif、//D6B、D1G、D6R

0x000、0x000、0xxfff、//D7B、D0G、D7R

0x000、0x000、0xxfff、//D8B、D15G、D8R

0x0000x0000x0x0000xFFF、//D9B、D14G、D9R

0x000、0x000、0xxif、//D10B、D13G、D10R

0x000、0x000、0xxif、//D11B、D12G、D11R

0x000、0x000、0xxfff、//D12B、D11G、D12R

0x000、0x000、0xxfff、//D13B、D10G、D13R

0x000、0x000、0xxif、//D14B、D9G、D14R

0x000、0x000、0xxfff //D15B、D8G、D15R

};



int GSdataG[]=
{

0x0000x0xf、0x000、//D0B、D7G、D0R

0x0000x0xf、0x000、//D1B、D6G、D1R

0x000、0xxfff、0x000、//D2B、D5G、D2R

0x0000x0xf、0x000、//D3B、D4G、D3R

0x0000xf、0x000、//D4B、D3G、D4R

0x000、0xxfff、0x000、//D5B、D2G、D5R

0x0000x0xf、0x000、//D6B、D1G、D6R

0x0000x0xf、0x000、//D7B、D0G、D7R

0x0000x0xf、0x000、//D8B、D15G、D8R

0x0000x0xf、0x000、//D9B、D14G、D9R

0x0000x0xf、0x000、//D10B、D13G、D10R

0x0000x0xf、0x000、//D11B、D12G、D11R

0x0000x0xf、0x000、//D12B、D11G、D12R

0x0000xf、0x000、//D13B、D10G、D13R

0x0000x0xf、0x000、//D14B、D9G、D14R

0x0000xf、0x000 //D15B、D8G、D15R

};



int GSdataB[]=
{

0xxf、0x000、0x000、//D0B、D7G、D0R

0xxf、0x000、0x000、//D1B、D6G、D1R

0xxf、0x000、0x000、//D2B、D5G、D2R

0xxf、0x000、0x000、//D3B、D4G、D3R

0xxf、0x000、0x000、//D4B、D3G、D4R

0xxf、0x000、0x000、//D5B、D2G、D5R

0xxf、0x000、0x000、//D6B、D1G、D6R

0xxf、0x000、0x000、//D7B、D0G、D7R

0xxf、0x000、0x000、//D8B、D15G、D8R

0xxf、0x000、0x000、//D9B、D14G、D9R

0xxf、0x000、0x000、//D10B、D13G、D10R

0xxf、0x000、0x000、//D11B、D12G、D11R

0xxf、0x000、0x000、//D12B、D11G、D12R

0xxf、0x000、0x000、//D13B、D10G、D13R

0xxf、0x000、0x000、//D14B、D9G、D14R

0xfff、0x000、0x000 //D15B、D8G、D15R

};



int GSdataP[]=
{

0xxf、0x0000xf、//D0B、D7G、D0R

0xxf、0x0000xf、//D1B、D6G、D1R

0xxf、0x0000xf、//D2B、D5G、D2R

0xxf、0x0000xf、//D3B、D4G、D3R

0xxf、0x0000xf、//D4B、D3G、D4R

0xxf、0x0000xf、//D5B、D2G、D5R

0xxf、0x0000xf、//D6B、D1G、D6R

0xxf、0x0000xf、//D7B、D0G、D7R

0xxf、0x0000xf、//D8B、D15G、D8R

0xxf、0x0000xf、//D9B、D14G、D9R

0xxf、0x0000xf、//D10B、D13G、D10R

0xxf、0x0000xf、//D11B、D12G、D11R

0xxf、0x0000xf、//D12B、D11G、D12R

0xxf、0x0000xf、//D13B、D10G、D13R

0xxf、0x0000xf、//D14B、D9G、D14R

0xfff、0x000、0xxfff //D15B、D8G、D15R

};



int GSdataY[]=
{

0x000、0xxfff、0xxif、//D0B、D7G、D0R

0x0000x0xFFF、0xFFF、//D1B、D6G、D1R

0x000、0xxfff、0xxif、//D2B、D5G、D2R

0x000、0xxfff、0xxf、//D3B、D4G、D3R

0x000、0xxfff、0xxif、//D4B、D3G、D4R

0x000、0xxfff、0xxif、//D5B、D2G、D5R

0x0000x0xFFF、0xFFF、//D6B、D1G、D6R

0x0000x0xFFF、0xFFF、//D7B、D0G、D7R

0x0000x0xFFF、0xFFF、//D8B、D15G、D8R

0x0000x0xFFF、0xFFF、//D9B、D14G、D9R

0x0000x0xFFF、0xFFF、//D10B、D13G、D10R

0x000、0xxfff、0xxif、//D11B、D12G、D11R

0x0000xxfff、0xxf、//D12B、D11G、D12R

0x000、0xxfff、0xxif、//D13B、D10G、D13R

0x0000x0xFF,0xFF,//D14B, D9G, D14R

0x000、0xxfff、0xxif //D15B、D8G、D15R

};



int GSdataT[]=
{

0xLF、0xLF、0x000、//D0B、D7G、D0R

0xLF、0xLF、0x000、//D1B、D6G、D1R

0xxf、0xf、0x000、//D2B、D5G、D2R

0xLF、0xLF、0x000、//D3B、D4G、D3R

0xLF、0xLF、0x000、//D4B、D3G、D4R

0xLF、0xLF、0x000、//D5B、D2G、D5R

0xLF、0xLF、0x000、//D6B、D1G、D6R

0xLF、0xLF、0x000、//D7B、D0G、D7R

0xxf、0xf、0x000、//D8B、D15G、D8R

0xLF、0xLF、0x000、//D9B、D14G、D9R

0xLF、0xLF、0x000、//D10B、D13G、D10R

0xLF、0xLF、0x000、//D11B、D12G、D11R

0xLF、0xLF、0x000、//D12B、D11G、D12R

0xLF、0xLF、0x000、//D13B、D10G、D13R

0xLF、0xLF、0x000、//D14B、D9G、D14R

0xfff、0x0xf、0x000 //D15B、D8G、D15R

};



void Switch_Line (unsigned char I)

{

开关(I)

{

案例1:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P2、GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

} 中断;


案例2:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P2、GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

} ;中断;


案例3:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P2、GPIO_PIN4);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

} ;中断;


案例4:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P5、GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

} ;中断;


情况5:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P6、GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN7);

} ;中断;


案例6:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P6、GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6);

} ;中断;


案例7:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P2、GPIO_PIN3);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

} ;中断;


案例8:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P5、GPIO_PIN1);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

} ;中断;


案例9:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P3、GPIO_PIN5);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

} ;中断;


案例10:

{
GPIO_setOutputHighOnPin (GPIO_PORT_P3、GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

};中断;

}

}



void Switch_Line_off (无符号字符 i)

{
开关(I)

{

案例1:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN7);

} 中断;


案例2:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN6);

} ;中断;


案例3:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN4);

} ;中断;


案例4:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN6);

} ;中断;


情况5:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6);

} ;中断;


案例6:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN7);

} ;中断;


案例7:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3);

} ;中断;


案例8:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN1);

} ;中断;


案例9:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5);

} ;中断;


案例10:

{
GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN7);

};中断;

}

}



空 Init_Line()

{

GPIO_setAsOutputPin (GPIO_PORT_P1、GPIO_PIN6|GPIO_PIN7);

GPIO_setAsOutputPi (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setAsOutputPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);

GPIO_setAsOutputPin (GPIO_PORT_P5、GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN6|GPIO_PIN7);

GPIO_setAsOutputPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputHighOnPin (GPIO_PORT_P1、GPIO_PIN6|GPIO_PIN7);//
GPIO_setOutputHighOnPin (GPIO_PORT_P1、GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputHighOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputHighOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputHighOnPin (GPIO_PORT_P5、GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputHighOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

}



int main (void)

{

/* TLC5957矩阵的主代码*/


init_Clock();
init_TLC5957();
init_Line();



/*将 P1.1配置为输入并启用中断*/


MAP_GPIO_setAsInputPinWithPullUpResistor (GPIO_PORT_P1、GPIO_PIN1);

MAP_GPIO_clearInterruptFlag (GPIO_PORT_P1、GPIO_PIN1);

MAP_GPIO_enableInterrupt (GPIO_PORT_P1、GPIO_PIN1);

MAP_Interrupt_enableInterrupt (INT_Port1);



/*启用 SRAM 组保持*/


MAP_SYSCTL_enableSRAMBankRetention (SYSCTL_SRAM_BANK1); 



/*启用主中断*/


MAP_Interrupt_enableMaster();


GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P1、GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P2、GPIO_PIN3|GPIO_PIN4|GPIO_PIN6);

GPIO_setOutputLowOnPin (GPIO_PORT_P3、GPIO_PIN5|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P5、GPIO_PIN0|GPIO_PIN1|GPIO_PIN2|GPIO_PIN6|GPIO_PIN7);

GPIO_setOutputLowOnPin (GPIO_PORT_P6、GPIO_PIN6|GPIO_PIN7);

GPIO_setPeripheralModuleFunctionOutputPin (GPIO_PORT_P4、GPIO_PIN3、GPIO_PRIMARY_MODULE_Function);



/* WriteFCData (char LGSE2、char Poker、char BC、char CCR、char CCG、char LGSE1、char SEL_SCK_EDGE、char LGSE3、char ESPWM、char SEL_PCHG、char SEL_GCK_EDGE、char XREFRFSH、char DVSEL_GDLY、char SDL0、char SEL_PCHG、char)
//
Switch_Line (2);


WriteFCData (0、1、2、256、256、256、256、256、0、0、1、0、0、1、0、0);//首先写入 FC 数据 


//WriteGSData_Poker (GSdata1);


//Doraemon ();//Run Doraemon


//Scan();


//微笑();


//Gradient ();


//Rainbow ();


//Flower ();


//呼吸();


/* while (1)


{
WriteGSData (GSdata1);


delay_ms (1);
}*/

//

Switch_Line (3);
//WriteGSData_Poker (GSdata1);


while (1)

{

switch (key_FLAG)


{

案例1:scan();break;


案例2:Smile();break;


情况3:梯度();中断;


判例4:花卉();断裂;


判例5:Doraemon ();Break;


判例6:worth();break;


判例7:Rainbow ();Break;


情况8:PULSE();break;


}

}







/*void TA1_0_IRQHandler (void)

{
GCLK (0);

Switch_Line (line);

WriteGSData (GSdata);

GCLK (1);

MAP_Timer_A_startCounter (timer_A1_base、timer_A_up_mode);

MAP_Timer_A_clearCaptureCompareInterrupt (TIMER_A1_base、
TIMER_A_CAPTURECOMPARE 寄存器_0);


//map_GPIO_toggleOutputOnPin (GPIO_PORT_P1、GPIO_PIN0);

}*/



/* GPIO ISR */

void Port1_IRQHandler (void)//

LED 环形效应开关函数


{

uint32_t status;


STATUS = MAP_GPIO_getEnabableInterruptStatus (GPIO_PORT_P1);


MAP_GPIO_clearInterruptFlag (GPIO_PORT_P1、STATUS);


key_FLAG++;


if (key_FLAG = 9) key_FLAG = 1;

0x000、0xfff、4、WriteFCData (0、1、2、256、256、256、256、256、0、0、1、0、0、1、0、0)是什么意思?

案例1:scan();break; 
案例2:Smile();break; 
情况3:梯度();中断; 
判例4:花卉();断裂; 
判例5:Doraemon ();Break; 
判例6:worth();break; 
判例7:Rainbow ();Break; 
情况8:pultrule();break; 
上面的代码是否可以显示该模式?

我想使用 PWM 来控制显示屏的 LED 的单独亮度以及上面提到的代码、有人能不能给出一些建议?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    大家好、Maxwell、

    您将使用 TLC5957还是其他 LED 驱动器?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    大家好、Kenneth!
    我想使用 TLC5957创建一个显示阵列中每个点的亮度不同的显示屏。
    不幸的是、我对 c 语言不是很好、因为在阅读了上述相关文档后、我没有任何想法。
    感谢您花时间回答我的问题、

    麦克斯韦
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    大家好、Maxwell、

    TLC5957的关键功能是 GS 数据写入函数:WriteGSData (GSdata)。

    你对此有什么疑问吗? 您可以参阅以下应用报告中的3.4步骤3:将 GS 数据写入 GS 数据锁存器。
    www.ti.com/.../slvuaf0.pdf
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    大家好、Kenneth!

    感谢您立即回答问题!
    因此、如果我想使用 MSP432P401R 和 TLC5957创建显示。
    您的意思是 Code Composer Studio 的亮度控制代码不仅使用 PWM 代码、对吧?
    您能否举几个 GS 数据代码示例?
    因为我不知道如何在 CCS 中使用这些信息。

    真诚地感谢!

    麦克斯韦
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、Maxwell、

    如果可以打开 WriteGSData (int *temp)的代码,则可以获得以下代码:

    空 WriteGSData (int *temp)

    P4OUT = P4OUT 和位7;//锁存低电平
    对于(i=15;i>=0;i---)

    for (j=47;j>=0;j--)

    TEMP1=1<<(j%16);
    TEMP2=temp[i*3+j/16]&temp1;
    if (temp2=temp1)
    P4OUT = P4OUT|BIT5;// SIN 高电平
    其他
    P4OUT = P4OUT&Bit5;// SIN 低电平

    P4OUT = P4OUT&BIP6;// SCLK 低电平
    P4OUT = P4OUT|BIT6;// SCLK 高电平

    K=I*3+j/16;
    if (j=3&k=0)//LATGS 命令
    P4OUT = P4OUT|BIT7;//锁存高电平
    否则、如果(j==1)//WRTGS 命令
    P4OUT = P4OUT|BIT7;//锁存高电平

    P4OUT = P4OUT 和位7;//锁存低电平

    您只需关注每行的注释、它就可以实现图9的波形。

    它使用 GPIO 模拟高/低波形。