
Originally Posted by
Dick Ivers
I'm running a servo with a PBP routine which use the pulseout funtion to generate the required servo pulse width, followed by a pause to fill out the normal 20 ms servo time frame. A loop keeps the servo running continuously. I keep track of time by counting the number of 50 hz frames. The servo is quiet and moves smoothly in response to changes in pulse width.
In an effort to increase the accuracy of timekeeping, I recently added an Elapsed Timer using DT interrupts. It's a 100 hz timer set up to accumulate seconds and tenths of seconds. It works well. However, the servo is now twitching while the the interrupt routine is running. Why is this? Does PBP use the same Timer1 that the interrupt counter is using? Is there a possible interaction that accounts for the servo's jumpiness? Is there a fix?
BTW, pic is 16F690.
Hi Dick,
_With no disrespect to Jerson, as what he said is likely 100 percent right . . .
and keeping in mind, I who am NO expert, have not played with a servo in a very long time . . .
I seem to remember the servos jerking, each time the loop ran using software PWM or pulseout, as I remember it ran fine using HPWM.
Last edited by Archangel; - 29th November 2010 at 03:03.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks