If it matters, I'm talking about the arduino uno v3.

  • Six out of twenty ain't bad. Plus you can do PWM in software, to an extent, like the Tone library does.
    – Nick Gammon
    Oct 6, 2015 at 4:32

3 Answers 3


Check out the ATMega328p datasheet: each of the 3 timer/counter blocks can generate PWM (2 PWM signals per timer) and on top of that, typically Timer1 (16 bits) is used by the OS/scheduler/whatever, unless you are really running on bare metal.

It's a limitation, but so is everything else.

If you do not like it, you can always choose a different microcontroller, either AVR or something else. Certain models might be designed to have more units of a specific type than you would find on generic microcontrollers.

  • on top of that, typically Timer1 (16 bits) is used by the OS/scheduler - what OS/scheduler are you referring to?
    – Nick Gammon
    Oct 6, 2015 at 4:32
  • ChibiOS, for example, uses Timer1. Some time ago I went through various options available in terms of OS/RTOS/scheduler for ARduino/AVR and, as far as I can remember, Timer1 was the favourite choice. Oct 6, 2015 at 6:38

That is one of the hardware features/functions of the microprocessor. It is like a bag of candy when you eat the last piece there is no more left. You can do software PWM but that can use a lot of compute power. You can also get PWM peripheral devices you can connect to it.


After all, it's a cost issue.
Not only of the Arduino/Atmel, but any microcontroller.

The outputs of the PWM unit (which has a limited number of PWM channels) have to be routed to the output pins.
This routing is basically fix, because the silicon mask is fix.

However, to add some flexibility, most controllers allow a limited configuration of this routing by adding some internal switches which can be accessed by writing to the specific registers.

But any additional routing capabilities means more of those internal switches, which results in
more size -> more silicon -> more expensive.

Therefore the micro designers say - for example - "OK, it's enough to be able to output x of the y available PWM channels at every edge of the micro", and the poor PCB designer has to cope with what he gets.

Using an FPGA instead of a microcontroller you are really free to setup your function to pin routing - but look at the price of an FPGA ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.