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

where TOSC = 1/FOSC

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

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