EasyManua.ls Logo

STC micro STC8A8K64D4 Series - Application of PCA;CCP;PWM; PCA Function Pin Switch; Registers Related to PCA

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
- 517 -
18 Application of PCA/CCP/PWM
Four groups of programmable counter array (PCA/CCP/PWM) modules are integrated in STC8A8K64D4 series
of microcontrollers, which can be used for software timer, external pulse capture, high-speed pulse output and pulse
width modulation (PWM) output.
PCA contains a special 16-bit counter, with which four groups of PCA modules are connected. The structure of
PCA counter is as follows:
SYSclk/12
Structure of PCA counter
SYSclk/2
T0 overflow
External ECI
SYSclk
SYSclk/4
SYSclk/6
SYSclk/8
PCA interrupt
CF CR - - CF3CF2CF1CF0
CCON
CIDL
- - - ECF
CMOD
CPS[2:0]
000
001
010
011
100
101
110
111
CH CL
16-bit counter
Enter IDLE mode
PCA 0
PCA 1
PCA 2
PCA 3
18.1 PCA function pin switch
Symbol
Address
B7
B6
B5
B4
B3
B2
B1
B0
P_SW1
A2H
S1_S[1:0]
CCP_S[1:0]
SPI_S[1:0]
0
-
CCP_S[1:0]: PCA pin selection bit
CCP_S[1:0]
ECI
CCP0
CCP1
CCP2
CCP3
00
P1.2
P1.7
P1.6
P1.5
P1.4
01
P2.2
P2.3
P2.4
P2.5
P2.6
10
P7.4
P7.0
P7.1
P7.2
P7.3
11
P3.5
P3.3
P3.2
P3.1
P3.0
18.2 Registers Related to PCA
Symbol
Description
Address
Bit Address and Symbol
Reset
Value
B7
B6
B5
B4
B3
B2
B1
B0
CCON
PCA Control Register
D8H
CF
CR
-
-
CCF3
CCF2
CCF1
CCF0
00xx,x000
CMOD
PCA Mode Register
D9H
CIDL
-
-
-
CPS[2:0]
ECF
0xxx,0000
CCAPM0
PCA 0 Mode Control Register
DAH
-
ECOM0
CCAPP0
CCAPN0
MAT0
TOG0
PWM0
ECCF0
x000,0000
CCAPM1
PCA 1 Mode Control Register
DBH
-
ECOM1
CCAPP1
CCAPN1
MAT1
TOG1
PWM1
ECCF1
x000,0000
CCAPM2
PCA 2 Mode Control Register
DCH
-
ECOM2
CCAPP2
CCAPN2
MAT2
TOG2
PWM2
ECCF2
x000,0000
CCAPM3
PCA 3 Mode Control Register
FD54H
-
ECOM3
CCAPP3
CCAPN3
MAT3
TOG3
PWM3
ECCF3
x000,0000
CL
PCA Counter Low Byte
E9H
0000,0000
CCAP0L
PCA 0 Capture Register Low Byte
EAH
0000,0000
CCAP1L
PCA 1 Capture Register Low Byte
EBH
0000,0000
CCAP2L
PCA 2 Capture Register Low Byte
ECH
0000,0000
CCAP3L
PCA 3 Capture Register Low Byte
FD55H
0000,0000
PCA_PWM0
PCA0 PWM Mode Register
F2H
EBS0[1:0]
XCCAP0H[1:0]
XCCAP0L[1:0]
EPC0H
EPC0L
0000,0000
PCA_PWM1
PCA1 PWM Mode Register
F3H
EBS1[1:0]
XCCAP1H[1:0]
XCCAP1L[1:0]
EPC1H
EPC1L
0000,0000
PCA_PWM2
PCA2 PWM Mode Register
F4H
EBS2[1:0]
XCCAP2H[1:0]
XCCAP2L[1:0]
EPC2H
EPC2L
0000,0000

Table of Contents

Related product manuals