HD6435348R Hitachi Semiconductor, HD6435348R Datasheet - Page 308

no-image

HD6435348R

Manufacturer Part Number
HD6435348R
Description
Single-Chip Microcomputer
Manufacturer
Hitachi Semiconductor
Datasheet
15.4.2 Scan Mode (SCAN = 1)
The scan mode can be used to monitor analog inputs on one or more channels. When the ADST
bit is set to 1, A/D conversion starts from the first channel selected by the CH bits. When
CH2 = 0 the first channel is AN
If the scan group includes more than one channel (i.e. if bit CH1 or CH0 is set), conversion of the
next channel begins as soon as conversion of the first channel ends.
Conversion of the selected channels continues cyclically until the ADST bit is cleared to 0. The
conversion results are placed in the data registers corresponding to the selected channels.
Before selecting the scan mode, clock, and analog input channels, software should clear the ADST
bit to 0 to make sure the A/D converter is stopped. Changing the mode, clock, or channel
selection while A/D conversion is in progress can lead to conversion errors.
The following example explains the A/D conversion process when three channels in group 0 are
selected (AN
1. Software clears the ADST bit to 0, then selects the scan mode (SCAN = 1), scan group 0
2. The A/D converter samples the input at AN
3. Next the A/D converter samples and converts AN
4. After all selected channels (AN
5. Steps 2 to 4 are repeated cyclically as long as the ADST bit remains set to 1.
To stop the A/D converter, software must clear the ADST bit to 0.
(CH2 = 0), and analog input channels AN
to 1 to start A/D conversion.
Coding Example: (with slow clock and ADI interrupt enabled)
transfers the result to register ADDRA.
samples and converts AN
bit to 1. If the ADIE bit is set to 1, an A/D interrupt (ADI) is requested. Then the A/D
converter begins converting AN
BCLR #5, @H'FEE8
MOV.B #H'72, @FEE8
0
, AN
1
, and AN
2
2
). Figure 15-4 shows the corresponding timing chart.
and transfers the result to ADDRC.
0
. When CH2 = 1 the first channel is AN
0
0
to AN
again.
2
) have been converted, the AD converter sets the ADF
0
to AN
0
294
, converts the voltage level to a digital value, and
2
1
(CH1 and CH0 = 0) and sets the ADST bit
and transfers the result to ADDRB. Then it
4
.

Related parts for HD6435348R