Shop OBEX P1 Docs P2 Docs Learn Events
PING))) without an LCD — Parallax Forums

PING))) without an LCD

Gary&LorenGary&Loren Posts: 8
edited 2015-07-19 21:19 in BASIC Stamp
Can I Connect a 7-segment LED Displays to show distances? :chip: If I can, could someone help me find a program that I could use?

Comments

  • The answer to your first question is yes (if two digits of display is enough).  
    You need 1 pin for the Ping and 14 pins for the LEDs.

    You can see how to connect and program the Ping by studying the BS-2 examples.
    You can see how to connect and program the LEDs by studying "What's a Microcontroller?", p/n 28123.
    The short answer to your second question is "Probably not".  Longer answer: Most of the folks on this forum are very helpful when it comes to helping you find what you need to know to do what you want, but have no particular interest in doing it for you.
  • This will give you  a good place to start for the Ping:

    https://www.parallax.com/sites/default/files/downloads/28015-PING-BS2-code-v1.4.zip

    The LED display documentation isn't as straight forward but my suggestion is just to play around with it and learn how it works. As Tom said most people here will be more than willing to help you learn how to do what you need to but you still need to do it yourself.
  • Look through the archived Nuts and Volts columns. Several of these describe how to use displays including LEDs and they include example code along with schematics. Basically you have a table of bytes, one for each digit or punctuation, with a 1 bit where the corresponding LED is lit and 0 bits where the LEDs are off. You can use the DIG operator to extract the decimal digits from the distance value and use that as a subscript to look up in the table and set the OUTH or OUTL register to the bits gotten from the table. The PING))) can be connected to the 8th pin of either group. The 8th bit of the OUTH or OUTL value should be 0 and shouldn't affect the use of the PING))) ... Normally you'll have the corresponding bit of DIRH or DIRL set to 0 (input) unless you're triggering the PING))) and then you'll change the bit in OUTH or OUTL to do the triggering.
  • @ Mike... Can you post a link to the Nuts & Volts archive? I had one, but it's gotten lost somewhere in my bookmarks file.

    Thanks in advance.

    Amanda
  • PublisonPublison Posts: 12,366
    edited 2015-09-01 18:40
    ajward wrote: »
    @ Mike... Can you post a link to the Nuts & Volts archive? I had one, but it's gotten lost somewhere in my bookmarks file.

    Thanks in advance.

    Amanda

    Amanda, Nuts and Volts is hard to find right now on the Parallax site right now, but if you type nuts and volts in the search menu, (at the Parallax Site) it will give you a list of different volumes to choose from.

  • I started an index to Nuts and Volts, attached.
Sign In or Register to comment.