EasyManua.ls Logo

STC micro STC8A8K64D4 Series - Page 538

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
- 522 -
[7: 0]} are reloaded into {EPCnL, CCAPnL [7: 0]}. This makes it possible to update the PWM without interference.
PWM frequency in 8-bit mode
PCA input clock source frequency
256
When EPCnH=0 and CCAPnH=00H, PWM fixed output high
When EPCnH=1 and CCAPnH=FFH, PWM fixed output low
The structure of PCA module working in 8-bit PWM mode is shown below.
PCA 8-bit PWM mode
0 0 0
Output 0
0 CL[7:0]
EPCnL CCAPnL[7:0]
0 0
9-bit comparator
enable
CL overflow
CCPn
1
EPCnH CCAPnH[7:0]
reload
CCAPMn
- ECOMn CAPPn CAPNn MATn TOGn PWMn ECCFn
Output 1
{0,CL[7:0]}<{EPCnL,CCAPnL[7:0]}
{0,CL[7:0]} >= {EPCnL,CCAPnL[7:0]}
18.3.4.2 7-bit PWM Mode
When EBSn [1:0] in the PCA_PWMn register is set to 01, the PCAn operates in 7-bit PWM mode, where {0, CL
[6: 0]} is compared with the capture registers {EPCnL, CCAPnL [6: 0]}. When PCA modules are operating in 7-bit
PWM mode, the output frequencies of them are the same because all the modules share a single PCA counter. The
output duty ratio of each module is set using the registers {EPCnL, CCAPnL [6: 0]}. The output is low when the value
of {0, CL [6: 0]} is less than {EPCnL, CCAPnL [6: 0]}, and the output is high when the value of {0, CL [6: 0]} is equal
to or greater than {EPCnL , CCAPnL [6: 0]}. When CL [6: 0] overflows from 7F to 00, the contents of {EPCnH,
CCAPnH [6: 0]} are reloaded into {EPCnL, CCAPnL [6: 0]}. This makes it possible to update the PWM without
interference.
PWM frequency in 7-bit mode
PCA input clock source frequency
128
When EPCnH=0 and CCAPnH=00H, PWM fixed output high
When EPCnH=1 and CCAPnH=FFH, PWM fixed output low
The structure of PCA module working in 7-bit PWM mode is shown below.

Table of Contents

Related product manuals