Arduino Timer Pins Directional

posted on 29 Apr 2016 09:40 by elecsurin

PWM and timer
There is fixed relation between the timers and the PWM capable outputs. When you look in the data sheet or the pinout of the processor these PWM capable pins have names like OCRxA, OCRxB or OCRxC (where x means the timer number 0..5). The PWM functionality is often shared with other pin functionality.
The Arduino has 3Timers and 6 PWM output pins. The relation between timers and PWM outputs is:

Pins 5     and  6    : controlled by timer0
Pins 9     and  10  : controlled by timer1
Pins 11   and  3    : controlled by timer2

On the Arduino Mega we have 6 timers and 15 PWM outputs:

Pins  4         and  13    : controlled by timer 0
Pins  11       and  12    : controlled by timer 1
Pins  9         and  10    : controlled by timer 2
Pin    2, 3     and  5      : controlled by timer 3
Pin    6, 7     and  8      : controlled by timer 4
Pin    46, 45 and  44     : controlled by timer 5

Comment

Comment:

Tweet

Tags

มาโนช View my profile