Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
servo(PORTA, 7, 700);delay_ms(20);
The pulse has to happen once every 20 ms but if you delay for 20 ms it is happening less than that often (the pulses are once every 20 + servopulse ms apart) try shortenting the delay length by just a little (~1) ms so that the pulse happens exactly every 20 ms(or slightly more often). The reason it is twitching is that after 20 ms of no pulse the servo will leave its position.
Keep in mind that every servo is different - even if they have the same model number. A timing that works great for one servo may not work for another.El-cheapo servos will often twitch much more due to el-cheapo components inside. *Some* twitch is considered normal, whereas heavy twitching could result in your servo frying itself.