What does the pulse train look like on an oscilloscope?
Could be anything from a weak power supply to weak code
Try a simple code to run the servos without the "fancy" stuff to help narrow it down.
Dave
Always wear safety glasses while programming.
Hi,
@ first look the problem comes because PULSOUT commands might not be " interrupted " ... and maybe also because time between two pulse must be kept, say, between 15 and 30 ms ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Hello all,
I have tried a minimalist aproach. With only one servo, holding at one position, and no interrupt on change ... just the timer1 interrupt keeping track of elapsed time. The one servo is still very twitchy to the point of not being useable.
BTW, the accuracy of elapsed time is very good when checked with a stopwatch..
Ok
Show us the current test code and tell us about the hardware ( power supply, servo models, how it is all connected, etc )
Dave
Always wear safety glasses while programming.
As mentioned above, the servo runs smooth and quiet when driven by the non-interrupt routine. So, I think the servo and circuit are OK.
However, I now realize that timer1 interrupts are occuring every 10 ms, while the servo pulses are only 1 to 2 ms long. Just guessing, but it seems that timer interrupts that periodically occur during the pulse on-time can signifigantly disrupt the pulse period and cause jittering. Therefore, I think my interrupt-timed approach will not work.
Experiment over.
Not a problem! Capture the signal train on your sound card, and see it thru' a sound editor like Audacity as described on Dave Houston's website. Or alternately, for these frequencies a sound card based scope like the one at http://www.zeitnitz.de/Christian/scope_en (my favourite) would work fine. WYSIWYG!
Just remember to scale down the logic levels by 10:1 or more.
Regards,
Anand
Bookmarks