The output result of the ADC depends on the settings in the CH[n].CONFIG and RESOLUTION registers as shown in the following equation.
RESULT = [V(P) – V(N) ] * GAIN/REFERENCE * 2(RESOLUTION - m)
| Variable | Description |
|---|---|
| V(P) | Voltage at input P |
| V(N) | Voltage at input N |
| GAIN | Selected gain setting |
| m | Mode setting (Use m=0 if CONFIG.MODE=SE, or m=1 if CONFIG.MODE=Diff) |
| REFERENCE | Selected reference voltage |
The result generated by the ADC will deviate from the expected due DC errors like offset, gain, differential non-linearity (DNL), and integral non-linearity (INL). See Electrical specification for details on these parameters. The result can also vary due to AC errors like non-linearities in the GAIN block, settling errors due to high source impedance and sampling jitter. For battery measurement, the DC errors are most noticeable.
The ADC has a wide selection of gains controlled in the GAIN field of the CH[n].CONFIG register. If CH[n].CONFIG.REFSEL=0, the input range of the ADC core is nominally ±0.6 V differential, and the input must be scaled accordingly.
The ADC has a temperature dependent offset. If the ADC is to operate over a large temperature range, it is recommended to run CALIBRATEOFFSET at regular intervals. The CALIBRATEDONE, DONE, and RESULTDONE events will be generated when the calibration has completed.