The PWM period is specified by the T2PR register. The PWM period can be calculated using the formula of Figure 1. It is required to have FOSC/4 as the selected clock input to the timer for correct PWM operation.
When T2TMR is equal to T2PR, the following three events occur on the next increment cycle: