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.

Figure 1. PWM Period
PWMPeriod=[(T2PR+1)]4TOSC(TMR2PrescaleValue)

where TOSC = 1/FOSC

When T2TMR is equal to T2PR, the following three events occur on the next increment cycle:

Important: The Timer postscaler (see "Timer2 Interrupt") is not used in the determination of the PWM frequency.