HD6413308 Hitachi Semiconductor, HD6413308 Datasheet - Page 229

no-image

HD6413308

Manufacturer Part Number
HD6413308
Description
Hitachi Single-Chip MicroComputer
Manufacturer
Hitachi Semiconductor
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HD6413308CP10
Manufacturer:
RENESAS
Quantity:
776
Part Number:
HD6413308CP10
Manufacturer:
HITACAI
Quantity:
20 000
Part Number:
HD6413308CP10V
Manufacturer:
RENESAS
Quantity:
776
Part Number:
HD6413308RCP10
Manufacturer:
HITACHI/日立
Quantity:
20 000
Part Number:
HD6413308RF8
Manufacturer:
NEC
Quantity:
2 468
Part Number:
HD6413308RF8
Manufacturer:
HITACHI/日立
Quantity:
20 000
10.3.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,” either by software or by a High-to-Low transition of the ADTRG signal (if enabled),
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. The A/D
data registers are readable by the CPU.
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. A/D conversion begins
when the ADST bit is set to "1" again. The same instruction can be used to alter the mode and
channel selection and set ADST to "1."
The following example explains the A/D conversion process when three channels in group 0 are
selected (AN
corresponding timing chart.
(1) Software clears the ADST bit to “0,” then selects the scan mode (SCAN = “1”), scan group 0
(CH2 = “0”), and analog input channels AN0 to AN2 (CH1 and CH0 = “0”) and sets the
ADST bit to “1” to start A/D conversion.
Coding Example: (with slow clock and ADI interrupt enabled)
BCLR #5, @H’FFE8
MOV.B #H’7F, ROL
MOV.B ROL, @H’FFEA
MOV.B #H’72, ROL
MOV.B ROL, @H’FFE8
Value set in ADCSR
0
, AN
0
. When CH2 = “1” the first channel is AN
ADF
1
, and AN
0
ADIE
2
) and the external trigger is disabled. Figure 10-4 shows the
1
;Clear ADST
;Disable external trigger
;Select mode and channels and set ADST to "1"
ADST
1
SCAN
217
1
4
CKS
.
0
CH2
0
CH1
1
CH0
0

Related parts for HD6413308