2.6 10-Bit 8-Input Channel A/D Converter (with 8-bit Resolution Mode)
137
s Single Mode
In single conversion mode, the analog input signals selected by the ANS bits and ANE bits are
converted in order until the completion of conversion on the end channel determined by the ANE bits.
A/D conversion then ends. If the start channel and end channel are the same (ANS=ANE), then
conversion will operate on that channel only.
Example 3.
ANS=000, ANE=011
Start → AN0 → AN1 → AN2 → AN3 → End
Example 4.
ANS=010, ANE=010
Start → AN2 → End
q Single Mode: Sample I2OS Startup
Complete conversion of analog input AN1 to AN3
Transfer conversion data in order to address 200H to 205H
Software startup
Highest priority interrupt level
I2OS Settings
Set ICR in interrupt controller
MOV ICR10,#08H............................................................................................... (1)
Set I2OS descriptors
MOV BAPL,#00H ............................................................................................... (2)
MOV BAPM,#02H .............................................................................................. (3)
MOV BAPH,#00H............................................................................................... (4)
MOV ISCS,#18H................................................................................................. (5)
MOV IOAL,#2EH ............................................................................................... (6)
MOV IOAH,#00H ............................................................................................... (6)
MOV DCTL,#03H............................................................................................... (7)
MOV DCTH,#00H .............................................................................................. (7)
Set A/D converter
MOV ADCS0,#0BH ............................................................................................ (8)
MOV ADCS1,#A2H............................................................................................ (9)
Other processing
I2OS ends interrupt sequence
MOV ADCS1,#80H
RETI..................................................................................................................... (10)
(1) Set highest priority interrupt level, start I2OS at interrupt, and set descriptor address
(2)(3)(4) Transfer destination addresses for conversion data
(5) Word-length transfer units, increment transfer destination address after transfer, and
transfer from I/O to memory
(6) Set A/D converter results register
(7) Perform 3 I2OS transfer cycles, equal to number of conversion cycles.
(8) Single mode, start channel AN1, end channel AN3
...