Jump to content
Mark Harris

PIC - read a PPM servo signal

Recommended Posts

I know how to generate a servo signal with a pic microcontroller, but i'm needing to read a signal and find out how long it was high for.

Would anyone happen to have some code to get me on the right path?

Share this post


Link to post
Share on other sites

Trying to use someone elses code is harder than writing your own I think. Its better to do it yourself and then you understand how it works.

I wrote a program for a car speed controller on a 16c71 about 10 years back, not 100% sure of the details but I set it so the incomming pulse would reset the RTCC and the end of pulse would read the RTCC and store the value. This wasted half the count as the first 1ms never changes but still left 128 steps for the controller. Im sure you could cascade the counter to gain more steps if you need them.

Terry

Share this post


Link to post
Share on other sites

Terry,

Thank you for the response. I really am just looking for code for an idea how to programatically go about reading the times. I'm not quite sure where to start so its a little hard to write my own :) I work as a software developer so code rarely confuses me :) I haven't done a great deal of programming on PIC systems so i'm still a newb as far as it goes.

- Mark

Share this post


Link to post
Share on other sites

Im probably not the right person to help as I am only just getting back into pic's and only just wrote my first simple program on a modern pic. What pic are you using and what are you making ?

Terry

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...