348
15.5
Interrupts
The A/D converter generates an interrupt (ADI) at the end of A/D conversion. The ADI interrupt
request can be enabled or disabled by the ADIE bit in ADCSR.
15.6
Useage Notes
When using the A/D converter, note the following points:
15.6.1
Setting Ranges of Analog Power Supply Pins, Etc.
Analog Input Voltage Range:
The voltage applied to analog input pins AN
n
during A/D
conversion should be in the range AV
SS
≤
AN
n
≤
AV
CC
(n = 0 to 7).
AV
CC
and AV
SS
Input Voltages:
For the AV
CC
input voltage, set AV
SS
= V
SS
. When the A/D
converter is not used, set AV
CC
= V
CC
and AV
SS
= V
SS
.
15.6.2
Notes on Board Design
In board design, digital circuitry and analog circuitry should be as mutually isolated as possible,
and layout in which digital circuit signal lines and analog circuit signal lines cross or are in close
proximity should be avoided as far as possible. Failure to do so may result in incorrect operation
of the analog circuitry due to inductance, adversely affecting A/D conversion values.
Also, digital circuitry must be isolated from the analog input signals (AN
0
to AN
7
), analog
reference voltage (AV
ref
), and analog power supply (AV
CC
) by the analog ground (AV
SS
). The
analog ground (AV
SS
) should be connected to a stable digital ground (V
SS
) at one point on the
board.
15.6.3
Notes on Noise
A protection circuit should be connected between AV
CC
and AV
SS
as shown in figure 15.7 to
prevent damage due to an abnormal voltage such as an excessive surge at the analog input pins
(AN
0
to AN
7
).
Also, the bypass capacitors connected to AV
CC
and AV
ref
and the filter capacitors connected to
AN
0
to AN
7
must be connected to AV
SS
.
If filter capacitors are connected as shown in figure 15.7, the input currents at the analog input
pins (AN
0
to AN
7
) will be smoothed, which may give rise to error. Error can also occur if A/D
conversion is frequently performed in scan mode so that the current that charges and discharges
the capacitor in the sample-and-hold circuit of the A/D converter becomes greater than that input