Method of implementing high-resolution nonvolatile digital potentiometer by software

Publisher:peon1989Latest update time:2012-02-08 Source: 今日电子 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

By cleverly using software programming, the four 64-tap digital potentiometers inside the X9241 are combined into a high-resolution, low-cost digital potentiometer.

Digital potentiometer (DCP) is a new type of integrated circuit designed to replace traditional mechanical potentiometers and variable resistors. It interfaces with MCU through I2C, SPI and CS, U/D, INC three-wire mode, which can realize application program control adjustment, and also has button control mode, thus realizing the same potential and resistance adjustment function as traditional mechanical potentiometers or variable resistors. Compared with traditional mechanical potentiometers, digital potentiometers have outstanding advantages such as digital adjustment, long life, easy assembly, space saving, and no vibration. They have been widely used in various fields such as medical equipment, instrumentation, industrial control, computers, household appliances, mobile phones, digital products, etc.

In some applications, such as dynamic bias adjustment of laser diodes, the use of digital potentiometers or fine-tuning DACs to control voltage is limited by resolution, interface, and cost. To solve this problem, we will introduce here a solution to use the low-resolution (64-tap), low-cost Intersil (Xicor) I2C bus controlled digital potentiometer X9241 to form a high-resolution (8001-tap) digital potentiometer.

Principles of achieving high resolution

We assume that there are three digital potentiometers, POT1 and POT2 are 64-tap DCPs, and POT3 is a 128-tap DCP. POT1 and POT2 are used as the settings of VH and VL of POT3, and it must be ensured that POT1 and POT2 are always in the "1" position interval, then there are 63 different voltage intervals applied to POT3. In theory, when POT3 jumps between the special voltage tap 127 and the tap 0 of the next voltage interval, there should be a redundant tap position, but these taps are not redundant, and their role can improve the linearity of the output because the voltages of tap 0 and tap 127 in the two adjacent voltage intervals are the same. For each of the 63 different intervals, with the help of 127 different outputs, there will be 8001 (63×127=8001) different Vw outputs that can be obtained between VH and VL. Figure 1 illustrates this concept.

How to achieve high resolution (8001 taps) using X9241

Intersil (Xicor)'s X9241 integrates four non-volatile digital potentiometers in a monolithic CMOS microcircuit. Its functional block diagram is shown in Figure 2. The X9241 contains four resistor arrays, each containing 63 resistor cells. There are tap points between each cell and at both ends that can be accessed by the sliding unit. The position of the sliding unit in the array is controlled by the user through the I2C bus. Each resistor array is associated with a wiper count register (WCR) and four 8-bit data registers. The four data registers and the wiper count register can be directly written and read by the user. The contents of the wiper count register control the position of the wiper in the resistor array. The contents of the data register can be transferred to the wiper count register to set the wiper position, and the current wiper position can also be transferred to any associated data register. The wiper count register is volatile. When the device is powered on, the wiper count register is automatically loaded with the value in data register 0 (R0). The four data registers are non-volatile and can be used as general storage units to store system parameters or user data if the application does not require the potentiometer to have multiple settings saved.

X9241 has a special mechanism inside that allows adjacent digital potentiometers to be connected in series one by one. This allows up to 253 different tap positions (when all DCPs are connected in series one by one). As shown in Figure 3, we connect POT1 and POT2 (two adjacent DCPs inside X9241) in series, use POT0 to provide VH (adjustable), and use POT3 to provide VL (adjustable). Then we get the same circuit diagram as described above.

POT0 and POT3 set the terminal voltage for POT1-2 (POT1 and POT2 are connected in series). It is also necessary to ensure that POT1 and POT3 are always at the "1" position interval, so there are 63 different voltage intervals applied to POT1-2. As the position of the sliding end of POT1-2 moves up or down to the end point, the position of POT0 and POT3 should also be adjusted when necessary. If the sliding end of POT1-2 increases to more than 127, then POT0 and POT3 will increase by "1", and the sliding end of POT1-2 will return to tap 0. Similarly, when the sliding end of POT1-2 decreases below tap 0, the sliding ends of POT0 and POT3 will decrease by "1" and set the tap of POT1-2 to 127. Please pay attention to this point when understanding the program list attached below.

The X9241 is very suitable for this task because it has exactly four independent DCPs inside and a mechanism for connecting adjacent DCPs in series. In addition, it uses an I2C bus control interface, and the tap position can be changed directly in the software without going through each intermediate position conversion.

Figure 4 shows the typical results between adjacent taps obtained by testing the circuit using the X9241U (49.37K, 49.38K, 49.32K, 49.24K) device. The large figure shows the percentage of the sliding terminal voltage of each tap to the total applied voltage, and the inset shows the percentage of the resolution between adjacent taps to the total applied voltage.

Software code for achieving high resolution using X9241

In order to facilitate understanding of the details of the control implementation, we provide C language source code (the code is provided by Xicor, and we have made some modifications). Users only need to write I2C hardware interface functions suitable for different microcontrollers (the function names are consistent with those introduced in the program), add the source code we provide to the application program, and simply call the 5 functions introduced in the program to easily achieve high-resolution control of DCP.

Reference address:Method of implementing high-resolution nonvolatile digital potentiometer by software

Previous article:Debugging Power Factor Correction Circuits Using Digital Phosphor Oscilloscopes
Next article:Using the port address of the microcontroller to control the LCD display

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号