+ Reply to Thread
Results 1 to 12 of 12

Thread: Multiple 7 Segment displays

  1. #1
    erikgunit Newbie
    Join Date
    Aug 2009
    Posts
    5

    Lightbulb Multiple 7 Segment displays

    Hi all. I am currently looking to drive possibly up to twelve 7 segment displays. At least this was my plan, I am hoping for a push in the right direction from all you know it alls(in a good way). I looked at multiplexing and that is an option, that is if i could multiplex 3 sets of 4 displays. Is there an easier method to displaying caracters using a PIC? Just a little push. Its all i need. Thanks!! -Erik


  2. #2
    k7elp60 Excellent k7elp60 Excellent k7elp60 Excellent k7elp60 Excellent k7elp60 Excellent
    Join Date
    Oct 2003
    Location
    Utah
    Posts
    926

    Default

    Multiplexing is the way to go. All the individual segments are tied together and then the digit drive determines which digit is illuminated. For 4 digits it only takes 11 lines of drive.
    The great thing about electronics is unlimited ways to do the job. The only limit is one\'s imagination. I generally think my way is best.
    Show me a different way. I have an open mind.

  3. #3
    solis365 Good solis365 Good solis365 Good
    Join Date
    Oct 2008
    Location
    CT&NY, USA
    Posts
    193

    Default

    are you limited by the number of pins?

    this may or may not work at all but I had read about using a technique called "charlieplexing" to use fewer pins to drive more multiplexed outputs - it uses the THREE possible states of a uC output pin - hi, low, and input (which is high-impedance), thus giving more flexibility. its more complicated, so if you dont need to do it, dont.

  4. #4
    Boncuk Excellent Boncuk Excellent Boncuk Excellent Boncuk Excellent Boncuk Excellent Boncuk Excellent Boncuk Excellent
    Join Date
    Nov 2007
    Location
    Phetchabun,Thailand
    Posts
    3,441

    Default

    Check out the MAX6954.
    Proper Planning Prevents Piss Poor Performance

  5. #5
    georgetwo Newbie
    Join Date
    Jul 2009
    Location
    DELTA state Nigeria
    Posts
    87

    Default

    Driving an LED Display circuit help

    this will give you a good idea of 7 segment with pic.

  6. #6
    kpatz Good kpatz Good
    Join Date
    May 2009
    Location
    NH
    Posts
    305

    Default

    Charlieplexing won't work with 7-segment displays. If you use a combination of common-anode and common-cathode displays, you could get twice as many digits under the same number of I/O pins.

  7. #7
    Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent
    Join Date
    Jan 2005
    Location
    Michigan, USA
    Posts
    2,516

    Default

    Charlieplexing works fine with 7-segment displays but I don't think it would be a good solution for Erik's needs.

    Dedicated display driver ICs would reduce I/O pin requirements but can be a bit pricey. Multiplexing is a viable solution. Perhaps a modular design? How about three seperate 4-digit modules running off a 5-pin interface with PWM brightness control? Just connect the 'SER' line on each module to a unique line (RB2, RB3, or RB4) and load the shift registers on the three modules in parallel (a bit banged 3-channel SPI bus of sorts) by retasking the column driver lines for use as 'SER' and 'CLK' lines during a short display blanking interval at the beginning of each column update interrupt cycle.

    Anybody want to see software for this design?

    Attached untested BoostC demo for 16F88 below. Most of the interrupt driver code just sets up the special 8 byte 'srdata' array which is used for a 3-channel SPI update of the three 74HC595 shift registers in parallel in just 24 instruction cycles at the beginning of the next interrupt.


    Attached Images
    Attached Files
    Last edited by Mike, K8LH; 23rd August 2009 at 09:42 AM.

  8. #8
    erikgunit Newbie
    Join Date
    Aug 2009
    Posts
    5

    Default

    alright i see i have some options out there. As far as pin limitations go, i am still looking around to find the right pic for my needs, so i can get one that is robust enough to handle what i want to throw at it. I like the so called charlie plexing, allows more 7's with less pins but simplicity, meaning using more pins, may be a better way to go. Im sure with some more searching and help form all you guys out there i can find a solution. Thanks

  9. #9
    kpatz Good kpatz Good
    Join Date
    May 2009
    Location
    NH
    Posts
    305

    Default

    12 Seven segment displays: you would need 7 pins for the segments (or 8 if you want to use the decimal points), plus 1 pin for each display's common, so that would be 12 + 8 = 20 pins.

    There's ways to reduce this. For example, if you use 6 common cathode and 6 common anode displays, you could utilize a simplified charlieplexing scheme to reduce the number of common pins to 6, so total pins needed would be 13-14.

    Or, use a 1-of-16 decoder such as a 4514/4515 to drive the 12 commons from 4 I/O pins. If you only need digits (not custom characters) you could use a 4056 to decode 4 pins into the 7-segment display. Combine the two and you can drive 16 digits with 8 I/O pins.

    With electronics, there's always 10,000,000 ways to accomplish a task. It's picking the simplest/most efficient/cheapest way that's the challenge.

  10. #10
    Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent
    Join Date
    Jan 2005
    Location
    Michigan, USA
    Posts
    2,516

    Default

    Quote Originally Posted by kpatz View Post
    Charlieplexing won't work with 7-segment displays. ...
    Quote Originally Posted by kpatz
    ...if you use 6 common cathode and 6 common anode displays, you could utilize a simplified charlieplexing scheme to reduce the number of common pins to 6, so total pins needed would be 13-14.
    I don't think you know as much about Charlieplexing as you would like to think. First you say "it won't work" and now you're saying you can make it work by breaking the Charlieplexing signal rules.

    May I suggest you do a little more research before offering more faulty advice?

    Kind regards, Mike

  11. #11
    kpatz Good kpatz Good
    Join Date
    May 2009
    Location
    NH
    Posts
    305

    Default

    Quote Originally Posted by Mike, K8LH View Post
    I don't think you know as much about Charlieplexing as you would like to think. First you say "it won't work" and now you're saying you can make it work by breaking the Charlieplexing signal rules.

    May I suggest you do a little more research before offering more faulty advice?

    Kind regards, Mike
    Only semi-faulty... you can do inverse parallel charlieplexing with a common anode and common cathode 7-segment display, which will give you 2 displays w/the same number of pins as 1 display w/o charlieplexing, but if you know of a way to do tri-state charlieplexing with 7-segment displays, I'm all ears/eyes (referring to LEDs 5 and 6 in this diagram):



    Plus, perhaps I did some research after the 1st post and before the 2nd...
    Last edited by kpatz; 20th August 2009 at 05:34 PM.

  12. #12
    Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent
    Join Date
    Jan 2005
    Location
    Michigan, USA
    Posts
    2,516

    Default

    kpatz,

    Wiring common cathode and common anode displays back-to-back with one line driving the two 'common' lines is not Charlieplexing.

    if you know of a way to do tri-state charlieplexing with 7-segment displays, I'm all ears/eyes
    So you're willing to be enlightened if someone brings you the info' but not interested enough to find it yourself? LOL, just kidding...

    There are plenty of examples for Charlieplexing 7-segment displays. The basic Charlieplexing signal rules still apply so we use active high NPN column drivers for common anode displays or active low PNP column drivers for common cathode displays. In the case of the common anode 7-segment matrix below, only one pin will ever be driven high to turn on one of the active high column drivers. The other pins are either driven low to sink current and light up associated LEDs in that column or tri-stated (high-z) to leave LEDs turned off.

    Charlieplexed matrix wiring is peculiar in that we use a "float" pin to drive LEDs that occupy a position in the matrix where the column and row would use the same pin (illegal col/row combinations RB0/RB0, RB1/RB1, etc.).



    The driver for a Charlieplexed 7-segment matrix isn't much more complex then the driver for a traditional multiplexed matrix. We use a ring counter variable (only 1 bit high) as the port output pattern and to detect when we need to set the "float" bit then we turn on or turn off individual outputs by manipulating the TRIS register.

    Code:
    void interrupt()
    { pir1.TMR2IF = 0;              // clear tmr2 interrupt flag
      data = display[column];       // new column segment data
      trisb = 0xFF;                 // blank the display
      portb = colsel;               // new output pattern (only 1 bit hi)
      if(data & colsel)             // if 'float' pin required
        data.7 = 1;                 // set the 'float' pin (RB7)
      data |= colsel;               // pick up column select bit
      trisb = ~data;                // display new column (digit)
      if(colsel.7)                  // if last column
      { colnbr = 0;                 // reset column number
        colsel = 1;                 // reset column select bit
      }
      else                          // else
      { colnbr++;                   // increment column number
        colsel <<= 1;               // shift column select bit
      }
    }
    
    Attached Images
    Last edited by Mike, K8LH; 21st August 2009 at 10:38 AM.

+ Reply to Thread

Similar Threads

  1. multiplexing two 7 segment displays
    By rebirth of sands in forum Electronic Projects Design/Ideas/Reviews
    Replies: 10
    Latest: 6th January 2008, 09:11 AM
  2. multiple 7-segment displays
    By ico2 in forum Electronic Projects Design/Ideas/Reviews
    Replies: 31
    Latest: 20th February 2007, 04:05 PM
  3. What LED 7 segment displays to buy
    By kennydow241 in forum General Electronics Chat
    Replies: 3
    Latest: 24th May 2005, 01:25 AM
  4. LED Clock with Multiple Displays
    By mahesh_jo in forum General Electronics Chat
    Replies: 3
    Latest: 22nd June 2004, 01:14 AM
  5. Don't want to waste 7-segment displays
    By scholesy in forum General Electronics Chat
    Replies: 0
    Latest: 6th April 2004, 11:15 PM

Tags for this Thread