Shop OBEX P1 Docs P2 Docs Learn Events
Multiplex 7 segments — Parallax Forums

Multiplex 7 segments

GaudwareGaudware Posts: 18
edited 2008-11-04 14:32 in Propeller 1
Is their an object out their already that will enable me to control a 7 segment multiplex display with just software and no external devices, like a virtual display driver.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Diamonddredges.com
Gaudware.net84.net

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-11-03 17:42
    An object or BASIC Stamp code? Typically on a BASIC Stamp you would use a driver IC such as the MAX7219.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • GaudwareGaudware Posts: 18
    edited 2008-11-03 18:17
    I want to multiplex 7 segment display driver with out external components such as MAX7219.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Diamonddredges.com
    Gaudware.net84.net
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-11-03 18:32
    You wanted an "object" that would do that, but THEN you don't want an "external component" that's designed to do that very thing?

    Perhaps the BS2, with all of 26 bytes of RAM, is not the device you should be using. Note a 7-segment chip has quite a few pins -- even if you used an SX chip or something, you'd be using up lots of I/O pins for a relatively trivial use. And no, since the BS2 is a single-tasking processor, and not a very fast one at that (2000 PBasic Instructions per second), the 'refresh rate' on a multiplexed display would be pretty low.

    And no, there's probably no pre-built code (your "object", I assume) to achieve this.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-03 18:32
    You can't do it without external components. The current requirements of most 7 segment displays is beyond what the Stamp can supply, particularly if you're multiplexing it and trying to make up the brightness loss by using a high peak current. You will at least need external driver transistors, one for each of the 7 segments and one for each of the displays (plus current limiting resistors for the displays and the transistor bases).
  • GaudwareGaudware Posts: 18
    edited 2008-11-03 18:53
    The drive Transistors I can live with yet I have seen the same code do with a pic microcontroller. I sorry I posted this question in wrong category suppose to be in propeller, just notice that it was not.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Diamonddredges.com
    Gaudware.net84.net
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-03 19:04
    Have you looked in the Propeller Object Exchange? There's a "Seven segment driver" that might work for you. It still needs the driver transistors.
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-11-03 19:24
    Ah. Yes, the propeller should be able to do this. You might use a Darlington Array chip (LM2803 or something like that) for 8 drivers in a single chip.
  • GaudwareGaudware Posts: 18
    edited 2008-11-03 20:36
    great, thanks for the help. burger.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Diamonddredges.com
    Gaudware.net84.net
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-11-03 21:03
    This thread is being moved to the Propeller Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Chuck RiceChuck Rice Posts: 210
    edited 2008-11-04 01:28
    I use a seven segment display for my BBQ controller. The only external components it uses are the current limit resistors. I will attach the code which has a schematic in the comments. It is not a simple example, but it may help.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-04 01:44
    You do have to be very careful of the current limitations of the Propeller. Each group of 8 I/O pins has limits on the total source / sink current and the whole chip has limits, both given in the datasheet.
  • Chuck RiceChuck Rice Posts: 210
    edited 2008-11-04 02:28
    Mike Green said...
    You do have to be very careful of the current limitations of the Propeller. Each group of 8 I/O pins has limits on the total source / sink current and the whole chip has limits, both given in the datasheet.

    What section is that in, Mike? I am a self taught datasheet reader, so I may be totally missing something fundamental. (Very likely) Help me out of my confusion! [noparse]:)[/noparse]

    I see the absolute max per pin of 40ma, and a total of 300ma for both Vdd and Vss. The seven segment I am using (datasheet link:160-1550-5-ND) reaches almost max brightness at 20ma per segment. So with all 7 segments on, that would be 140ma. That is the worst case because the 4 digits are multiplexed, only one digit is powered at a time. So I think I am ok, and the display has been running for several months.

    I am sure you are right, but I would like to understand where I am going wrong.

    And a PS to my first post. I am using common anodes and the OBEX 7-seg code is for common-cathode devices. I started with the OBEX version, but mad significant changes to change the node-e-ness. The thread creater did not specify which he was using and it makes a big difference.
  • Chuck RiceChuck Rice Posts: 210
    edited 2008-11-04 02:45
    Oh! I think I see. The segment pins are fine at 20ma, but the common anode pins could be passing 140ma, in a worse case "all segments on".

    But then why does it work. 120ma is way-above the propellers 40ma limit. Now I am even more confused.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-11-04 02:53
    Doesn't it strobe the segments, too?· (Then only one segment in one digit would be on at any time.)
  • nohabnohab Posts: 96
    edited 2008-11-04 13:54
    I tried the "seven-segment display" in the object exchange with a 4x7LED-display, and it worked directly.
    However, the 1's light stronger then the 8's indicating that the cathode-pins couldn't sink enough current.
    I added a LN2803 for the cathode-pins, and inverted the logic in the driver and voila! it works just great.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-04 14:32
    Chuck,
    The datasheet does only give the maximum total current in or out of the chip (300mA) and the current in or out of any one I/O pin (40mA). It may have been an unofficial comment from Beau or Paul regarding the total current for the I/O pins between Vss/Vdd pins on each side of the package that I remembered or maybe I confounded the Propeller with the SX.
Sign In or Register to comment.