
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The Analog/Digital Converter
User’s Manual
16-10
V2.2, 2004-01
ADC_X1, V2.1
Conversion Result
The result of a conversion is stored in the result register ADC_DAT, or in register
ADC_DAT2 for an injected conversion.
The position of the result depends on the basic operating mode (compatibility or
enhanced) and on the selected resolution (8-bit or 10-bit).
Note: Bitfield CHNR of register ADC_DAT is loaded by the ADC to indicate, which
channel the result refers to. Bitfield CHNR of register ADC_DAT2 is loaded by the
CPU to select the analog channel, which is to be injected.
ADC_DAT
ADC Result Register
SFR (FEA0
H
/50
H
)
Reset Value: 0000
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
CHNR
ADRES
rwh
rwh
ADC_DAT2
ADC Chan. Inj. Result Reg.
ESFR (F0A0
H
/50
H
)
Reset Value: 0000
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
CHNR
ADRES
rw
rwh
Field
Bits
Type
Function
CHNR
[15:12] rw[h]
Channel Number (identifies the converted analog
channel)
ADRES
[11:0]
rwh
A/D Conversion Result
The digital result of the most recent conversion.
In compatibility mode, the result is placed as follows:
8-bit: ADRES[9:2]
10-bit: ADRES[9:0]
In enhanced mode, the result is placed as follows:
8-bit: ADRES[11:4]
10-bit: ADRES[11:2]
Note: Unused bits of ADRES are always set to 0.