The PWM outputs generated on pins 5 and 6 will have higher-than-expected duty cycles. This is because of interactions with the millis() and delay() functions, which share the same internal timer used to generate those PWM outputs. This will be noticed mostly on low duty-cycle settings (e.g 0 - 10) and may result in a value of 0 not fully turning off the output on pins 5 and 6.
reading this i would expect an error of +-10%, but the truth is that on arduino uno/2009/diecimila etc (don't know about mega and leonardo) the frequency on pin 6 and 6 is DOUBLED, almost 1kHz instead of 500Hz.
This should be pointed out and maybe tell the user this is a feature, not a bug (like, you can have 500Hz PWM on pin x, y, and z, and 1kHz on pin a, b, c)
I agree with lesto. The infos in that page of the Reference aren't accurate.
PWM frequency is ~490 Hz on pins 9, 10 (timer 1), 11, and 3 (timer 2), and ~976 Hz on 5 and 6 (timer 0).pins .
leo72:
I agree with lesto. The infos in that page of the Reference aren't accurate.
PWM frequency is ~490 Hz on pins 5 and 6 (timer 0), and ~976 Hz on pins 9, 10 (timer 1), 11, and 3 (timer 2).
Is exactly the opposite, pins 5-6 @980 Hz, pins 3-9-10-11 @490 Hz