Shop OBEX P1 Docs P2 Docs Learn Events
YASD (yet another servo driver) — Parallax Forums

YASD (yet another servo driver)

JonnyMacJonnyMac Posts: 9,194
edited 2009-04-07 05:49 in Propeller 1
I didn't find anything in the object exchange that would float my boat so -- to fill a need and as a learning exercise -- I wrote a Propeller servo driver. The driver portion is is Assembly and closely mimics they my servo VP for the SX works; just one servo pulse at a time. The driver supports from one to eight servos and position timing is expressed in microseconds.

I've been doing non-stop SX coding for the last three years so please go easy on me if you find something really silly; while I feel pretty confident in the code I'll wait to post in in OBEX to allow others that might be interested to wring it out.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-06 23:59
    What features distinguish your servo driver from the other ones in the ObEx?
  • JonnyMacJonnyMac Posts: 9,194
    edited 2009-04-07 00:11
    For my needs I wanted to specify 1 to 8 servos, a starting pin for the group, and set position in microseconds. Frankly, other than Beau's very advanced module I was a little surprised at what I found vis-a-vis servos for the Propeller. Honestly, I didn't think I'd have to write this but am glad I did because it turned into a useful education experience -- perhaps others will benefit from my code, and I'll learn more from the comments others may post.
  • shanghai_foolshanghai_fool Posts: 149
    edited 2009-04-07 05:00
    I don't know what more you could need that Beau's does not do. It will do from 1 to 32 servos and set position from 1000-2000 microseconds. You just have to give the set start position and which pin before calling the servo start command.
  • JonnyMacJonnyMac Posts: 9,194
    edited 2009-04-07 05:24
    As I stated, a big part of this was as an educational exercise for myself. My projects will not require more than eight servos, and I wanted to have a driver that I could understand (Beau's a great coder and has a big head start on me).
  • Nick McClickNick McClick Posts: 1,003
    edited 2009-04-07 05:49
    I'm pretty good with SPIN but I'm still a PASM beginner - this looks like a good project to sharpen one's skills. Good stuff!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
Sign In or Register to comment.