Digital Potentiometer X9241
X9241 Basic Functions
XICOR's X9241 integrates four non-volatile E2POTs. Each E2POT contains 63 resistor units, a sliding end count register (WCR) and four 8-bit data registers that can be read and written by the user. The content of the sliding end count register is used to control the position of the sliding end in the resistor array, and can perform bidirectional data transmission with the data register.
X9241 communication protocol
Working sequence
X9241 supports dual bus directional protocol, which stipulates that it is a transmitter when transmitting data to the bus and a receiver when receiving data from the bus. In this process, the device that controls the transmission is the host, and the device being controlled is the slave. In this solution, the functions of starting data transmission and providing clock are provided by the microcontroller, so X9241 is a slave device here.
A successful operation of X9241 must include the following steps:
Start condition: SDA jumps from high to low when SCL is high;
Response: Provide a handshake signal between the master and slave bus to indicate successful data reception. The microcontroller releases the SDA bus (sets SDA to 1) after sending 8 bits of data, and the X9241 pulls the SDA line low in the ninth clock cycle as a response to the successful reception of the first 8 bits of data.
Termination condition: When SCL is high, SDA changes from low to high. The specific working sequence is shown in Figure 1.
Figure 1 X9241 working sequence
X9241 and AT89C51 interface
Since the commonly used AT89C51 series processors do not have an I2C interface component, the interface with the X9241 is very inconvenient. Carefully analyzing the working sequence of Figure 1, the function of the I2C bus can be simulated through a general I/O bus and a timer, that is, the two lines of the P1 port are used as the SDA and SCL buses respectively, and the required clock is generated by timer 1. The specific circuit connection is shown in Figure 2.
Figure 2 X9241 and AT89C51 interface circuit
The following is an example of a three-byte instruction that writes a value to the sliding end count register to give a specific procedure:
SCL BIT P1.6
SDA BIT P1.7
MAIN:
……
MOV TMOD,#02H ; Set timing working mode 2,
timing
MOV TH0,#0E8H
MOV TL0,#0E8H
SETB EA ; Open interrupt
SETB ET0
SETB TR0 SETB SCL ; Start an operation
SETB SDA
CLR SDA
MOV A,#50H ; Select slave device
ACALL WRTA
MOV A,#0C0H ; Set write instruction format
ACALL WRTA
MOV A,#3FH ; Assign value to WCR
ACALL WRTA
JNB SCL, $ ; End this operation
SETB SDA
CLR SDA
WRTA: MOV R2,#08H
WRTA0: JB SCL, $ ; Wait for the rising edge of the clock signal
RLC A ; Send data to the digital potentiometer one by one
MOV SDA, C
JNB SCL, $
DJNZ R2, WRTA0
JB SCL, $ ; Wait for the digital potentiometer to receive the response
SETB SDA
JB SDA, $
JNB SCL, $
RET
INT: CPL P1.6 ; Invert and generate the required clock signal
RETI
……
Application of X9241 in Battery Monitoring Unit
Theoretically, the digital potentiometer can realize the conversion of any range. However, due to the limitation of the accuracy of the analog-to-digital converter and the high real-time requirements of the battery monitoring unit, selecting too many conversion points will result in half the effort with twice the results. Through experiments, it is found that only six ranges of 1:1, 1:2, 1:5, 1:10, 1:20, and 1:50 are needed to ensure that the input signal is near 2/3 of the range of the analog-to-digital converter. Therefore, the two-way data transmission function between the sliding end count register and the data register is cleverly used here to realize the online conversion of the above six ranges. The specific circuit for realizing online range conversion is shown in Figure 3. The specific implementation method is: the value stored in R0 of the two E2POTs is 01H. Since the sliding end count register will automatically load the value in R0 when the power is reset, the amplifier is a follower during initialization. When it is necessary to measure weak current, the value obtained by the initial acquisition is compared with the pre-set reference value, and the appropriate range is selected for amplification and re-acquisition.
Figure 3 Implementation circuit of online range conversion
Conclusion
The experimental results show that it is very convenient to use X9241 to realize online conversion of measurement range. The real-time online adjustment of six ranges simplifies the circuit design and ensures the accuracy of data acquisition. However, it is found in the experiment that sometimes oscillation occurs at the output end, causing output waveform distortion. The solution is to connect two resistors in series at the input and feedback ends of the amplifier to increase the attenuation channel to the input end.
Previous article:Output overvoltage protection circuit
Next article:Advanced Lithium Battery Linear Charge Management Chip BQ2057 and Its Application
Recommended ReadingLatest update time:2024-11-16 17:37
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to achieve automated testing of LCR?
- Which company can make PCB boards with a width of about 2MM?
- How to speed up the program running speed of Huada HC32F460 HC32F4A0?
- FPDLINK Spark Interference Optimization
- Why do electrolytic capacitors explode? Find out in one article!
- [Iprober 520 current probe] Calibration and use in PCB mode
- A brief history of hard disk interface evolution
- Hot plug and unplug
- EEWORLD University ---- STM32CubeMX and STM32Cube HAL basics
- [TI mmWave Radar Evaluation]_3_AWR1843BOOST Corridor Ranging Test Environment