Analog-to-Digital Converter (ADC)
Functional Description
MC68HC908SR12MC68HC08SR12 — Rev. 5.0
Data Sheet
Freescale Semiconductor
Analog-to-Digital Converter (ADC)
237
15.4.4 Continuous Conversion
In the continuous conversion mode, the ADC continuously converts the
selected channel, filling the ADC data register with new data after each
conversion. Data from the previous conversion will be overwritten
whether that data has been read or not. Conversions will continue until
the ADCO bit is cleared. The COCO bit is set after each conversion and
can be cleared by writing to the ADC status and control register or
reading of the ADRL0 data register.
15.4.5 Auto-scan Mode
In auto-scan mode, the ADC input channel is selected by the value of the
2-bit up-counter, instead of the channel select bits, ADCH[4:0]. The
value of the counter also defines the data register ADRLx to be used to
store the conversion result. When ASCAN bit is set, a write to ADC
status and control register (ADSCR) will reset the auto-scan up-counter
and ADC conversion will start on the channel 0 up to the channel number
defined by the integer value of AUTO[1:0]. After a channel conversion is
completed, data is stored in ADRLx and the COCO-bit will be set. The
counter value will be incremented by 1 and a new conversion will start.
This process will continue until the counter value reaches the value of
AUTO[1:0]. When this happens, it indicates that the current channel is
the last channel to be converted. Upon the completion on the last
channel, the counter value will not be incremented and no further
conversion will be performed. To start another auto-scan cycle, a write
to ADSCR must be performed.
NOTE:
The system only provides 8-bit data storage in auto-scan code, user
must clear MODE[1:0] bits to select 8-bit truncation mode before
entering auto-scan mode.
It is recommended that user should disable the auto-scan function
before switching channel and also before entering STOP mode.