English
Language : 

C161RI_1 Datasheet, PDF (232/317 Pages) Siemens Semiconductor Group – 16-Bit CMOS Single-Chip Microcontroller
The Analog / Digital Converter
C161RI
16.1 Mode Selection and Operation
The analog input channels AN0 … AN3 are alternate functions of Port 5 which is an input-only port.
The Port 5 lines may either be used as analog or digital inputs. For pins that shall be used as analog
inputs it is recommended to disable the digital input stage via register P5DIDIS. This avoids
undesired cross currents and switching noise while the (analog) input signal level is between VIL
and VIH.
The functions of the A/D converter are controlled by the bit-addressable A/D Converter Control
Register ADCON. Its bitfields specify the analog channel to be acted upon, the conversion mode,
and also reflect the status of the converter.
ADCON (FFA0H / D0H)
15 14 13 12 11 10
ADCTC
--
-
-
rw
--
-
-
SFR
Reset Value: 0000H
9876543210
-
AD AD
BSY ST
AD
RP
- ADM -
-
ADCH
-
r rw rw - rw -
-
rw
Bit
ADCH
ADM
ADRP
ADST
ADBSY
ADCTC
Function
ADC Analog Channel Input Selection
Selects the ADC channel which is to be converted.
ADC Mode Selection
0: Fixed Channel Single Conversion
1: Fixed Channel Continuous Conversion
ADC Result Position
0: 8-bit result is written to ADDAT.2 … ADDAT.9
1: 8-bit result is written to ADDAT.0 … ADDAT.7
ADC Start Bit
0: Stop a running conversion
1: Start conversion(s)
ADC Busy Flag
0: ADC is idle
1: A conversion is active.
ADC Conversion Time Control (Defines the ADC basic conversion clock fBC)
00: fBC = fCPU / 2
01: fBC = fCPU / 4
10: fBC = fCPU / 8
11: fBC = fCPU / 16
Bit field ADCH specifies the analog input channel which is to be converted. Bitfield ADM selects the
operating mode of the A/D converter. A conversion (or a sequence) is then started by setting bit
ADST. Clearing ADST stops the A/D converter after a certain operation which depends on the
selected operating mode.
The busy flag (read-only) ADBSY is set, as long as a conversion is in progress.
Semiconductor Group
16-3
1998-05-01