TC1796
Peripheral Units (Vol. 2 of 2)
Analog-to-Digital Converter (ADC)
User’s Manual
25-39
V2.0, 2007-07
ADC, V2.0
25.1.7
Limit Checking
Limit checking provides the means to check conversion results on exceeding or
becoming lower than a defined limit. The checking parameters can be configured
individually for each analog channel. Service requests can be generated for each analog
channel on limit checking results such as on a limit violation or on successful limit
checks.
Figure 25-19 Limit Check Unit
, a limit check is performed for the conversion result stored in
a specific channel status register. For limit checking, the A/D Converter’s measuring
range is divided into three areas in order to check whether the conversion result meets
the specified range. Two out of four boundaries can be selected and programmed per
limit check. The boundaries are selected for each analog channel via the bit fields
CHCONn.BSELA and CHCONn.BSELB, n = 0-15. Four boundaries can be set
individually in the limit check control register LCCON0/1/2/3.
The limit check control bit field specifies if a limit check is performed for the current
conversion result and which area must be met or avoided by the current conversion
result (see
).
Depending on the selected limit check control parameter CHCONn.LCC, the service
request flag is not set, is set if the selected area is hit, or is set if the selected area is
missed for the related conversion result.
MCA06022
LCCON3.Boundary
LCCON2.Boundary
LCCON1.Boundary
LCCON0.Boundary
11
10
01
00
Limit Check Control Unit
LCC
BSELA BSELB
CHCONn
Compare
RESULTn
CHSTATn
Start
Select
Limit
Checking
Service
Request
Generation