
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Capture/Compare Units
User’s Manual
17-25
V2.2, 2004-01
CC12_X1, V2.1
17.6
Compare Output Signal Generation
This section discusses the interaction between the CAPCOM Unit and the Port Logic.
The block diagram illustrated in
details the logic of the block “Mode &
Output Control”, shown in
.
Each output signal is latched in its associated bit of the respective output latch register
CCx_OUT. The individual bits are updated each time an associated compare event
occurs. The bits of these registers are connected to the respective port pins as an
alternate output function of a port line.
Compare signals can also directly affect the associated port output latch Px. In this case,
the port latch must be selected for the respective pin. The direct port latch option is
disabled in non-staggered mode or it can be disabled by setting bit PL in register
CCx_IOC.
Register CCx_OUT is always updated in parallel to the update of the port output latch.
CC1_OUT
Compare Output Reg.
SFR (FF5C
H
/AE
H
)
Reset Value: 0000
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
CC
15
IO
CC
14
IO
CC
13
IO
CC
12
IO
CC
11
IO
CC
10
IO
CC9
IO
CC8
IO
CC7
IO
CC6
IO
CC5
IO
CC4
IO
CC3
IO
CC2
IO
CC1
IO
CC0
IO
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
CC2_OUT
Compare Output Reg.
SFR (FF2C
H
/96
H
)
Reset Value: 0000
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
CC
15
IO
CC
14
IO
CC
13
IO
CC
12
IO
CC
11
IO
CC
10
IO
CC9
IO
CC8
IO
CC7
IO
CC6
IO
CC5
IO
CC4
IO
CC3
IO
CC2
IO
CC1
IO
CC0
IO
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
rwh
Field
Bits
Type
Description
CCyIO
15 … 0 rwh
Compare Output for Channel y
Alternative port output for the associated port pin.