Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - PWM BUG!

(you are viewing a thread; or go back to list of threads)

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.
Thu Mar 8 2012, 03:11:45, download attachment pwm_bug.ld
(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%).
Thu Mar 8 2012, 12:29:43
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):