whoops just realised the pwm output wasnt quite anything...

DutyCycle var byte 'byte being the one that is answer of algorithm when thats created
CCP1CON=0 'output of pwm pin
TRISC= $00000000

HPWM 1,DutyCycle,20000

end
hopefully that should work