Z8 Encore! XP® 4K Series
Product Specification
119
ADC interrupt. The register bits denoting ADC alarm status can only be set by hardware
and are cleared by writing a 1.
Calibration and Compensation
The Z8 Encore! XP® 4K Series ADC is factory calibrated for offset error and gain error,
with the compensation data stored in Flash memory. Alternatively, users can perform their
own calibration, storing the values into Flash themselves. Thirdly, the user code can per-
form 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, one for offset and two
for gain correction. See ZiLOG Calibration Data on page 155 for a list of input modes for
which calibration data exists.
User Calibration
If the user has precision references available, its own external calibration can be per-
formed using any input modes. This calibration data will take into account buffer offset
and non-linearity, so 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 (see Table 138, Analog-to-Digital Con-
verter Electrical Characteristics and Timing, on page 221 for details). Subsequently, man-
ual offset calibration capability is built into the block. When the ADC Control Register 0
sets the input mode (ANAIN[2:0]) to MANUAL 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 non-volatile memory (Non-Volatile Data Storage on
page 163) and accessed by user code to compensate for the input offset error.
There is no provision for manual gain calibration.
Software Compensation Procedure Using Factory Calibration Data
Overview. The value read from the ADC high and low byte registers is uncompen-
sated. The user mode software must apply gain and offset correction to this uncom-
pensated value for maximum accuracy. The following formula yields the compensated
value:
ADCcomp = (ADCuncomp - OFFCAL) + ((ADCuncomp - OFFCAL)*GAINCAL)/216
PS022815-0206
Analog-to-Digital Converter