??? 02/10/10 20:40 Read: times |
#173041 - Maybe of some use... Responding to: ???'s previous message |
I uploaded some code to the library that i use to control servos. Granted, i've never used
it to control more than two servos, but the code is designed to control up to eight. It is pretty simple to work with... you populate an eight byte position table (position 0 -> servo 0, etc), then set the "update ready" bit. Next time the ISR fires, it will start working with the new values. Because the control runs in the background, the rest of the time is available for other user tasks. The code requires 37 bytes of sram, 2 bits, and timer 0. The minimum PWM step size is 4.35 microseconds. The code is assembly, written for the TASM assembler. The uploaded code has an example that swings servo 2 back and forth. Hope this helps! btw... as someone else mentioned, the best code in the world will not do anything for you if you do not have the current to run the motors. -jim |