English
Language : 

Z8F082ASH020SC Datasheet, PDF (132/244 Pages) Zilog, Inc. – Z8 Encore XP-R F08xA Series with eXtended Peripherals
Z8 Encore! XP® F08xA Series
Product Specification
114
Calibration and Compensation
The Z8 Encore! XP® F08xA Series ADC can be factory calibrated for offset error and gain
error, with the compensation data stored in Flash memory. Alternatively, user code can
perform its own calibration, storing the values into Flash themselves. Thirdly, the user
code can perform a manual offset calibration during DIFFERENTIAL mode operation.
Factory Calibration
Devices that have been factory calibrated contain 30 bytes of calibration data in the Flash
option bit space. This data consists of 3 bytes for each input mode. See “ZiLOG Calibra-
tion Bits” on page 145. There is 1 byte for offset, 2 bytes for gain correction.
User Calibration
If the user has precision references available, its own external calibration can be per-
formed using any of the three available input modes. Because the calibration data consid-
ers buffer offset and non-linearity, it is recommended that this calibration be performed
separately for each of the ADC input modes planned for use.
Manual Offset Calibration
When uncalibrated, the ADC has significant offset (up to 35 mV with unity gain and up to
250 mV in 20x gain mode). Subsequently, manual offset calibration capability is built into
the block. When the ADC Control Register 0 sets the input mode (ANAIN[2:0]) to MAN-
UAL OFFSET CALIBRATION mode, the differential inputs to the ADC are shorted
together by an internal switch. Reading the ADC value at this point produces 0 in an ideal
system. The value actually read is the ADC offset. This value can be stored in flash and
accessed by user code to compensate for the input offset error.
There is no provision for manual gain calibration.
Note:
Software Compensation Procedure
The value read from the ADC high and low byte registers are uncompensated. The user
mode software must apply gain and offset correction to this uncompensated value for
maximum accuracy. The following formula yields the compensated value:
ADCcomp = (ADCuncomp - OFFCAL) + ((ADC uncomp - OFFCAL)*GAINCAL)/216
where GAINCAL is the gain calibration byte, OFFCAL is the offset calibration byte and
ADCuncomp is the uncompensated value read from the ADC. The OFFCAL value is in
two’s complement format, as are the compensated and uncompensated ADC values.
The offset compensation is performed first, followed by the gain compensation. One bit of
resolution is lost because of rounding on both the offset and gain computations. As a result
the ADC registers read back 13 bits: 1 sign bit, two calibration bits lost to rounding and 10
data bits.
PS024705-0405
PRELIMINARY
Analog-to-Digital Converter