http://www.mikrocontroller.net/articles/Soft-PWM