You can use the HPWM command or you can manually control the PWM function. In the Data Sheet in the CCP section, PWM subsection, the ASM code is listed for firing up TMR2, activating the PWM, then controlling it from there. In order to use the PWM function at any higher than 8-bit resolution, you have to do it manually. You will be controlling the Duty Cycle with CCPR1L & CCPR1H for PWM Channel 1 and CCPR2L & CCPR2H for Channel 2. PBP3 only works with 8-bit control over PWM.
Mike Holler
Bookmarks