abstract: the ds3514 programmable gamma and vcom voltage generator features gamma buffers that provide 10 bits of resolution. these 10 bits are stored in two 8-bit registers. this application note explains how to calculate the register values for the gamma registers.
introductionthe ds3514 programmable gamma and vcom voltage generator has gamma buffers with 10 bits of resolution. this means that there are 1024 possible gamma output levels. the range of settings for these gamma registers in decimal is 0 to 1023 (000h to 3ffh). this 10-bit value is stored left-justified in two 8-bit registers.
the example below shows how the 10 bits are assigned to the two registers. this example uses the latch a register for gm1, which is addresses 02h and 03h. the most significant byte (msb) is address 02h, and the least significant byte (lsb) is address 03h. the 6 don't care bits in the lsb are read back as 0s.
reg add
bit 7
bit 0
02h
bit 9
bit 8
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
03h
bit 1
bit 0
x
x
x
x
x
x
the following two methods can be used to obtain the correct data to write to these registers.
method 1the first method calculates the msb and the lsb at the same time. first, multiply the desired decimal setting (0 to 1023) by 64 or multiply the hex setting (000h-3ffh) by 40h. alternatively, the binary value can be shifted left six times.
example 1desired setting: dec = 472; hex = 1d8h; bin = 01 1101 1000
472 × 64 = 30208 = 0111 0110 0000 0000
1d8h × 40h = 7600h = 0111 0110 0000 0000
shift binary left 6 bits = 0111 0110 0000 0000
example 2desired setting: dec = 799; hex = 31fh; bin = 11 0001 1111
799 × 64 = 51136 = 1100 0111 1100 0000
31fh × 40h = c7c0h = 1100 0111 1100 0000
shift binary left 6 bits = 1100 0111 1100 0000this 16-bit word can now be broken into two bytes, the msb and lsb. from example 1, the most significant byte is 76h, which will be written to register 02h; the least significant byte is 00h, which will be written to register 03h.
method 2this method calculates the msb and lsb independent of each other. how this method is implemented in code will vary depending on which programming language is used.
the data for the msb is obtained by dividing the decimal value by 4, with no remainder or rounding. this is equivalent to dividing the hex value by 04h or shifting the binary value right 2 bits. the data for the lsb is obtained by anding the original desired setting with 0x003 (00 0000 0011), then shifting this result left 6 bits (multiply by 64 or 40h).
example 3desired setting: dec = 799; hex = 31fh; bin = 11 0001 1111
msb calculation:
799/4 = 199 = c7h = 1100 0111
31fh/04h = c7h = 1100 0111
data shifted right 2 bits = 1100 0111
lsb calculation:
and data with 03h
31fh and 003h = 003h
11 0001 1111 and 00 0000 0011 = 00 0000 0011
data shifted left 6 bits (multiply by 64 or 40h)
3 × 64 = 192 = c0h = 1100 0000
003h × 40h = c0h = 1100 0000
0000 0011 shifted left 6 bits = 1100 0000
programming the gamma databelow is a diagram showing how the data from example 3 can be written to registers 02h and 03h of the ds3514 using i²c communication. this programming assumes that the a0 pin is grounded, thus making the ds3514 slave address c0h. in this example, register 02h is written to c7h and register 03h is written to c0h. this data can also be written using single-byte writes.
ZigBee的研究开发与实现方案
8K产业将迎来巨大的变化 二季度电视面板行业开始有所回暖
FLIR多波段动态成像(MSX)技术简述
畅享7和畅享6S哪个值得买?如何挑选适合的手机
是德科技与新加坡科技设计大学就O-RAN和6G技术签署谅解备忘录
规划10位伽玛寄存器的DS3514-Programming
vivo X20什么时候上市?vivoX20最新消息:史上首款全面屏,骁龙660加屏内指纹识别抢先OPPO
篦冷机轴承位磨损原因及修复方法
千寻位置智能驾驶专有服务通过ASPICE能力3级认证
您可以使用Word查找和替换,多么酷啊?
比特币交易如何保障安全
MSP432如何调试_MSP432开发板串口调试方法
人工智能真的会和人类爆发战争吗?
安森美半导体CCD图像传感器增强性能
常见的几种负载均衡技术介绍
艾利特将推出CS系列协作机器人
紧凑型荧光灯电路
中国移动发力 TD-LTE将提速
华为将有可能推出搭载鸿蒙系统的电子设备
喷雾定量测试仪可用来测定织物的表面润湿性