Simple PWM Ouptut Setup timer 2 or 3 to be the timebase. The PR value used for the timer will be the total PWM period: //—– SETUP TIMER 2 —– //Used for: PWM OpenTimer2((T2_ON | T2_IDLE_CON | T2_GATE_OFF | T2_PS_1_1 | T2_SOURCE_INT), 5000); Turn on the PWM output. The OCxRS value will be the duty […]