
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Capture/Compare Units
User’s Manual
17-12
V2.2, 2004-01
CC12_X1, V2.1
Each of the registers CCy may be individually programmed for capture mode or for one
of 4 different compare modes, and may be allocated individually to one of the two timers
of the respective CAPCOM unit. A special double-register compare mode combines two
registers to act on one common output signal. When capture or compare operations are
disabled for one of the CCy registers, it may be used for general purpose variable
storage.
The detailed discussion of the capture and compare modes is valid for all the
capture/compare channels, so registers, bits and pins are only referenced by a
placeholder.
Note: A capture or compare event on channel 31 may be used to trigger a channel
injection on the XC161’s A/D converter if enabled.
Table 17-2
Selection of Capture Modes and Compare Modes
Mode
MODy
Selected Operating Mode
Disabled
0 0 0
Disable Capture and Compare Modes
The respective CAPCOM register may be used for general
variable storage.
Capture
0 0 1
Capture on Positive Transition (Rising Edge) at Pin CCyIO
0 1 0
Capture on Negative Transition (Falling Edge) at Pin CCyIO
0 1 1
Capture on Positive and Negative Transition (Both Edges) at
Pin CCyIO
Compare
1 0 0
Compare Mode 0: Interrupt Only
Several interrupts per timer period.
Can enable double-register compare mode for Bank2 registers.
1 0 1
Compare Mode 1: Toggle Output Pin on each Match
Several compare events per timer period.
Can enable double-register compare mode for Bank1 registers.
1 1 0
Compare Mode 2: Interrupt Only
Only one interrupt per timer period.
1 1 1
Compare Mode 3: Set Output Pin on each Match
Reset output pin on each timer overflow; only one interrupt per
timer period.