user18574: In the documentation, it shows that the higher  frequency that can be reached with an Arduino UNO for and 8bits PWM is using timer0  with the pre-scaler  set at 1. That  gives a Fs of 62500 Hz, but why is that so?
I understand the Prescaler is dividing the frequency, but why it does start at 62500 Hz and  timer1 and timer2 have as maximum 31372 Hz. 

user7508: Timers 1 and 2 are configured by the Arduino core library to run the so
called “phase correct PWM” mode. In this mode, the timers count
forward from 0 to 255, and then they count backwards to zero. Timer 0 is
configured by the same library in “fast PWM” mode, where it counts
from 0 to 255 and then overflows back to zero in a single timer cycle.
You can, if you want, configure timers 1 and 2 in fast PWM mode. For
doing this, you will have to access their I/O registers directly. C.f.
the datasheet of the relevant microcontroller for details.
A couple of links:

the datasheet of the
ATmega328P
microcontroller describes all the possible configurations of the
timers (sections 15, 16 and 18 for timer 0, 1 and 2, respectively)
the source code of the Arduino init()
function
to see how Arduino core configures them.


18574: <p>In the <a href="http://playground.arduino.cc/Main/TimerPWMCheatsheet" rel="nofollow">documentation</a>, it shows that the higher  frequency that can be reached with an Arduino UNO for and 8bits PWM is using timer0  with the pre-scaler  set at 1. That  gives a Fs of 62500 Hz, but why is that so?</p>

<p>I understand the Prescaler is dividing the frequency, but why it does start at 62500 Hz and  timer1 and timer2 have as maximum 31372 Hz. </p>
 7508: <p>Timers 1 and 2 are configured by the Arduino core library to run the so
called “<em>phase correct PWM</em>” mode. In this mode, the timers count
forward from 0 to 255, and then they count backwards to zero. Timer 0 is
configured by the same library in “<em>fast PWM</em>” mode, where it counts
from 0 to 255 and then overflows back to zero in a single timer cycle.</p>

<p>You can, if you want, configure timers 1 and 2 in fast PWM mode. For
doing this, you will have to access their I/O registers directly. C.f.
the datasheet of the relevant microcontroller for details.</p>

<p>A couple of links:</p>

<ul>
<li>the <a href="http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf" rel="nofollow">datasheet of the
ATmega328P</a>
microcontroller describes all the possible configurations of the
timers (sections 15, 16 and 18 for timer 0, 1 and 2, respectively)</li>
<li>the source code of the <a href="https://github.com/arduino/Arduino/blob/master/hardware/arduino/avr/cores/arduino/wiring.c#L284" rel="nofollow">Arduino init()
function</a>
to see how Arduino core configures them.</li>
</ul>
