C8051F340/1/2/3/4/5/6/7
22.2.6. 16-Bit Pulse Width Modulator Mode
A PCA module may also be operated in
Important Note About Capture/Compare Registers: When writing a
(65536 – PCA0CPn) DutyCycle =
65536
Equation 22.3. 16-Bit PWM Duty Cycle
Using Equation 22.3, the largest duty cycle is 100% (PCA0CPn = 0), and the smallest duty cycle is 0.0015% (PCA0CPn = 0xFFFF). A 0% duty cycle may be generated by clearing the ECOMn bit to ‘0’.
Write to
PCA0CPLn0
ENB
Reset
Write to
PCA0CPHn ENB
1
PCA0CPMn
P E C C M T P E W C A A A O W C M O P P T G M C 1 M P N n n n F
6 n n n n n
1 0 0 x 0 x
Enable
PCA Timebase
| PCA0CPHn | PCA0CPLn |
|
|
|
|
|
|
|
|
|
| match |
|
|
| |
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| ||
|
| S SET | Q | |||||
|
|
|
|
| ||||
|
|
|
|
|
|
| R CLR | Q |
|
|
|
|
|
|
| ||
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
| PCA0H | PCA0L |
|
|
|
|
|
|
|
| Overflow |
| |||||
|
|
|
|
| ||||
|
|
|
|
|
|
|
|
|
CEXn | Crossbar | Port I/O |
|
Figure 22.9. PCA 16-Bit PWM Mode
Rev. 0.5 | 271 |