TLC59401 的总结
来源:互联网 发布:百帝王啤酒知乎 编辑:程序博客网 时间:2024/06/16 12:21
一、芯片的引脚定义以及作用
31: BLANK When BLANK is high, all OUTn outputs are forced OFF. GS counter is also reset.
When BLANK is low, OUTn are controlled by the grayscale PWM control.
24: GSCLK Reference clock for grayscale PWM control (由TIME3提供方波)
1: SCLK Serial data shift clock (为SIN的写入提供输送 SCLK)
2: SIN Serial data input (高电平写入的为1低电平写入的为0)
23: SOUT Serial data output
3: MODE Input mode-change pin. When MODE = GND, the device is in GS mode. When MODE = VCC, the device is in DC mode.
32: XLAT Level triggered latch signal. When XLAT is high, the TLC59401 writes data from the input shift register to either GS register (MODE is low) or DC register (MODE is high). When XLAT is low, the data in the GS or DC registers are held constant and do not change.
二、两种重要的模式GS MODE和DC MODE
3: MODE Input mode-change pin. When MODE = GND, the device is in GS mode. When MODE = VCC, the device is in DC mode.
the GS data must be set before the DC data is set.(设置GS数据之前必须设置DC数据)
XLAT must be low when the MODE pin goes high-to-low or low-to-high to change back and forth between GS mode and DC mode.
1、 SETTING DOT CORRECTION
The TLC59401 has the capability to fine-adjust the output current of each channel (OUT0 to OUT15) independently.(每个灯的电流都可以独立控制)
Each of the 16 channels can be programmed with a 6-bit word.(63级) 6-bit*16 = 96bit. 每个灯的控制点占用6bit。
The channel output can be adjusted in 64 steps from 0% to 100% of the maximum output current Imax.
(共有64级灯亮的控制)
在设计计算机系统的时候,有两种处理内存中数据的方法。一种叫为little-endian,存放在内存中最低位的数值是来自数据的最右边部分(也就是数据的最低位部分)
Big-Endian format 最低位来自最左边的数据。
数据的传输形式:
The format is Big-Endian format. In this format, the MSB is transmitted first, followed by the MSB-1, etc.
相关代码的实现:
if(type == DC_MODE)
{
for(uint8_t i = 0; i < 16; i++) //
{
dc_data = p_tlc->led_dc_data_buff[15-i];
for(uint8_t t = 0; t < 6; t++)
{
if(dc_data & 0x20)
{
HAL_GPIO_WritePin(IR_SIN_GPIO_Port,IR_SIN_Pin,GPIO_PIN_SET);
HAL_GPIO_WritePin(IR_SCLK_GPIO_Port,IR_SCLK_Pin,GPIO_PIN_SET); //
HAL_GPIO_WritePin(IR_SCLK_GPIO_Port,IR_SCLK_Pin,GPIO_PIN_RESET);
}
else
{
HAL_GPIO_WritePin(IR_SIN_GPIO_Port,IR_SIN_Pin,GPIO_PIN_RESET);
HAL_GPIO_WritePin(IR_SCLK_GPIO_Port,IR_SCLK_Pin,GPIO_PIN_SET);
HAL_GPIO_WritePin(IR_SCLK_GPIO_Port,IR_SCLK_Pin,GPIO_PIN_RESET);
}
dc_data = dc_data << 1;
}
}
}
2、SETTING GRAYSCALE
The use of 12 bits per channel results in 4096 different brightness steps, from 0% to 100% brightness.
3、GRAYSCALE PWM OPERATION
The first GSCLK pulse after BLANK goes low increases the grayscale counter by one and switches on all OUTn with a grayscale value not equal to zero.
Each following rising edge of GSCLK increases the grayscale counter by one.
The TLC59401 compares the grayscale value of each output OUTn with the grayscale counter value. All OUTn with grayscale values equal to the counter values are switched off.
Output On-Time
- TLC59401 的总结
- 总结(算不上总结的总结)
- [总结】半年的总结
- 总结的
- 【总结】:本科毕业的简单总结
- 开发总结:Android反编译方法的总结
- [总结]对JFace的一点总结
- [总结]对JFace的一点总结
- 刘徐阳总结的一些编程总结
- 总结的常用时间函数总结
- 排序总结(总结的非常好)
- Java学习- 他人的 总结 printf总结
- 测试工作经验总结3:简短的总结?
- 关于实习:不是总结的总结
- 非常好的动态规划总结,DP总结
- 总结:数据清洗的一些总结
- 我的应聘总结!
- 一年工作的总结
- MOOC清华《程序设计基础》第5章第4题:用递归算法实现选择排序
- CC2640R2F UART
- 概率论:p(x|theta)和p(x;theta)的区别
- PLSQL是什么、为什么要用PLSQL
- python pip 装包出现 timeout error!
- TLC59401 的总结
- 程序员转型产品经理
- BFS 八数码问题 typedef int State[9]; (BFS A*算法与优先队列)
- 20170717
- 微信公众平台 多客服解决开启服务端失效方法
- JavaWeb学习总结(四十七)——监听器(Listener)在开发中的应用
- git小白学习之路
- JavaScript基础的一些小总结
- http://blog.csdn.net/wemedia/details.html?id=40237