Thank you dc42 and Coding Badly. Due to the amount of information presented in the previous posts I thought I would summarise what I plan to do - if you guys let me know that the steps below are correct, then I will edit the first post in this thread to explain clearly how we got 32kHz frequency PWM from my ATtiny45.

Summary:

I would like the PWM output from an ATtiny45 to produce a variable voltage of 0v to 5v, via a RC low pass filter. I have calculated that a 32kHz PWM frequency would be ideal, the high frequency allows low ripply and relatively fast 'settle' time.

To achieve 32kHz, I need to divide the system 8MHz clock by 256 (prescaler of 1 in Fast Mode PWM). However the mills() and delay() programming functions utilise Timer1 - so to maintain programming functionality we will assign Timer0 to mills and delay (assigning Timer1 to PWM is dealt with later in the thread):

Execution:

Locate core_build_options.h in the Tiny Core directory

Open it in your favourite text editor (I like Visual StudioTextEdit.app :*)

To achieve 32kHz, I need to divide the system 8MHz clock by 256 (prescaler of 256).

No, you don't need to a prescaler of 256, you need a prescaler of 1. If you use one of the 8-bit counter/timers with its maximum TOP value of 255 (as is usual when using it to generate a PWM signal), then the counter is already dividing by either 256 or 512 (depending on the mode you select), giving you a frequency close to 32KHz or 16kHz.

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.