Software PWM control implemented