C8051F581-IMR Silicon Labs, C8051F581-IMR Datasheet - Page 342

no-image

C8051F581-IMR

Manufacturer Part Number
C8051F581-IMR
Description
8-bit Microcontrollers - MCU 50MIPS 128kB 8kB SPI
Manufacturer
Silicon Labs
Datasheet

Specifications of C8051F581-IMR

Rohs
yes
Core
8051
Processor Series
C8051
Data Bus Width
8 bit
C8051F58x/F59x
29.3.6. 16-Bit Pulse Width Modulator Mode
A PCA1 module may also be operated in 16-Bit PWM mode. 16-bit PWM mode is independent of the other
(8/9/10/11-bit) PWM modes. In this mode, the 16-bit capture/compare module defines the number of PCA1
clocks for the low time of the PWM signal. When the PCA1 counter matches the module contents, the out-
put on CEXn is asserted high; when the 16-bit counter overflows, CEXn is asserted low. To output a vary-
ing duty cycle, new value writes should be synchronized with PCA1 CCFn match interrupts. 16-Bit PWM
Mode is enabled by setting the ECOM1n, PWM1n, and PWM161n bits in the PCA1CPMn register. For a
varying duty cycle, match interrupts should be enabled (ECCF1n = 1 AND MAT1n = 1) to help synchronize
the capture/compare register writes. If the MAT1n bit is set to 1, the CCFn flag for the module will be set
each time a 16-bit comparator match (rising edge) occurs. The CF1 flag in PCA1CN can be used to detect
the overflow (falling edge). The duty cycle for 16-Bit PWM Mode is given by Equation 29.4.
Important Note About Capture/Compare Registers : When writing a 16-bit value to the PCA1 Cap-
ture/Compare registers, the low byte should always be written first. Writing to PCA1CPLn clears the
ECOM1n bit to 0; writing to PCA1CPHn sets ECOM1n to 1.
Using Equation 29.4, the largest duty cycle is 100% (PCA1CPn = 0), and the smallest duty cycle is
0.0015% (PCA1CPn = 0xFFFF). A 0% duty cycle may be generated by clearing the ECOM1n bit to 0.
342
PCA1CPLn
Write to
Reset
PCA1CPHn
Write to
0
ENB
ENB
1
W
P
M
1
6
1
n
1
O
M
E
C
1
n
PCA1CPMn
C
A
P
P
1
n
0 0 x 0
C
A
P
N
1
n
M
A
T
n
1
PCA1 Timebase
O
G
T
1
n
W
P
M
1
n
E
C
C
F
1
n
x
Equation 29.4. 16-Bit PWM Duty Cycle
Figure 29.10. PCA1 16-Bit PWM Mode
Duty Cycle
Enable
PCA1CPHn
PCA1H
=
16-bit Comparator
Rev. 1.2
-------------------------------------------------------- -
65536 PCA
PCA1CPLn
PCA1L
65536
1
Overflow
CPn
match
S
R
SET
CLR
Q
Q
CEXn
Crossbar
Port I/O

Related parts for C8051F581-IMR