286
CHAPTER 11 A/D CONVERTER
r Clock selector
Selects the clock used to activate the A/D conversion or sense function when continuous
activation is enabled (ADC2: EXT = "1").
r Analog channel selector
Selects one of the eight analog input channels.
r Sample hold circuit
Holds the input voltage selected by the analog channel selector. The circuit samples and holds
the input voltage immediately after the A/D conversion or sense function is activated.
This
allows A/D conversion (or comparison) to proceed without being affected by input voltage
fluctuation.
r D/A converter
Generates the voltage corresponding to the value set in the ADCD register.
r Comparator
Compares the sampled and held input voltage with the output voltage of the D/A converter, and
determines which voltage is higher or lower.
r Controller
The controller has two functions:
For the A/D conversion function, the controller successively determines the value of each bit
of the ADCD register, starting from the most significant bit and proceeding to the least
significant bit, based on the greater-than/less-than signal from the comparator. When
conversion is complete, the circuit sets the interrupt request flag bit (ADC1: ADI).
For the sense function, the controller sets the interrupt request flag bit (ADI) if the greater-
than/less-than signal from the comparator matches the compare condition setting bit (SIFM)
in the ADC1 register.
r ADCD register
The ADCD register has two functions:
Stores the A/D conversion result for the A/D conversion function.
For the sense function, the data for the voltage that is compared with the input voltage is
written to this register.
r ADC1 register
The ADC1 register is used to enable or disable each function, select the analog input pin, check
statuses, and control interrupts.
r ADC2 register
The ADC2 register is used to select the input clock, enable or disable interrupts, and select
functions.