Well it's the old story: I was interfacing multiple RGB LEDs, and there's not enough built-in PWM pins.
There're libraries like ShiftPWM (http://www.elcojacobs.com/shiftpwm/) and SoftPWM (Google Code Archive - Long-term storage for Google Code Project Hosting.) which does software PWM, but they're just not ehough for me.
ShiftPWM is fast and elegant, but requires extra hardwares (the shift registers), that's around USD $0.6 each from the local retail electronics store.
But I just want 16 outputs and there are 20 pins on atmega328p (+2 more if the internal RC is used, +1 more if the reset pin is disabled), why should I spend 2 extra 74*595?
The SoftPWM library has some other problem, it's slow (high CPU usage), fat (high memory usage), and hard to configure (such as brightness levels, PWM frequencies, etc.).
So I wrote this library - just like ShiftPWM - to do PWM for all pins in background (timer interrupt).
It produces REALLY FAST code - 6 instructions per output in the ISR routine, and only use 1 byte per pin + 1 byte for the counter.
However, currently it only knows about timer1, and doesn't know about arduino pins (has to tell it the port register and bit number).
It is capable to drives 16 PWM outputs with 256 brightness levels up to 200hz on a 8Mhz ATmega328p (but this way you have almost no time loop()-ing, so you might want to use something lower like 120hz).
the code is hosted on github: