Guys, thanks for the replies.

To answer some of the questions, yes the pots are lin, or at least they are marked as lin and purchased as such, and using a DVM it seem that they are liniar. I'll look at taking all the unused pins to +ve, possibly via 10k resistors.

Alain,

I think that the original code above basically works on the same principle of taking the 0 - 254 from the adc and sending that out as the pulse. However it all got a bit complicated when Darrel's routines were used as all I know is that i need to do is change then two values
Code:
DEFINE SPWM_FREQ  150                	' SPWM Frequency (Hz)
DEFINE SPWM_RES   254               	' SPWM Resolution (0 - 255)
I'll try adding your code and will report back