
C161PI
The Analog / Digital Converter
User
’
s Manual
16-11
1999-08
16.2
Conversion Timing Control
When a conversion is started, first the capacitances of the converter are loaded via the
respective analog input pin to the current analog input voltage. The time to load the
capacitances is referred to as sample time. Next the sampled voltage is converted to a
digital value in successive steps, which correspond to the resolution of the ADC. During
these phases (except for the sample time) the internal capacitances are repeatedly
charged and discharged via pins
V
AREF
and
V
AGND
.
The current that has to be drawn from the sources for sampling and changing charges
depends on the time that each respective step takes, because the capacitors must reach
their final voltage level within the given time, at least with a certain approximation. The
maximum current, however, that a source can deliver, depends on its internal resistance.
The time that the two different actions during conversion take (sampling, and converting)
can be programmed within a certain range in the C161PI relative to the CPU clock. The
absolute time that is consumed by the different conversion steps therefore is
independent from the general speed of the controller. This allows adjusting the A/D
converter of the C161PI to the properties of the system:
Fast Conversion
can be achieved by programming the respective times to their
absolute possible minimum. This is preferable for scanning high frequency signals. The
internal resistance of analog source and analog supply must be sufficiently low,
however.
High Internal Resistance
can be achieved by programming the respective times to a
higher value, or the possible maximum. This is preferable when using analog sources
and supply with a high internal resistance in order to keep the current as low as possible.
The conversion rate in this case may be considerably lower, however.
The conversion time is programmed via the upper two bits of register ADCON. Bitfield
ADCTC (conversion time control) selects the basic conversion clock (
f
BC
), used for the
operation of the A/D converter. The sample time is derived from this conversion clock.
The table below lists the possible combinations. The timings refer to CPU clock cycles,
where
t
CPU
= 1 /
f
CPU
.
The limit values for
f
BC
(see data sheet) must not be exceeded when selecting ADCTC
and
f
CPU
.
Table 16-2
ADC Conversion Timing Control
ADCON.15|14
(ADCTC)
Basic clock
f
BC
00
f
CPU
/ 4
01
f
CPU
/ 2
10
f
CPU
/ 16
11
f
CPU
/ 8
A/D Converter
ADCON.13|12
(ADSTC)
00
01
10
11
Sample time
t
S
t
BC
* 8
t
BC
* 16
t
BC
* 32
t
BC
* 64