Other Parts Discussed in Thread: ADS1118, ADS1018
Hi everone, good afternoon.
I encountered several issues while debugging this ADC conversion chip (ADS1018) using the latest ADS1118 driver package from GitHub, as detailed below:
-
After power-on, I waited 5 seconds for the power supply to stabilize before initializing the chip. I found that the
adcStartup()
initialization function reads and writes the value of the CONFIG register, but the value read at this time is incorrect. I then modified the code to first write the desired CONFIG register value (with NOP[1:0] = 0b01) before initialization. However, the CONFIG register value read back was still incorrect (random). Analyzing the SPI data with a logic analyzer showed that the SPI write data was correct, but the configuration written did not take effect. This caused subsequent calls to the temperature/AD value read functions to write incorrect CONFIG values, preventing correct temperature/AD value readings.
The current workaround is to skip this function and directly write the configuration register, after which temperature/AD values can be read normally. -
I configured the CONFIG register to 0xC1C3, 0xD1C3, and 0xE1C3 (single-shot mode) and called the
ads1118_measure_internal_temperature_example()
function to read the AD samples and temperature values from pins AN0, AN1, and AN2. I found that the AD values from the three analog ports were混乱 (chaotic). Suspecting a conversion time delay, I tried calling theAds1x18_ReadData()
function twice within the single-shot mode read function. This resolved the chaotic AD values, but introduced a new issue: reading with these three configurations (0xC1C3 for AN0, 0xD1C3 for AN1, 0xE1C3 for AN2) in single-shot mode resulted in the value for AN0 being the value for AN2, AN1 being AN0, and AN2 being AN1. I suspect this is related to the chip's conversion mechanism. I haven't resolved this channel misalignment issue yet and have temporarily swapped the three read results. -
This is the final and most critical issue. I am using a VDD of 5V and AINN connected to GND, so the CONFIG register is set with PGA[2:0] = 0b000 (FSR is ±6.144 V). When reading the AD values, I found a discrepancy between the actual voltage measured with a multimeter at the chip's sampling point and the voltage calculated from the register's AD value. For example, using a 10kΩ resistor, the voltage input to AN2 measured 2.007V with a multimeter, matching the expected design value. However, the register read value was 0x1FD, which converts to 1.527V—a difference of about 0.48V. Testing with different resistances showed a consistent difference of approximately 0.48V between the measured voltage and the converted AD value. I have been unable to resolve this issue and would appreciate a response from TI engineers. Thank you very much.
ADC Performance Data: Calculated vs. Measured Voltage
Resistance (Ω) AD Value (HEX) AD Value (DEC) Calculated Voltage (V) Measured Voltage (V) Voltage Difference (V) 1k A 10 0.030 0.515 0.485 2k 5D 93 0.279 0.761 0.482 3k A6 166 0.498 0.979 0.481 4k E6 230 0.690 1.173 0.483 5k 121 289 0.867 1.348 0.481 6k 155 341 1.023 1.505 0.482 7k 185 389 1.167 1.648 0.481 8k 1B1 433 1.299 1.778 0.479 9k 1D8 472 1.416 1.890 0.474 10k 1FD 509 1.527 2.007 0.480 20k 2F7 759 2.277 2.754 0.477 30k 380 896 2.688 3.167 0.479 40k 3D6 982 2.946 3.427 0.481 50k 415 1045 3.135 3.608 0.473 60k 441 1089 3.267 3.739 0.472 70k 462 1122 3.366 3.841 0.475 80k 47C 1148 3.444 3.919 0.475 90k 492 1170 3.510 3.984 0.474 100k 4A5 1189 3.567 4.037 0.470 Best regards,
Fei.