I am experimenting with this version that uses ccp1 and ccp2. It works really well. It can run 8 servos with a 1uS resolution at 8mhz. What I found important is using a separate power supply for the motors and the pic. Once I started loading the motors, the current could spike over 1 amp and this was resetting the pic and or feeding back into the adc. This caused twitchy and erratic movements.
The code in this link will not compile until you add a underscore to the variable in the assembly line. I hope to also port this to PBP
http://www.mikroe.com/forum/viewtopi...7&hilit=+servo




Bookmarks