Hi Shawn,

Oh, if only you could do that, it would make things so much easier.

But you can't assign the PIN for the HPWM command. The CCP module is hard wired to pin 17 (RC2) on the 458. So you need to supply the channel number, which in this case is 1.

HPWM 1,127,5600

And, since you're turning off all the A/D inputs, don't forget about the comparators on PORTD

CMCON = 7

<br>