Make 2 additional PWM pins on Mega?

Hi, is it possible to make 2 normal digital pins act like PWM pins on Arduino Mega? As I understand the PWM is just a software implementation? If it's possible, could you give me some hints what I have to change in the core libraries.

PWM is implemented in hardware using timers on the Arduino controller chip. However the Arduino software is not enabling all the PWM pins on the mega, see this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242837044/6#6

Also it is possible to add PWM resources using external hardware such as the TLC5940, see: Arduino Playground - TLC5940.

Thanks :slight_smile: