Change output logic to PWM