Shop OBEX P1 Docs P2 Docs Learn Events
Pulsin — Parallax Forums

Pulsin

MacGeek117MacGeek117 Posts: 747
edited 2005-11-01 12:32 in General Discussion
(Dumb questions, no experience.)
I'm posibly giong to work with the SX and Ping))), and the output of the Ping))) will be more than one byte. How do I store the value?
RoboGeek (formerly bugg)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are 10 kinds of people in the world,

those that know binary and those that don't.
Formerly bugg.
www.goldmine-elec.com
www.parallax.com
www.expresspcb.com
www.startrek.com


Post Edited (RoboGeek) : 10/16/2005 12:21:17 AM GMT

Comments

  • James NewtonJames Newton Posts: 329
    edited 2005-10-12 23:50
    What is "the ping"

    You store multi-byte values in multi-file register locations.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-13 02:27
    You can write a custom PULSIN to give you as much resolution for the Ping))) as you need. If you want to use the native (8-bit) SX/B PUSLIN then you'll need to set the resolution accordingly.

    James: The Ping))) is a low-cost ultrasonic range finder. You trigger it with a short pulse and and it returns the distance to target as a pulse width.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-10-13 21:48
    Jon Williams (Parallax) said...
    You can write a custom PULSIN to give you as much resolution for the Ping))) as you need. If you want to use the native (8-bit) SX/B PUSLIN then you'll need to set the resolution accordingly.
    Elaborate please?···· Again, no experience.
    RoboGeek


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are 10 kinds of people in the world,

    those that know binary and those that don't.
    Formerly bugg.
    www.goldmine-elec.com
    www.parallax.com
    www.expresspcb.com
    www.startrek.com


    Post Edited (RoboGeek) : 10/16/2005 12:21:35 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-10-13 22:02
    Hes talking about compiling the command PULSIN in SX/B, adjusting the pause between resolution ticks and rolling over the counter into a 16 bit value. But unless you have the actual components and are seeking to do this, I doubt anyone would be willing to take the time out and help you code it since it is a theoretical discussion at this point, just know that it can be done. Also you can set the resolution tick pause to encompass the longest return value of the ping))) if you want to use an 8 bit value.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10

    Post Edited (Paul Baker) : 10/13/2005 10:06:29 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-13 23:08
    RoboGeek:

    I can give you lots of answers but as Paul points out, if you don't actually have SX/B and are not actively working with it then it won't be helpful. At any rate, here goes: The max expected pulse back from the Ping is 18.5 ms (Tin-max in the docs) then you could set the resolution value to 10; this would cause the PULSIN function to return a value from 100 uS to 25.5 ms (in 100 uS units).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-10-16 00:16
    I should be getting SX/B soon, but don't have it. Thank you for your help!
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are 10 kinds of people in the world,

    those that know binary and those that don't.
    Formerly bugg.
    www.goldmine-elec.com
    www.parallax.com
    www.expresspcb.com
    www.startrek.com


    Post Edited (RoboGeek) : 10/16/2005 12:21:52 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-10-17 19:40
    You know you can get started on SX/B before you ever purchase an SX, by using SXsim and SX/B you can do quite a few "on the computer" experiments with a $0 investment.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-17 20:33
    Good point, Paul, I should have made it! Hmm... I wonder if we can get our pal Guenther to add a pulse simulator to the hardware panel....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-11-01 01:53
    Didn't even think about that... Have to try it.
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are 10 kinds of people in the world,

    those that know binary and those that don't.
    Formerly bugg.
    www.parallax.com
    www.goldmine-elec.com
    www.expresspcb.com
    www.startrek.com
    ·
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-11-01 12:32
    Jon,

    I have added the pulse simulator to the SXSim wish list.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
Sign In or Register to comment.