
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The Analog/Digital Converter
User’s Manual
16-14
V2.2, 2004-01
ADC_X1, V2.1
16.2.4
Channel Injection Mode
Channel Injection Mode allows the conversion of a specific analog channel (also while
the ADC is running in a continuous or auto scan mode) without changing the current
operating mode. After the conversion of this specific channel the ADC continues with the
original operating mode.
Channel Injection mode is enabled by setting bit ADCIN and requires the Wait for Read
Mode (ADWR = 1). The channel to be converted in this mode is specified in bitfield
CHNR of register ADC_DAT2.
Note: Bitfield CHNR in ADC_DAT2 is not modified by the A/D converter, but only the
ADRES bitfield. Since the channel number for an injected conversion is not
buffered, bitfield CHNR of ADC_DAT2 must never be modified during the sample
phase of an injected conversion, otherwise the input multiplexer will switch to the
new channel. It is recommended to only change the channel number with no
injected conversion running.
Figure 16-5
Channel Injection Example
# x-2
Write ADC_DAT2
Int. Request
Conversion
of Channel # y
ADC_DAT2 Full
Read ADC_DAT2
Request
Conversion
Write ADC_DAT;
Injected
Read ADC_DAT
ADC_DAT Full
of Channel..
Channel Injection
# x-1
# x+1
# x+1
# x
# x
# x
# x-1
# x-1
# x-2
MC_ADC0003_INJECT
ADEINT
# ...
# x-4
# y
# x-2
# x-3
# x-3
# x-3
# x-4
# x-4