Shop OBEX P1 Docs P2 Docs Learn Events
RC signal decoding — Parallax Forums

RC signal decoding

tobdectobdec Posts: 267
edited 2011-08-11 08:50 in General Discussion
Hey everyone, first post and prob a noobish one too lol

I am in the process of building a rather large completly rc robot. I have a basic stamp 2 that I would like to decode the RC code from the receiver and then mix the channels to be output to my h-bridge's. How would I go about doing this? Sorry if this is common knowledge but I just cant seem to find a straight answer anywhere.

Thanks in advanced!

Comments

  • W9GFOW9GFO Posts: 4,010
    edited 2011-08-06 20:31
    Look up the PULSIN and PULSOUT commands.
  • tobdectobdec Posts: 267
    edited 2011-08-07 08:54
    Ok so I've been checking those out. If my understanding is correct the PULSIN command stores the length of the pulse? Meaning, not how often the pulse occurs but how long the pin is high?
    I have the homework board and I remember the PULSOUT positioning servos by the duration. Modern RC receivers have outputs using PWM correct? Or is this PPM? Sorry for all the dumb questions
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-08-07 10:35
    Some sources on the Interwebs very incorrectly state that servos are pulsed using PPM, but this is wrong.

    If you want to call it anything, say that servos are controlled by pulse *duration* modulation. So, obviously, it's just the duration of the pulse that matters, not their period, position, or anything else.

    R/C receivers haven't changed the format of the signal they produce in decades. It's still a stream of 1-2 millisecond pulses, spaced more or less 20 milliseconds apart.

    -- Gordon
  • tobdectobdec Posts: 267
    edited 2011-08-07 12:38
    ok ao basicly to decode this I will use the PULSIN to mix the channels and use PWM to drive my h-bridges. Im still a little new to pbasic, to make it realize that one pulse is shorter or longer than the other what aproaches could be used? When I save the PULSIN in a word variable will it simply be saved as a dec number?
  • tobdectobdec Posts: 267
    edited 2011-08-11 08:50
    bump up to top
Sign In or Register to comment.