Pwm1
The hardware pwm. Select in the Realizer hardware settings:
- CCP tab: enable and mode CCP1= PWM mode.
- Timer2 tab: enable and select the prescaler (1:16).
The period and dutycycle register are written. The PWM uses timer2 (PR2). The period or frequency is:
Tperiod = (PR2+1)*4*Tosc*TMR2 Prescaler = (255+1) * 4 * 50nSec * 16 = 819,2 usec == 1220 Hz
scheme






