2.6 10-Bit 8-Input Channel A/D Converter (with 8-bit Resolution Mode)
141
s Stop Mode
In stop mode the analog input signals selected by the ANS bits and ANE bits are converted in order, but
conversion operation pauses for each channel. The pause is released by applying another start signal. At
the completion of conversion on the end channel determined by the ANE bits, the converter returns to
the ANS channel for analog input signal and repeats the conversion process continuously.
If the start channel and end channel are the same (ANS=ANE), then conversion will operate
continuously on that channel only.
Example 1.
ANS=000, ANE=011
Start → AN0 → stop → start → AN1 → stop → start → AN2
→ stop → start → AN3 → stop → start → AN0 ... → repeat
Example 2.
ANS=010, ANE=010
Start → AN2 → stop → start → AN2 → stop → start → AN2 ... → repeat
In stop mode the startup source is only the source determined by the STS1, STS0 bits. This mode
enables synchronization of the conversion start signal.
q Stop Mode: Sample I2OS Startup
Execute conversion of analog input channel AN3 12 times at fixed intervals.
Transfer data in order to address 600H to 617H
Startup at external signal edge
Interrupt level at highest priority
I2OS Settings
Set ICR in interrupt controller
MOV ICR10,#08H............................................................................................... (1)
Set I2OS descriptors
MOV BAPL,#00H ............................................................................................... (2)
MOV BAPM,#06H .............................................................................................. (3)
MOV BAPH,#00H............................................................................................... (4)
MOV ISCS,#18H................................................................................................. (5)
MOV IOAL,#2EH ............................................................................................... (6)
MOV IOAH,#00H ............................................................................................... (6)
MOV DCTL,#0CH .............................................................................................. (7)
MOV DCTH,#00H .............................................................................................. (7)
Set A/D converter
MOV ADCS0,#DBH ............................................................................................ (8)
MOV ADCS1,#A4H............................................................................................. (9)
Other processing
I2OS end interrupt sequence
MOV ADCS1,#80H............................................................................................. (10)
RETI
(1) Set interrupt level at highest priority, start I2OS at interrupt, and set descriptor address
...