Shop OBEX P1 Docs P2 Docs Learn Events
4-digit LED display — Parallax Forums

4-digit LED display

ArchiverArchiver Posts: 46,084
edited 2000-09-05 21:08 in General Discussion
I'm trying to determine the best way to drive 4 seven segment LED digits
from a BS2 with a minimum number of I/O pins. I know about the MAX7219
chip, but at ~$9 it seems awfully expensive. My gut tells me that with a
little ingenuity I can do it for much cheaper.

There's an example at
http://users.minet.ca/~tcumming/Electronics/circuits/thermostamp.html that
shows how to drive a single digit with a shift register and the text implies
that you could drive multiple digits by "...driving the Ground line of the
LED display high or low" but he hasn't tried it. Anyone know if this would
actually work with stock LED digit parts?
TIA for any suggestions or advice.

/* Andrew */
----
Andrew Tucker
Software Engineer
Aegis Software
mailto:andrewt@a...

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-08-28 22:12
    In a message dated 8/28/00 3:14:40 PM Central Daylight Time,
    andrewt@a... writes:

    > I'm trying to determine the best way to drive 4 seven segment LED digits
    > from a BS2 with a minimum number of I/O pins. I know about the MAX7219
    > chip, but at ~$9 it seems awfully expensive. My gut tells me that with a
    > little ingenuity I can do it for much cheaper.

    If you (your power supply) can afford the current, you could use a 74x595
    shift register for each digit (no multiplexing).

    While you can multiplex four 7-segment displays with PBASIC, you'll have
    little time to do anything else. Using the option above, you can drive the
    four displays using only three I/O lines (clock, data and latch).

    -- Jon Williams
    -- Dallas, TX
  • ArchiverArchiver Posts: 46,084
    edited 2000-08-30 22:46
    In a message dated 8/28/00 5:17:14 PM Eastern Daylight Time, jonwms@a...
    writes:

    <<
    > I'm trying to determine the best way to drive 4 seven segment LED digits
    > from a BS2 with a minimum number of I/O pins. I know about the MAX7219
    > chip, but at ~$9 it seems awfully expensive. My gut tells me that with a
    > little ingenuity I can do it for much cheaper. >>


    you could always ask the fine folks at maxim for a free sample. thats how i
    got my max7219

    just a thought

    jeff
  • ArchiverArchiver Posts: 46,084
    edited 2000-08-31 00:10
    ...But it usally takes a month or two to receive it.

    > you could always ask the fine folks at maxim for a free sample. thats how
    i
    > got my max7219
    >
    > just a thought
    >
    > jeff
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-08-31 00:42
    And I wouldn't learn much. I'm currently planning on using the idea of
    chaining together multiple 74HC595 shift registers, one for each digit. If
    that works it'll be less than half the price (for 4 digits) and more
    flexible as well.

    Original Message
    From: BlitzK / Xenu [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=wu0KKMTC1cf9zYiyfgAJufbVusKa7wBwV1fCzlatbR153vvVQSjg7MzYplscj2R7NxmGHF_HZX3O17g]xenu@t...[/url
    Sent: Wednesday, August 30, 2000 4:10 PM
    To: basicstamps@egroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] 4-digit LED display


    ...But it usally takes a month or two to receive it.

    > you could always ask the fine folks at maxim for a free sample. thats how
    i
    > got my max7219
    >
    > just a thought
    >
    > jeff
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-08-31 18:12
    > > I'm trying to determine the best way to drive 4 seven segment LED digits
    > > from a BS2 with a minimum number of I/O pins. I know about the MAX7219
    >

    How about a '7447, a BCD-to-Seven segment driver. 3 I/O pins will give you
    0-9 on the display. If you only need 0-7, 3 pins will do. This part is
    "generic" and would be less expensive than the Maxim part.

    Steve

    Steve Roberts: sroberts@s...
  • ArchiverArchiver Posts: 46,084
    edited 2000-08-31 18:32
    Unless I am misunderstanding the data sheet, 7447s can't be chained together
    the way the 74x595's can. That means I'd need 3 I/O lines per digit or 12
    of the stamps 16 I/O pins to drive 4 digits. Using 74HC595s I can get 4
    digits for 3 I/O lines total instead of per digit.

    Original Message
    From: Stephen Roberts [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=vQxlP-zZ14aXUc2yHfcv0z_WzayQeyXw7xEojYHXB61Of2_uj465V8gWBs6f27aw0iGbzALuCerBuvRpyCRB0ZiL2kE]sroberts@s...[/url
    Sent: Thursday, August 31, 2000 10:13 AM
    To: basicstamps@egroups.com
    Subject: [noparse][[/noparse]basicstamps] Re: 4-digit LED display


    > > I'm trying to determine the best way to drive 4 seven segment LED digits
    > > from a BS2 with a minimum number of I/O pins. I know about the MAX7219
    >

    How about a '7447, a BCD-to-Seven segment driver. 3 I/O pins will give you
    0-9 on the display. If you only need 0-7, 3 pins will do. This part is
    "generic" and would be less expensive than the Maxim part.

    Steve

    Steve Roberts: sroberts@s...
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-03 10:21
    Hi,

    To save some 595s... and a lot of programming, you may use one 595 and two
    BCD to 7-segment decoder (like 7447). That way, you send 8 bits to the 595,
    and the decoders will do the job of setting the segments on or off on the
    two displays . This will be far more easy to program as well.
    So you need 2 times 595 and 4 times 7447, I think this will remain a cheap
    solution.

    Best regards,
    Philippe Derenne

    Original Message
    From: Andrew Tucker <andrewt@a...>
    To: <basicstamps@egroups.com>
    Sent: Thursday, August 31, 2000 1:42 AM
    Subject: RE: [noparse][[/noparse]basicstamps] 4-digit LED display


    >
    > And I wouldn't learn much. I'm currently planning on using the idea of
    > chaining together multiple 74HC595 shift registers, one for each digit.
    If
    > that works it'll be less than half the price (for 4 digits) and more
    > flexible as well.
    >
    >
    Original Message
    > From: BlitzK / Xenu [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=z_dnleVog_p7O_ixebXd17fq58sTLfzaSkY8kpUhBgSrSb1GkcrSR-sKJrhNQ7a1pTeGNu6-krnIPSiY7A]xenu@t...[/url
    > Sent: Wednesday, August 30, 2000 4:10 PM
    > To: basicstamps@egroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] 4-digit LED display
    >
    >
    > ...But it usally takes a month or two to receive it.
    >
    > > you could always ask the fine folks at maxim for a free sample. thats
    how
    > i
    > > got my max7219
    > >
    > > just a thought
    > >
    > > jeff
    > >
    > >
    > >
    > >
    >
    >
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-05 17:09
    That's a great idea and I'll give it a try. Thanks!

    Original Message
    From: Philippe Derenne [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=bJFDvSEt5e0AcwNFJtwAjS7Sn2chjc6cFy21Nhe0JI2dbGDcuSeOI6Qb0eEeLLNkSWGosvAdeImNlz8]derennep@s...[/url
    Sent: Sunday, September 03, 2000 2:22 AM
    To: basicstamps@egroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] 4-digit LED display


    Hi,

    To save some 595s... and a lot of programming, you may use one 595 and two
    BCD to 7-segment decoder (like 7447). That way, you send 8 bits to the 595,
    and the decoders will do the job of setting the segments on or off on the
    two displays . This will be far more easy to program as well.
    So you need 2 times 595 and 4 times 7447, I think this will remain a cheap
    solution.

    Best regards,
    Philippe Derenne

    Original Message
    From: Andrew Tucker <andrewt@a...>
    To: <basicstamps@egroups.com>
    Sent: Thursday, August 31, 2000 1:42 AM
    Subject: RE: [noparse][[/noparse]basicstamps] 4-digit LED display


    >
    > And I wouldn't learn much. I'm currently planning on using the idea of
    > chaining together multiple 74HC595 shift registers, one for each digit.
    If
    > that works it'll be less than half the price (for 4 digits) and more
    > flexible as well.
    >
    >
    Original Message
    > From: BlitzK / Xenu [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=4nSDnJ7FMoaQiBO71G1_P7S84PfxmZlfdrV0y8gbLC82vFVB9FX9OE5vkUwC42ciLnrHk3uRnBC_KrghwQ0N]xenu@t...[/url
    > Sent: Wednesday, August 30, 2000 4:10 PM
    > To: basicstamps@egroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] 4-digit LED display
    >
    >
    > ...But it usally takes a month or two to receive it.
    >
    > > you could always ask the fine folks at maxim for a free sample. thats
    how
    > i
    > > got my max7219
    > >
    > > just a thought
    > >
    > > jeff
    > >
    > >
    > >
    > >
    >
    >
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-05 17:23
    In a message dated 9/5/00 11:20:54 AM Central Daylight Time,
    andrewt@a... writes:

    > To save some 595s... and a lot of programming, you may use one 595 and two
    > BCD to 7-segment decoder (like 7447). That way, you send 8 bits to the 595,
    > and the decoders will do the job of setting the segments on or off on the
    > two displays . This will be far more easy to program as well.
    > So you need 2 times 595 and 4 times 7447, I think this will remain a cheap
    > solution.

    What this doesn't solve is the multiplexing problem -- and chews up a lot of
    board space. With all of the above, it's about a wash (in parts and time) to
    use a 7219 that takes care of the multiplexing for you and vastly simplifies
    your code.
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-05 17:28
    What multiplexing problem are you referring to?

    I agree that this is more work than the MAX7219 and takes up more space, but
    it's worth IMO since I've learned about a bunch of alternative methods for
    accomplishing this task and it's still about 2/3 the price.

    Original Message
    From: jonwms@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=XkIrIOoOLHFCAnTM5_cJMhQtTUms7kQD0xkvJYSBX9Awo-jECLxOZe8hzZ9e2YcJexiZ98c]jonwms@a...[/url
    Sent: Tuesday, September 05, 2000 9:24 AM
    To: basicstamps@egroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] 4-digit LED display


    In a message dated 9/5/00 11:20:54 AM Central Daylight Time,
    andrewt@a... writes:

    > To save some 595s... and a lot of programming, you may use one 595 and two
    > BCD to 7-segment decoder (like 7447). That way, you send 8 bits to the
    595,
    > and the decoders will do the job of setting the segments on or off on the
    > two displays . This will be far more easy to program as well.
    > So you need 2 times 595 and 4 times 7447, I think this will remain a
    cheap
    > solution.

    What this doesn't solve is the multiplexing problem -- and chews up a lot of

    board space. With all of the above, it's about a wash (in parts and time)
    to
    use a 7219 that takes care of the multiplexing for you and vastly simplifies

    your code.
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-05 17:51
    In a message dated 9/5/00 11:38:23 AM Central Daylight Time,
    andrewt@a... writes:

    > What multiplexing problem are you referring to?
    >
    > I agree that this is more work than the MAX7219 and takes up more space,
    but
    > it's worth IMO since I've learned about a bunch of alternative methods for
    > accomplishing this task and it's still about 2/3 the price.

    Perhaps I missed part of the discussion -- and keep in mind that "best" is
    whatever works. The thread refers to four digits.

    From my point of view, time and board space aren't free. The board space
    issue is obvious. On time: Unless you've got a really big power supply that
    can handle all the segments of four displays (at least 28, more with decimal
    points), you need to multiplex the displays. That is, select a digit (pull
    it's common-cathode low) then place the segment data out (the segments of all
    four displays are tied to a common bus). You need to wait a millisecond or
    so before moving on to then next digit. If this (multiplexing) is done
    correctly, the persistance-of-vision of the human eye will not detect flicker.

    Multiplexing can be done with a Stamp (yes, I've done it -- but only as an
    exercise) but it doesn't leave a lot of code time do much sophisticated
    processing. This whole discussion is moot with a big power supply and your
    595-to-decoder solution is excellent.
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-05 19:49
    At 09:28 AM 9/5/00 -0700, you wrote:

    >
    >What multiplexing problem are you referring to?
    >
    >I agree that this is more work than the MAX7219 and takes up more space, but
    >it's worth IMO since I've learned about a bunch of alternative methods for
    >accomplishing this task and it's still about 2/3 the price.

    And the 7219/7221 will do more. It multiplexes REALLY fast (ie. 800hz)
    so it's completely undetectable and the rate won't vary with other demands
    on the processor. You can also vary the brightness of the display in
    software, which is pretty neat. And Maxim has an extremely generous sample
    policy. You should also know that it will only work with common cathode
    displays.

    As to "not learning as much". Why will you learn less by correctly
    interfacing a special purpose state-of-the-art chip?

    Just my 2 cents, Duncan
  • ArchiverArchiver Posts: 46,084
    edited 2000-09-05 21:08
    Just by this discussion I've already learned about at least two alternative
    ways of doing this(4 595s or 2 595s and 4 7447s). Using the MAX7219 as a
    black box would certainly have solved the problem but I wouldn't have been
    aware of these alternative (and cheaper) solutions. For me as an
    electronics hobbyist, the entire point of the exercise is to learn as much
    as possible thus non-7219 solutions are time and effort well spent.

    Thanks,


    At 09:28 AM 9/5/00 -0700, you wrote:

    As to "not learning as much". Why will you learn less by correctly
    interfacing a special purpose state-of-the-art chip?
Sign In or Register to comment.