Hi Skimask and Bruce,
Thanks for the info, I now have my project up and running. The only other changes I had to make apart from the ones already listed, was to change the variables used in the ADC result and PWM output.
regards Nick