
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
The Analog/Digital Converter
User’s Manual
16-1
V2.2, 2004-01
ADC_X1, V2.1
16
The Analog/Digital Converter
The XC161 provides an Analog/Digital Converter with 8-bit or 10-bit resolution and a
sample & hold circuit on-chip. An input multiplexer selects between up to 12 analog input
channels (alternate functions of Port 5) either via software (fixed channel modes) or
automatically (auto scan modes).
To fulfill most requirements of embedded control applications the ADC supports the
following conversion modes:
•
Fixed Channel Single Conversion
produces just one result from the selected channel
•
Fixed Channel Continuous Conversion
repeatedly converts the selected channel
•
Auto Scan Single Conversion
produces one result from each of a selected group of channels
•
Auto Scan Continuous Conversion
repeatedly converts the selected group of channels
•
Wait for ADDAT Read Mode
start a conversion automatically when the previous result was read
•
Channel Injection Mode
start a conversion when a hardware trigger occurs,
can insert the conversion of a specific channel into a group conversion (auto scan)
A set of SFRs and port pins provide access to control functions and results of the ADC.
The enhanced-mode registers provide more detailed control functions for the ADC.
Figure 16-1
SFRs and Port Pins Associated with the A/D Converter
m c_ a d c0 1 0 0 _ re g iste rs.vsd
D a ta R e g is te rs
C o n tro l R eg isters
S yste m R e giste rs
A D C _D A T
A D C _C O N
A D C _C IC
A D C _EIC
P5
P5D ID IS
E
In terru pt C o ntro l
SYSC O N 3
C om p a tib ility M od e:
A D C _ C O N
A D C C o ntro l R e g is te r
A D C _ C O N 1 A D C C o ntro l R e g is te r 1
E n ha n ce d M o de :
A D C _ C T R 0 A D C C o ntro l R e g is te r 0
A D C _ C T R 2 A D C C o ntro l R e g is te r 2
A D C _ C T R 2IN A D C C o n tro l In je ctio n R e gister
A D C _ D A T
A D C R es ult R e gister
A D C _ D A T 2 A D C In je ctio n R e sult R e giste r
A D C _ C IC
A D C E nd -of-C on ve rsion In tr. R eg .
A D C _ E IC
A D C C on ve rsion -E rro r In tr. R eg .
P 5
P o rt 5 A n alog Inp ut P o rt
(A N 15 ...A N 1 2, A N 7...A N 0)
P 5 D ID IS
P o rt 5 D ig ital Inp ut D isa b le R e g.
A D C _D A T2
E
A D C _C O N 1
A D C _C TR 0
A D C _C TR 2
A D C _C TR 2IN