4.1 Standard PWM Operation
The standard PWM function described in this section is available and identical for all CCP modules. It generates a PWM signal on the CCPx pin with up to ten bits of resolution. The period, duty cycle and resolution are controlled by the following registers:
- Even numbered TxPR registers (T2PR, T4PR, etc.)
- Even numbered TxCON registers (T2CON, T4CON, etc.)
- 16-bit CCPRx registers
- CCPxCON registers
It is required to have FOSC/4 as the clock input to the selected CCP timer resource for correct PWM operation. The following figure shows a simplified block diagram of PWM operation.
Important: The corresponding TRIS bit must be cleared and
the CCPx pin must be configured through the appropriate RxyPPS register to enable the PWM
output.