XC886/888CLM
Analog-to-Digital Converter
User’s Manual
16-17
V1.3, 2010-02
ADC, V 1.0
16.4.6
Wait-for-Read Mode
The wait-for-read mode can be used for all request sources to allow the CPU to treat
each conversion result independently without the risk of data loss. Data loss can occur
if the CPU does not read a conversion result in a result register before a new result
overwrites the previous one.
In wait-for-read mode, the conversion request generated by a request source for a
specific channel will be disabled (and conversion not possible) if the targeted result
register contains valid data (indicated by its valid flag being set). Conversion of the
requested channel will not start unless the valid flag of the targeted result register is
cleared (data is invalid). The wait-for-read mode for a result register can be enabled by
setting bit WFR (see
16.4.7
Result Generation
The result generation part handles the storage of the conversion result, data decimation,
limit checking and interrupt generation.
16.4.7.1
Overview
The result generation of the ADC module consists of several parts:
•
A limit checking unit, comparing the conversion result to two selected boundary
values (BOUND0 and BOUND1). A channel interrupt can be generated according to
the limit check result.
•
A data reduction filter, accumulating the conversion results. The accumulation is
done by adding the new conversion result to the value stored in the selected result
register.
•
Four result registers, storing the conversion results. The software can read the
conversion result from the result registers. The result register used to store the
conversion result is selected individually for each input channel.
*