30.4.4 PWM Period
The PWM period is specified by the T2PR register of Timer2. The PWM period can be calculated using the formula in the equation below.
where TOSC = 1/FOSC
When T2TMR is equal to T2PR, the following three events occur on the next increment event:
- T2TMR is cleared
- The CCPx pin is set (Exception: If the PWM duty cycle = 0%, the pin will not be set)
- The PWM duty cycle is transferred from the CCPRx register into a 10-bit buffer
Important: The Timer postscaler (see the “Timer2
Interrupt” section) is not used in the determination of the PWM frequency.