using software pwm