EasyManua.ls Logo

STC micro STC8A8K64D4 Series - PCA Control Register (CCON); PCA Mode Register (CMOD); PCA Counter Registers (CL, CH); PCA Mode Control Registers (Ccapmn)

Default Icon
901 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STC8A8K64D4 Series Manual
- 518 -
PCA_PWM3
PCA3 PWM Mode Register
FD57H
EBS3[1:0]
XCCAP3H[1:0]
XCCAP3L[1:0]
EPC3H
EPC3L
0000,0000
CH
PCA Counter High Byte
F9H
0000,0000
CCAP0H
PCA 0 Capture Register High Byte
FAH
0000,0000
CCAP1H
PCA 1 Capture Register High Byte
FBH
0000,0000
CCAP2H
PCA 2 Capture Register High Byte
FCH
0000,0000
CCAP3H
PCA 3 Capture Register High Byte
FD56H
0000,0000
18.2.1 PCA control register (CCON)
Symbol
Address
B7
B6
B5
B4
B3
B2
B1
B0
CCON
D8H
CF
CR
-
-
CCF3
CCF2
CCF1
CCF0
CF: PCA Counter overflow flag. It is set by hardware when the 16-bit counter of PCA overflows, and requests interrupt
to CPU. It must be cleared by software.
CR: PCA counter enable bit.
0: Stop PCA counting.
1: Start PCA counting.
CCFn(n=0,1,2,3): PCA interrupt flag. When a match or a capture occurs on the PCA module, the corresponding flag
bit is set by the hardware automatically and requests an interrupt to CPU. These flags should be cleared by software.
18.2.2 PCA mode register (CMOD)
Symbol
Address
B7
B6
B5
B4
B3
B2
B1
B0
CMOD
D9H
CIDL
-
-
-
CPS[2:0]
ECF
CIDL: PCA Counter control bit in Idle mode.
0: the PCA counter will continue counting in idle mode.
1: the PCA counter will stop counting in idle mode.
CPS[2:0]: PCA Counter pulse source select bits.
CPS[2:0]
Input clock source of PCA
000
System clock/12
001
System clock/2
010
Overflow pulse of timer 0
011
External clock input from ECI pin
100
System clock
101
System clock/4
110
System clock/6
111
System clock/8
ECF: PCA counter overflow interrupt enable bit
0: disable PCA counter overflow interrupt
1: enable PCA counter overflow interrupt
18.2.3 PCA counter registers (CL, CH)
Symbol
Address
B7
B6
B5
B4
B3
B2
B1
B0
CL
E9H
CH
F9H
The 16-bit counter is the combination of CL and CH, where CL is the low 8-bit counter and CH is the high 8-bit counter.
The 16-bit counter of PCA increments automatically every one PCA clock.
18.2.4 PCA mode control registers (CCAPMn)
Symbol
Address
B7
B6
B5
B4
B3
B2
B1
B0
CCAPM0
DAH
-
ECOM0
CCAPP0
CCAPN0
MAT0
TOG0
PWM0
ECCF0
CCAPM1
DBH
-
ECOM1
CCAPP1
CCAPN1
MAT1
TOG1
PWM1
ECCF1
CCAPM2
DCH
-
ECOM2
CCAPP2
CCAPN2
MAT2
TOG2
PWM2
ECCF2
CCAPM3
FD54H
-
ECOM3
CCAPP3
CCAPN3
MAT3
TOG3
PWM3
ECCF3
ECOMn: PCAn Comparator enable bit
CCAPPn: PCAn Capture on rising edge enable bit

Table of Contents

Related product manuals