| Posted: 06:07am 10 Jun 2018 |
Copy link to clipboard |
 Print this post |
|
Hi,
As an aside to Zonker's post on PWM, can anyone tell me why the PWM STOP code within the loop prevents the actual PWM code from working. Place it outside the loop & it works as expected.
I can't see that I am doing anything wrong.
option autorun on
do for x = 1 to 9 'pwm 1,stop 'Loop does not work with this enabled width = x * 10 pause 1000 pwm 1, 100, width next x pwm 1,stop 'Loop works with this enabled loop
ChopperP |