PWM BUG! (by pekto)
Hi sir jonathan, i am trying to stop and run the PWM output on atmega8 pin no.17 with a input switch, but once i pressed the run button to for the PWM output it works well, but the time that i will stop the pwm output the pwm output won't stop. why is this so??
the pwm output is connected to a buzzer. attached here is the ladder logic.
(no subject) (by Jonathan Westhues)
When the master control relay is used to disable a section of logic, it makes the rung-in condition for that logic false instead of true. The PWM op sets the PWM duty cycle to the specified variable if its rung-in is true, and otherwise does nothing.
When you use the master control relay to disable the PWM op, it therefore does nothing, and keeps the same duty cycle as before. To turn that output off, you need to explicitly set the duty cycle to 0% (or 100%).