
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Capture/Compare Units
User’s Manual
17-24
V2.2, 2004-01
CC12_X1, V2.1
Figure 17-10 Double-Register Compare Mode Block Diagram
When a match is detected for one of the two registers in a register pair (CCy or CCz),
the associated interrupt request line (CCyIRQ or CCzIRQ) is activated, and pin CCyIO,
corresponding to the bank1 register CCy, is toggled. The generated interrupt always
corresponds to the register that caused the match.
Note: If a match occurs simultaneously for both register CCy and register CCz of the
register pair, pin CCyIO will be toggled only once, but two separate compare
interrupt requests will be generated.
Each of the two registers of a pair can be individually allocated to one of the two timers
in the CAPCOM unit. This offers a wide variety of applications, as the two timers can run
in different modes with different resolution and frequency. However, this might require
sophisticated software algorithms to handle the different timer periods.
Note: The signals CCzIO (which do not serve for double-register compare mode) may
be used for general purpose IO.
Mode
Control
SEMy
SEEy
Comp.
= ?
MU
X
Timer T0/T7
Timer T1/T8
ACCy
ACCz
DRyM
MODy
CCyIRQ
MU
X
Mode &
Output Ctrl.
to Port
Logic
MCB05426
Comparator
= ?
Compare
Register CCz
CCzIRQ
z = y + 8
Mode
Control
SEMz
SEEz
DRyM
MODz
Compare
Register CCy