English
Language : 

C8051F850-C-GM Datasheet, PDF (177/328 Pages) Silicon Laboratories – Low-Cost 8-bit MCU Family with up to 8 kB of Flash
20.4.4. 16-Bit Pulse Width Modulator Mode
A PCA module may also be operated in 16-Bit PWM mode. 16-bit PWM mode is independent of the other
(8 through 11-bit) PWM modes. The entire PCA0CP register is used to determine the duty cycle in 16-bit
PWM mode.
To output a varying duty cycle, new value writes should be synchronized with the PCA CCFn match flag to
ensure seamless updates.
16-Bit PWM mode is enabled by setting the ECOMn, PWMn, and PWM16n bits in the PCA0CPMn register.
For a varying duty cycle, the match interrupt flag should be enabled (ECCFn = 1 AND MATn = 1) to help
synchronize the capture/compare register writes. If the MATn bit is set to 1, the CCFn flag for the module
will be set each time a match edge or up edge occurs. The CF flag in PCA0CN can be used to detect the
overflow or down edge.
Important Note About Capture/Compare Registers: When writing a 16-bit value to the PCA0 Capture/
Compare registers, the low byte should always be written first. Writing to PCA0CPLn clears the ECOMn bit
to 0; writing to PCA0CPHn sets ECOMn to 1.
Rev. 1.0
157