proof-of-concept: driving 13 servos with attiny2313 over usb

Heh, that proved to be a nice rant on an arduino-lover that complained something about the inability on mega1280 to drive enough servos for his app (usb controlled pan and tilt for a few cams).
I picked an uC that has nor the hardware output-compare channels to drive all 13 servos, nor any hardware usb (attiny2313), threw up a small board and after a few dozen lines of code, here we go:
Attiny2313 driving 13 servos with 16-bit pwm over the usb with little to no external components. I also fitted in an option to set each output to Z-state from the commandline effectively relaxing a servo.

(more…)