Thank you for your reply dc42,
In order to use your code, should I supply the frequency in hertz, like '32000'?
Also, your Off function appears to turn the pin off, whereas I would like variable PWM duty cycle, it is a throttle that I am programming and the idea is that I can set 0v to 5v over PWM using analogWrite() - is it still possible to use analogueWrite with 255 representing 5v after i've used your code to turn the pin on?
Thanks again for your help
John