6 Programming Hints
Data Correction
6.1
There are two errors which affect the DC accuracy of the ADC and the DACs.
x
Offset Error:
ADC: The data value when converting with the input connected to its own ground in single-ended mode, or
with shorted inputs in differential mode. This error is corrected by subtracting the known error from the
readings.
DAC: The data value that is required to get a zero voltage output signal. This error is corrected by
subtracting the known error from the data value.
x
Gain Error:
ADC: The difference between the ideal gain and the actual gain of the programmable gain amplifier and
the ADC. It is corrected by multiplying the reading with a correction factor.
DAC: The difference between the ideal gain and the actual gain of the DAC. It is corrected by multiplying
the data value with a correction factor.
The data correction values are obtained during factory calibration and are stored in the Calibration Data ROM.
6.1.1
ADC Correction Formula
Please use the total 16 bit data register value for the ADC correction formula.
The basic formula for correcting any ADC reading for the TPMC851 (bipolar input voltage range) is:
Value
=
Reading
4
131072
1
corr
corr
Offset
Gain
¸
¹
·
¨
©
§
Value
is the corrected result.
Reading
is the data read from the ADC Data Register.
Gain
corr
and
Offset
corr
are the ADC correction factors from the Calibration Data ROM stored for each gain factor
and are the same for all channel 1-32.
The correction values are stored as two’s complement 16 bit values in the range -32768 to 32767. For higher
accuracy they are scaled to ¼ LSB.
Floating point arithmetic or scaled integer arithmetic is necessary to avoid rounding error while
computing above formula.
TPMC851 User Manual Issue 1.0.9
Page 47 of 65