pulsein comand


Closed Thread
Results 1 to 6 of 6

Thread: pulsein comand

  1. #1
    PICMAN's Avatar
    PICMAN Guest

    Default pulsein comand

    alright, for turn signals on rc car, using pic 16f84a

    ive begun fiuring out how to read the servo motion, and since servos are run off pulsing a high signal, im guessing the best easiest way to read this signal, is the same comand i used on tha bs2,, pulseout, , only in this case pulse in, any one have some good reading material or input , describing this comand

    i planed to getit to work by figuring out which pulse is slightly futher movement then triming nobs can procure, then use = or > than logic to achieve internal switching of the lights on or off, for instance to simplify

    lets say trim nobs can prouduce movement to 3 milimeters off center, i figure out that pulse by manually makeing a servo move that much off the bs2,, now i have x and z pulses, where x is max trim to one extreme, and z is the other, giviing me a black out area to call zero, then i use logic to say if the pulse sent by the reciever is within certian levels its considerd a turn, if its between x and z pulses , then its considerd zero , and all lights are off,

    does it sound like im going down the right path, and will pulseout / in comands transfer from bs2 coding to pic basic,

  2. #2
    PICMAN's Avatar
    PICMAN Guest


    Did you find this post helpful? Yes | No

    Default

    any sugestions on how to read a signal sent to a servo at all?

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    There's so many way to do it... i'm not so familiar with your kind of application but, IMO you can use PULSEIN with rotary encoder or opto-coupler.

    OR you can use internal TIMER to get a accurate timing.

    Some will also prefer to read a voltage instead of pulses. Converting pulse into voltage can be made with a simple RC circuit connected to a Buffer op-amp.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Picman, I have attached a very old program written for a Parallax basic stamp-I to decode a servo pulse stream and output a 5 bit binary byte. It also upon power-up reads the servo null position and subtracts it from the output. It also has a preset deadband for the output. Look it over and see how I solved the same problem.

    HTH,
    Dave Purola,N8NTA
    Attached Files Attached Files

  5. #5
    PICMAN's Avatar
    PICMAN Guest


    Did you find this post helpful? Yes | No

    Default

    ty both,

  6. #6
    PICMAN's Avatar
    PICMAN Guest


    Did you find this post helpful? Yes | No

    Default

    is the only purely software method internal clocking? and if so , have any ideas of reading mateiral to help me get this going?
    my dcumentation has explanition of pulsout,, not in

Similar Threads

  1. Pic 16 F628A pulsein Problem
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th February 2009, 10:46
  2. pulsein question (units of measure?)
    By nomad in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th October 2007, 00:59
  3. Pulsein issues...
    By cpayne in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th April 2006, 18:45
  4. Multiplex Display with count comand
    By mdaweb in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th October 2005, 04:09
  5. Compiler Error: EMM Comand Line in Config.nt
    By Boots in forum mel PIC BASIC
    Replies: 0
    Last Post: - 13th February 2005, 04:37

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts