reseting pwm counter when new value