
CHAPTER 9 A/D CONVERTER
191
9.4 A/D Converter Operation
9.4.1 Basic operation of A/D converter
A/D conversion is executed in the following order.
(1) The selection of the analog input and specification of the operation mode and trigger mode, etc. should
be set in the ADM0 and ADM1 registers
Note 1
.
When the CE bit of the ADM0 register is set (1), A/D conversion starts during the A/D trigger mode. During
the timer trigger mode and external trigger mode, the trigger standby state
Note 2
is set.
(2) The voltage generated from the D/A converter and analog input are compared by the comparator.
(3) When the comparison of the 10 bits ends, the conversion results are stored in the ADCRn register. When
the A/D conversion is performed for the specified number of times, the A/D conversion end interrupt
(INTAD) is generated (n = 0 to 7).
Notes
1
. When the ADM0 and ADM1 registers are changed during the A/D conversion operation, the A/D
conversion operation before the change is stopped and the conversion results are not stored in the
ADCRn register.
2
. During the timer trigger mode and external trigger mode, if the CE bit of the ADM0 register is set to
1, the mode changes to the trigger standby state. The A/D conversion operation is started by the trigger
signal, and the trigger standby state is returned when the A/D conversion operation ends.
9.4.2 Operation mode and trigger mode
The A/D converter can specify various conversion operations by specifying the operation mode and trigger mode.
The operation mode and trigger mode are set by the ADM0 and ADM1 registers.
The following shows the relation between the operation mode and trigger mode.
Trigger Mode
Operation Mode
Setting Value
Analog Input
ADM0
ADM1
A/D trigger
Select
1 buffer
xx010xxxB
000x0xxxB
ANI0 to ANI7
4 buffers
xx110xxxB
000x0xxxB
Scan
xxx00xxxB
000x0xxxB
Timer trigger
1 trigger
Select
1 buffer
xx010xxxB
00100xxxB
ANI0 to ANI3
4 buffers
xx110xxxB
00100xxxB
Scan
xxx00xxxB
00100xxxB
4 trigger
Select
1 buffer
xx010xxxB
00110xxxB
4 buffers
xx110xxxB
00110xxxB
Scan
xxx00xxxB
00110xxxB
External trigger
Select
1 buffer
xx010xxxB
01000xxxB
4 buffers
xx110xxxB
01000xxxB
Scan
xxx00xxxB
01000xxxB