This error is returned when you try using the HPWM command on a port pin that's not associated with the internal hardware PWM module.
If you use something like this, it returns a similar error message.
HPWM PORTD.2,out,500 'outputs ratio as PWM signal
If you're using the PBP HPWM command, then you have to use the PIC's internal hardware PWM outputs.
For the 16F877;
TRISC.2 = 0 ' Make RC2 an output
HPWM 1,out,500 'outputs ratio as PWM signal on RC2.
or
TRISC.1 = 0 ' Make RC1 an output
HPWM 2,out,500 'outputs ratio as PWM signal on RC1.




Bookmarks