Yes this is true. PBP only supports 8 bits with HPWM.
You could do it the old and trusted way by setting the PIC's registers directly... this will get you started...
Initialisation (at the start of your program)...
PR2=$FF ' Timer2 Period Register
T2CON=%00000100 ' Values for PWM period
CCP1CON=%00001100 ' Set PWM Mode
Now in your program... the WORD variable TempWord contains the 10-bit value to set...
TempWord=TempWord<<6
CCPR1L=TempWord.highbyte
CCP1CON.5=TempWord.7
CCP1CON.4=TempWord.6
You'll notice I put 8 bits into CCPR1L in one hit and the remaining two bits into CCP1CON.
Refer back to the PIC Datasheet to see what bits I've manipulated.
There is an alternative you could try... that is set the 8-bits with HPWM, and load the remaining two bits into CCP1CON manually (always assuming you're running channel 1 with HPWM) - I've not tried this myself but you might be able to simply pull it off that way.
Melanie
Bookmarks