STC8A8K64D4 Series Manual
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
CCP_S[1:0]: PCA pin selection bit
18.2 Registers Related to PCA
PCA 0 Mode Control Register
PCA 1 Mode Control Register
PCA 2 Mode Control Register
PCA 3 Mode Control Register
PCA 0 Capture Register Low Byte
PCA 1 Capture Register Low Byte
PCA 2 Capture Register Low Byte
PCA 3 Capture Register Low Byte