Hello
I have been reading Arduino Playground - HomePage which talks about adjusting PWM frequencies, and which tells us that...
Pins 11 and 3: controlled by timer 2
Setting Divisor Frequency
0x01 1 31250 -- particularly this line...
0x02 8 3906.25
0x03 32 976.5625
0x04 64 488.28125
But, I compare this with another page http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM which, talking about a particular example, contains the paragraph...
The output frequency is the 16MHz system clock frequency, divided by the prescaler value (64), divided by the 256 cycles it takes for the timer to wrap around. Note that fast PWM holds the output high one cycle longer than the compare register value.
These two sources seem to disagree. Assuming the prescaler was 'switched off' (i.e. 0x01 "divide by one", like the top line of the table, above), I make the result of the expression system_clock_freq / prescaler / cycles_for_timer_wrap_around ...
16000000 / 1 / 256 = 62500
... exactly double the figure given in the table in the TimerPWMCheatSheet.
Is the document wrong? Probably not!! What have I misunderstood.
thanks all
Sam