Working on the software pwm code.