213
CHAPTER 12 A/D CONVERTER
User
’
s Manual U14701EJ3V0UD
(6) ANI0 to ANI9 pins
These ten analog input pins are used to input analog signals to undergo A/D conversion to the A/D converter.
ANI0 to ANI7 can be used as input ports except for the pins specified as analog input by analog input channel
specification register 0 (ADS0).
Cautions 1. Use the ANI0 to ANI9 input voltages within the specification range. If a voltage higher than
AV
REF0
or lower than AV
SS0
is applied (even if within the absolute maximum rating range),
the conversion value of that channel will be undefined and the conversion values of other
channels may also be affected.
2. Analog input (ANI0 to ANI7) pins are alternate function pins that can also be used as input
port (P10 to P17) pins. When A/D conversion is performed by selecting any one of ANI0
through ANI7, do not execute any input instruction to port 1 during conversion. It may cause
a lower conversion resolution.
When a digital pulse is applied to a pin adjacent to the pin in the process of A/D conversion,
A/D conversion values may not be obtained as expected due to coupling noise. Thus, do
not apply any pulse to a pin adjacent to the pin in the process of A/D conversion.
(7) AV
REF0
pin
This pin inputs the A/D converter reference voltage.
It converts signals input to ANI0 to ANI9 into digital signals according to the voltage applied between AV
REF0
and
AV
SS0
.
Caution A series resistor string is connected between the AV
REF0
and AV
SS0
pins. Therefore, when output
impedance of the reference voltage is too high, it seems as if the AV
REF0
pin and the series
resistor string are connected in series. This may cause a greater reference voltage error.
(8) AV
SS0
pin
This is the GND potential pin of the A/D converter. Always keep it at the same potential as the V
SS0
pin when
not using the A/D converter.
(9) V
DD1
pin
This is the positive power supply pin, except for the port block.
12.3 Registers to Control A/D Converter
The following four types of registers are used to control the A/D converter.
A/D converter mode register 0 (ADM0)
Analog input channel specification register 0 (ADS0)
External interrupt rising edge enable register (EGP)
External interrupt falling edge enable register (EGN)
(1) A/D converter mode register 0 (ADM0)
This register sets the conversion time for analog input to be A/D converted, conversion start/stop, and external
trigger.
ADM0 is set by a 1-bit or 8-bit memory manipulation instruction.
RESET input sets the value of this register to 00H.