initial, simple software pwm in c