STC12C5Axx
Technical Summary
51
ECCFn: =
Enable the CCF
n
flag in the
CCON
SFR to generate an interrupt.
0
:= (default)
Inhibit the interrupt(
CCFn
) from module-
n
to the MCU
1
:=
Permit the interrupt(
CCFn
) from module-
n
to the MCU
Configure PCA Module
ECOMn CAPPn CAPNn MATn TOGn
PWMn
ECCFn
Module function
0 0 0 0 0 0 0
No
operation
X
1
0
0
0
0
X
16-bit capture by a positive-edge trigger on
CEX
n
X
0
1
0
0
0
X
16-bit capture by a negative trigger on CEXn
X
1
1
0
0
0
X
16-bit capture by a transition on CEXn
1 0 0 1 0 0 X
16-bit
Software
Timer
1 0 0 1 1 0 X
16-bit
High
Speed
Output
1 0 0 0 0 1 0
8-bit
PWM
PCA Capture Mode
To use one of the PCA modules in the capture mode, one or both of bits
CAPPn
and
CAPNn
in SFR
CCAPMn
should be set. The external CEX
n
input for the module is sampled for a
transition. When a valid transition occurs, the PCA hardware loads the value of the PCA
counter register(
CH
and
CL
) into the module’s capture registers(
CCAPnH
and
CCAPnL
). If
the bit
CCFn
for the module in the SFR
CCON
and the bit
ECCFn
in the SFR
CCAPMn
are
set then an interrupt will be generated.
CH
CL
CEXn
TOGn
PWMn
ECCFn
ECOMn
CAPPn
CAPNn
MATn
-
MD
n
CON
-
CCF1 CCF0
CR
-
-
-
CF
CCON
PCA
interrupt
PCA Capture Mode
CCAP
n
H CCAP
n
L
CAPTURE
0
0
0
0
http://www.DataSheet4U.net/
datasheet pdf - http://www.DataSheet4U.net/