This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Interfacing 7 segment display with msp430 launchpad

Other Parts Discussed in Thread: MSP430G2553

Hello, I need to use two 7 segment displays in my assignment . I used two 4511 drivers in order to drive two 7 segment displays (as each 7 segment display takes 8 pins and Am running short of i/o pins I used driver and  I also have other peripherals to interface with controller) now Am stuck up like how to interface this driver with msp430 launch pad. Can any one help me out to figure this out !

  • Let's ask google first. Click the link below.

         http://lmgtfy.com/?q=msp430+4511+segment+driver

    -kel

  • Agree w/ Kel's Google suggestion.  You must become more resourceful to better succeed both in school & thereafter.

    Your 4511 requires 4 data bits to produce 0-9 numeric representations upon display.  And - you have a "strobe" pin on the 4511 - which critically enables those 4 data bits to see additional use. 

    To conserve MCU GPIO - you may connect those same 4 MCU GPIO/data pins in parallel - to each 4511.  Trick then is to harvest 2 more GPIO - connect one each to the strobe pin of 4511.  (unique strobe connections)  In so doing you've reduced the GPIO requirements from 8 to 6.  Only that data present @ the moment the targeted 4511 receives the strobe signal will be latched into that particular 4511 - 2nd 4511 will be unaffected.  Repeat this process for the 2nd 4511 -> digit.

    And - you can save even more GPIO.  Multiplexing enables a single 4511 to drive multiple 7 Segment Leds.  Technically this technique is called, "Time Division Multiplexing" and is achieved by strobing data into that single 4511 @ 100Hz or so rates - and employing an extra GPIO (w/ some current buffering i.e. transistor) to pull the common cathode of each display to ground - in that particular display's "ON" period.  This is followed by brief "All OFF" period - and then method is repeated for next display.  We've employed this single 4511 to drive up to 6 efficient, common cathode, LED displays.  In your "unusual" 2 digit display case - six GPIO are required which "breaks even" with the dual 4511 - strobe-technique - described para. above. 

    Certain MCUs have GPIO w/the current capability to directly interface to a 7 segment Led.  Multiplex method is usually employed - and additional GPIO provide the necessary switch drive to external transistors which enable each display to be sequentially driven/scanned.  Done quickly enough (i.e. 100Hz usually works) the observer cannot tell that the digits are not, "always on."   (but you can achieve this recognition - by moving your head rapidly - you'll then slightly note the scan...)

    Green Verify Answer tick much appreciated - s'il vous plait.

  • Thanks for the quick response Markel and  cb1_mobile :) Actually I understood the multiplexing part and my doubt is how to interface this arrangement to MUC(msp4302553) I mean which pins are to be connected to MUC from 4511.I have gone through the 4511 pin description but not yet sure  about which pins are to be connected to MUC

  • archita mamani said:
    which pins are to be connected to MCU

    You have great flexibility in MCU -> 4511 pin selection. 

    To ease SW - suggest that you choose 2 separate MCU ports - one for data - 2nd for strobe control.  This separation of MCU ports eases your job as it is less likely that the 2 port method will enable output from the data port to "disturb" the strobe port - and vice-versa.

    Suggest that you choose MCU Port bits D0-D3 for data - in this manner the data you output has direct correlation with what will be displayed.  (i.e. data_port = 3; will produce a "3" on the display; data_port = 8; will yield an "8.")  You wire MCU D0 to D0 of both 4511s.  (and Dn to Dn - similarly)

    It has been good 20+ years since our group used 4511 - but I believe the strobe/latch input is "edge" (not level) sensitive.  If you connect D0 from MCU strobe_port to 4511 #1's strobe input - then strobe_port = 0; (some delay) followed by strobe_port = 1; generates a "rising edge" (check 4511 data to learn what's actually needed - I'm providing a general format solution.)  "Delay" listed may/may not be required.  4511 should list minimum "hold" time for that strobe - if it is "pulse" rather than "edge" driven.  Back to back MCU instructions may violate the pulse width requirement - delay cures. 

    Test this code with only a single 4511/display connected - want to build your understanding/confidence first.  Once that's working - we must modify so that a 2nd digit can be accommodated.

    Now - onto that 2nd digit - assume D1 from MCU strobe_port routes to strobe pin - 2nd 4511.  Thus strobe_port = 0, (delay) strobe_port = 2; will cause a rising edge upon 2nd 4511.  You will note that "1" and "2" are mutually exclusive - thus will not "spoil" data upon the other 4511.  But - if you wish to write the identical data to both 4511s - in just "one go" you may "strobe_port = 3;"  (delay), strobe_port = 0; .

    Final consideration - suggest you attempt only after the above description has been test/verified.  Might you be able to achieve "all of the above" from 6 pins - upon a single port?  And - use some/many of that port's "other pins" - for different requirements?  Answer is Yes - if cautious.  "Magic" here is limiting your LED transactions to just the Led Data & Strobe pins.  And - limiting "other transactions" to just those selected "other pins"  - even though all of these pins are now upon the same port.  And - there's one more complication when using single port for both data & strobe.  It is tempting to output data & strobe in single instruction - and this will fail as the "hold" time required for data to stabilize - prior to the arrival of strobe - will likely be violated.  That said - if we assume "rising edge" works w/4511 - the data and strobe = 0 may be sent as one.  (i.e. together)  Then follows (delay) and then the strobe is driven high - being sure to change not other port pin content!  (critical - see below)  This explains why I've asked that you not "start" w/this more complex method - you really have to get the simpler version (para above) to work first - otherwise "krazy-making" too much in play...

    If you don't "limit/confine" port transactions - you will likely "spoil" data presently output from that port - but not part of your current transaction.  Think about this - and see if you can devise a method to "confine" your transaction to just a limited number of pins - anywhere on that port...

     

  • Sorry for the late response.Yeah it worked well :) Thanks

  • you can connect the output ie the segment pins (a-g) of CD4511 to both the 7 segment LED's and use two IO pins of the microcontroller to select each of the 7 segments displays one by one.Do it fast enough people will not be able to understand the difference.
    here is a short tutorial on interfacing 7 segment with msp430g2553 ,

    xanthium.in/interfacing-7-segment-led-with-msp430-launchpad

**Attention** This is a public forum