
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Capture/Compare Units
User’s Manual
17-26
V2.2, 2004-01
CC12_X1, V2.1
Figure 17-11 Port Output Block Diagram for Compare Modes
Note: A compare output signal is visible at the pin only in compare modes 1 or 3.
The output signal of a compare event can either be a 1, a 0, the complement of the
current level, or the previous level. The block ‘Output Value Control’ determines the
correct new level based on the compare event, the timer overflow signal, and the current
states of the Port and OUT latches. For the output toggle function (e.g. in compare
mode 1), the state of the output latch is read, inverted, and then written back.
The associated output pins either drives the port latch signal or the OUT signal, selected
by register ALTSEL (see
).
Note: If the port output latch is written to by software at the same time it would be altered
by a compare event, the software write will have priority. In this case the hardware-
triggered change will not become effective.
MCB05427
TxOV
MUX
ALTSEL0Pn
0
1
Port Latch
&
OUT Latch
>1
_
Output
Value
Control
MODy
Compare
Match
STAG
PL
Direction
Driver
Port Pin
Pm.n
CAPCOM Logic Port Logic