I found this code in the forums . And will be a good beginning for my project. What do I need to be able to compile it in PICBASIC without so many errors? A 16f877 at 4 Mhz

Begin:

PVAL = 1000 ' Start with 1kHz
For Duty = 64 to 250
HPWM 1,Duty,PVAL
PAUSE 100
NEXT Duty

Duty = 127 ' 50% Duty-cycle
For PVAL = 1000 to 10000 step 100 ' Increments of 100. Change as needed
HPWM 1,Duty,PVAL
PAUSE 100
Next PVAL

GOTO Begin

END