Rev. 5.00, 12/03, page 529 of 1088
14.4.2
Scan Mode (SCAN = 1)
Scan mode is useful for monitoring analog inputs in a group of one or more channels. When the
ADST bit is set to 1 by software, or by timer or external trigger input, A/D conversion starts on the
first channel in the group (AN0). When two or more channels are selected, after conversion of the
first channel ends, conversion of the second channel (AN1) starts immediately. A/D conversion
continues cyclically on the selected channels until the ADST bit is cleared to 0. The conversion
results are transferred for storage into the ADDR registers corresponding to the channels.
When the operating mode or analog input channel must be changed during analog conversion, to
prevent incorrect operation, first clear the ADST bit to 0 in ADCSR to halt A/D conversion. After
making the necessary changes, set the ADST bit to 1 to start A/D conversion again. The ADST
bit can be set at the same time as the operating mode or input channel is changed.
Typical operations when three channels (AN0 to AN2) are selected in scan mode are described
next. Figure 14-4 shows a timing diagram for this example.
[1] Scan mode is selected (SCAN = 1), scan group 0 is selected (CH2 = 0), analog input channels
AN0 to AN2 are selected (CH1 = 1, CH0 = 0), and A/D conversion is started (ADST = 1)
[2] When A/D conversion of the first channel (AN0) is completed, the result is transferred to
ADDRA. Next, conversion of the second channel (AN1) starts automatically.
[3] Conversion proceeds in the same way through the third channel (AN2).
[4] When conversion of all the selected channels (AN0 to AN2) is completed, the ADF flag is set
to 1 and conversion of the first channel (AN0) starts again. If the ADIE bit is set to 1 at this
time, an ADI interrupt is requested after A/D conversion ends.
[5] Steps [2] to [4] are repeated as long as the ADST bit remains set to 1. When the ADST bit is
cleared to 0, A/D conversion stops. After that, if the ADST bit is set to 1, A/D conversion
starts again from the first channel (AN0).
Содержание H8S/2318 series
Страница 2: ......
Страница 6: ...Rev 5 00 12 03 page vi of xxx...
Страница 12: ...Rev 5 00 12 03 page xii of xxx...
Страница 30: ...Rev 5 00 12 03 page xxx of xxx...
Страница 54: ...Rev 5 00 12 03 page 24 of 1088...
Страница 98: ...Rev 5 00 12 03 page 68 of 1088...
Страница 128: ...Rev 5 00 12 03 page 98 of 1088...
Страница 138: ...Rev 5 00 12 03 page 108 of 1088...
Страница 168: ...Rev 5 00 12 03 page 138 of 1088...
Страница 212: ...Rev 5 00 12 03 page 182 of 1088...
Страница 324: ...Rev 5 00 12 03 page 294 of 1088...
Страница 436: ...Rev 5 00 12 03 page 406 of 1088...
Страница 546: ...Rev 5 00 12 03 page 516 of 1088...
Страница 580: ...Rev 5 00 12 03 page 550 of 1088...
Страница 822: ...Rev 5 00 12 03 page 792 of 1088...
Страница 876: ...Rev 5 00 12 03 page 846 of 1088...
Страница 901: ...Rev 5 00 12 03 page 871 of 1088 A 2 Instruction Codes Table A 2 shows the instruction codes...
Страница 1121: ...H8S 2319 Group H8S 2318 Group Hardware Manual REJ09B0089 0500O...