Simple servo driver

XCore Project reviews, ideas, videos and proposals.
Post Reply
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Simple servo driver

Post by infiniteimprobability »

Version: 1
Status: Public release
License: BSD
Download: https://github.com/xcore/sw_startkit_ex ... tkit_servo

Inspired by bsmithyman's original example from way back, I have developed an updated servo driver module.
It uses a single logical core to produce n channels of servo (where n is the width of your port - eg. 8bits = 8 channels) and is set via an interface.
Seems like a lot of people are playing with servos, so thought it'd be worth adding!
It's also a fairly simple example of using XMOS timers and interfaces, so worth a look if you are new to XMOS.
Tested on startKIT (amazingly my HITEC servos worked fine from 3.3v supply and control line!
The download link is above, but a simple app testing it out can be found in the below link
https://github.com/xcore/sw_startkit_ex ... /app_servo
 
[update] - I have thought of a way to improve this to deliver 16 or even 32 channels with jitter/error below the servo resolution by interspersing the pulses rather than reset synchronising them (in theory it could start to show above 8 channels with current software). I'll look at this if there is strong demand - so let me know below in the comments if this sounds useful
Images:


Post Reply