Shop OBEX P1 Docs P2 Docs Learn Events
7-segment LED w/o using blowing 1/2 my pins? — Parallax Forums

7-segment LED w/o using blowing 1/2 my pins?

Nightrider7731Nightrider7731 Posts: 46
edited 2005-01-28 02:26 in BASIC Stamp
Is there a way to control a 7-segment LED without having to blow 1/2 the pins on my BS2?
·

Comments

  • nick bernardnick bernard Posts: 329
    edited 2005-01-27 20:02
    yes there is.

    to control 8 7seg's

    stamp drives 1 Mux for the anodes and 1 Decoder for the cathodes
    the stamp generates a clock for 2 seperate 3bit counters
    the first will drive a mux with a Q in equal to the state of the active bit.
    the other will give ground the 7seg that you want to light up

    make sure you put some resistors in there to drop the current

    hope this helps

    Rox on
    Nick B

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    League Bowling.... it's not a sport, it's a way of life

    Post Edited (nick bernard) : 1/27/2005 8:43:21 PM GMT
  • Nightrider7731Nightrider7731 Posts: 46
    edited 2005-01-27 20:03
    ... and you do this how ...
  • SPENCESPENCE Posts: 204
    edited 2005-01-27 20:21
    Look up the 74 or 74ls or 74l led driver in the ttl driver ic gou;p. I think it is 7446 7447 7448.. I haven't used them in years so i don't remmember specifics.

    These draw 1.6 ma or less if l or ls series.

    You send nibble wide data in bcd or hex to the 4 pins and they in turn decode to 7 bit for the common anode or common cathode type display.

    73
    spence
    k4kep
  • PeteSmittyPeteSmitty Posts: 2
    edited 2005-01-27 20:24
    There are led display driver chips that allow you to only use 3 i/o pins to drive multiple (1 or more) 7 segment leds. An example is the MAX7219 chip... if you do a search on this forum, you'll see some example codes with it to use on your basic stamp as well.
  • GadgetmanGadgetman Posts: 2,436
    edited 2005-01-27 20:28
    To get it down to two pins, just use a shift-register.
    One pin is for the serial input of the chip, the other is the clock pulse.

    I suggest that before you do anything else, you download and read the Stampworks experiment .PDFs, particularly experiment 23, as this explains what you want to do....

    The reason you got such a 'snub' response is that, while we all will help if someone has a problem, asking for something so elementary is just trying everyones patience.
  • nick bernardnick bernard Posts: 329
    edited 2005-01-27 20:38
    i edited my post above to include an actual solution in addition to my humorous antic dote

    that wasnt really a snub either. i didnt think you guys would fill up the thread this quick. check the times

    this, however, is a snub.... *snub*

    Rox on
    nickB

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    League Bowling.... it's not a sport, it's a way of life

    Post Edited (nick bernard) : 1/27/2005 8:41:12 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-27 20:41
    I'd use a couple 74HC595 shift registers -- with three pins you can control as many displays as you want (one '595 per display). Have a look at StampWorks (it's on our web site) to see how to daisy-chain the 74HC595.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • nick bernardnick bernard Posts: 329
    edited 2005-01-27 20:55
    if you put a band pass filter on each segment you could use freqout in a fsk algorithm.
    that would only take up one pin!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    League Bowling.... it's not a sport, it's a way of life

    Post Edited (nick bernard) : 1/27/2005 8:59:56 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-27 20:59
    And a whole mess of parts that would be really tricky to make work properly. If you want 7-segment displays with just one pin, you can use SX/B (similar to PBASIC) to make your own serial LED mutliplexer. I did and the January issue of Nuts & Volts shows how I did it. Eight 7-segment displays with just one IO pin from the BASIC Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • nick bernardnick bernard Posts: 329
    edited 2005-01-27 21:13
    i suppose. but instead of a discrete bandpass filter you could make them out of DSP chips. that might be a more reliable circuit. or you could use a plc with a frequency counter block!

    perhaps you should stick to the shift regi's for the sake of simplicity and sanity. i think i crossed that very thin line between insane and slightly less insane when i mentioned plc.... whoa is me

    ROX ON
    nickB

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    League Bowling.... it's not a sport, it's a way of life
  • Nightrider7731Nightrider7731 Posts: 46
    edited 2005-01-27 21:17
    nick bernard said...
    that wasnt really a snub either. i didnt think you guys would fill up the thread this quick. check the times
    I think his comment was directed to me.

    As a grizzled vet on many forums, I know how frustrating it can be to help out noobs with basic things that a vet would never waste a brain cell on.· As the noob here, 1/2 the problem is just knowing what to search on since electronics is by no means my field of expertise.· I won't even be here trying a few things out if it wasn't for a youth group I'm trying to build some automation for.· Nonetheless, I truly appreciate all the help from this group on both the difficult and the basic concepts.· I guess I now have a little more sympathy for noob questions on other forums.· Now if any of you need any help modding a Jeep ...
  • lrohnlrohn Posts: 33
    edited 2005-01-28 02:26
    How about using a MAX7219? It's a serially interfaced, 8-Digit LED Display Driver.

    Here is the link for more info on it:

    http://pdfserv.maxim-ic.com/en/ds/MAX7219-MAX7221.pdf
Sign In or Register to comment.