ENGLISH 简体中文 日本語 한국어  

    Login | Register 


   
 
请输入关键词或器件型号    




应用笔记4331

Programming 10-Bit Gamma Registers on the DS3514

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.

Introduction

The 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 decimals 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 1

The 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 1

Desired 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 2

Desired 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 0000
This 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 2

This 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 3

Desired 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 Data

Below 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.

Figure 1.


相关型号  APP 4331: Jan 20, 2009
DS3514 I²C gamma和VCOM缓冲器,带有EEPROM 完整的数据资料
(PDF, 344kB)
免费样品

自动更新
需要自动接收最新发布的应用笔记吗?请订阅EE-Mail™ (English only)。




我们期待您的反馈!
喜欢?不喜欢?有待改善?或为我们提供建议?请与我们联系 — 我们将根据您的意见或建议改善我们的工作。 网页评价或提供建议

 

下载,PDF格式下载,PDF格式 (29kB)
 AN4331, AN 4331, APP4331, Appnote4331, Appnote 4331

        •         •         •     隐私权政策     •     法律声明

    © 2009 Maxim Integrated Products版权所有