268
CHAPTER 11 A/D CONVERTER
H
Sample hold circuit
The sample hold circuit holds the input voltage selected by the analog channel selector. By
sampling and holding the input voltage immediately after A/D conversion, the analog voltage
can be digitized without being affected by input voltage fluctuations during A/D conversion
(comparison).
H
D/A converter
Generates a voltage corresponding to the value set in the ADDH and ADDL registers.
H
Comparator
Compares the sampled and held input voltage with the voltage output from the D/A converter
and indicates whether the D/A output is greater or less than the input voltage.
H
Control circuit
The control circuit has the following function:
In the A/D conversion function, sets the bits in the 10-bit A/D data register from the most
significant bit to the least significant bit according the signals from the comparator indicating
whether the D/A output is greater or less than the input voltage. The control circuit sets the
interrupt request flag bit (ADC1: ADI) when the conversion is complete.
H
A/D data registers (ADDH/ADDL)
The upper two bits of the 10-bit A/D data are stored in the ADDH register, and the lower eight
bits are stored in the ADDL register.
The result of A/D conversion is stored in the ADDH/ADDL registers.
H
A/D control register 1 (ADC1)
Enables and disables the functions of the A/D converter, selects an analog input pin, checks the
state, and controls interrupt.
H
A/D control register 2 (ADC2)
Enables and disables interrupts.
H
AD converter interrupts
IRQ3:
When A/D conversion is complete, an interrupt request is issued if interrupt request output is
enabled (ADC2: ADIE = 1).
I
A/D Converter Power Supply Voltage
H
AVcc
Power supply pin for the A/D converter. Use the same potential that is used for Vcc. If extreme
A/D conversion accuracy is required, make sure that AVcc is free of Vcc noise or use another
power supply. If the A/D converter is not used, still connect this pin to the power supply.
H
AVss
Ground pin for the A/D converter. Use same potential as that is used for Vss. If extreme A/D
conversion accuracy is required, make sure that AVss is free of Vss noise or use another power
supply. If the A/D converter is not used, still connect this pin to ground (GND).