Has anyone experienced PWM interference with servo commands? I'm building a small project with one servo and two LED's; as soon as I pulse the LED's to fade in/out with PWM, the servo motor jitters like mad.
Using this for the LED's:
For w0=0 to 1023
PWMout 3,255,w0
pause 5
next w0
pause 1000
For w0=1023 to 0 step -1
PWMout 3,255,w0
pause 5
next w0
And standard servo commands:
for b7 = 135 to 250 step 1
servo 1, b7
pause 35
next b7
gosub eyes1
for b7 = 250 to 135 step -1
servo 1, b7
pause 35
next b7
I had to change the servo 1 command to pulsout 1 command to stop the jittering, and I've tried the code on an 08M and an 18X, both show the same jittering using servo command and PWM.
Any ideas? I'd prefer to use the servo command as it seems to move the servo smoother than the pulsout command.
Using this for the LED's:
For w0=0 to 1023
PWMout 3,255,w0
pause 5
next w0
pause 1000
For w0=1023 to 0 step -1
PWMout 3,255,w0
pause 5
next w0
And standard servo commands:
for b7 = 135 to 250 step 1
servo 1, b7
pause 35
next b7
gosub eyes1
for b7 = 250 to 135 step -1
servo 1, b7
pause 35
next b7
I had to change the servo 1 command to pulsout 1 command to stop the jittering, and I've tried the code on an 08M and an 18X, both show the same jittering using servo command and PWM.
Any ideas? I'd prefer to use the servo command as it seems to move the servo smoother than the pulsout command.