A-D CONVERTER
12.9 Single sweep mode
12.9 Single sweep mode
In the single sweep mode, the operation for the input voltages from multiple selected analog input pins are
performed, one at a time. The operation is performed in ascending sequence from pin AN0 to pin AN7. An
A-D conversion interrupt request occurs when the operations for all selected analog input pins are completed.
12.9.1 Settings for single sweep mode
Figures 12.9.1 and 12.9.2 show initial setting examples for related registers in the single sweep mode.
When using an interrupt, it is necessary to set the related registers to enable an interrupt. Refer to
“CHAPTER 6. INTERRUPTS” for more details.
A-D control registers 0 and 1
b7
b0
b7
b0
A-D control register 0
(Address 1E16
A-D control register 1
(Address 1F16
0
0
1
0
X X X
0
0
0
)
)
A-D sweep pin select bits
Single sweep mode
b1 b0
A-D conversion start bit
0 : A-D conversion halts.
0 0 : AN
0 1 : AN
1 0 : AN
0
0
0
, AN1 (2 pins)
to AN
3
(4 pins)
(5 pins)
to AN
4
A-D conversion frequency (φAD) select bit 0
See Table 12.2.1.
Resolution select bit
0 : 8-bit resolution mode
1 : 10-bit resolution mode
A-D conversion frequency (φAD) select bit 1
See Table 12.2.1.
VREF connection select bit
0 : Pin VREF is connected.
X : It may be either “0” or “1.”
Selection of comparator function
b7
b0
0
0 0
Comparator function select register 0 (Address DC16
)
AN0
AN1
AN2
AN3
AN4
0 : Comparator function is not selected.
1 : Comparator function is selected.
When comparator function is not selected
When comparator function is selected
A-D register i
A-D register 0 (Addresses 2116, 2016
)
)
)
)
)
(b15)
b7
(b8)
b0
A-D register 1 (Addresses 2316, 2216
A-D register 2 (Addresses 2516, 2416
A-D register 3 (Addresses 2716, 2616
A-D register 4 (Addresses 2916, 2816
b0
b7
A value (comparison value) in the range
from 0016 through FF16 is set.
Continued on Figure 12.9.2.
Fig. 12.9.1 Initial setting example for related registers in single sweep mode (1)
7906 Group User’s Manual Rev.2.0
12-25