Jump to content

Multiplexing 7-segment displays by segment

Recommended Posts

In case it might be of use to someone, I've posted a Youtube video and created a Github repo dealing with an alternate way of multiplexing 7-segment displays that has a greatly reduced parts count.  It's multiplexing by segment instead of by digit.  The video shows this method implemented with an MSP430G2553.  The Github repo has demonstration Arduino Nano sketches, but they should work as-is with Energia except for the pin assignments.  The video is on my local OSH group's channel, and I can't respond to comments there, but will answer questions here if there are any.



Link to post
Share on other sites
55 minutes ago, Peabody said:

That's very interesting.  Do you vary the PWM rate depending on the number of segments being lit up?  And no resistors on the common cathodes?

In my case, as you can see, intensity (brightness) of each segment is equal. To have this, time for displaying number "1" must be shorter than time for displaying number "6" (last digit).

There is no any resistors. Common anode/cathode is powered by extra lvc logic gate, not by transistor, so hardware and software as it is, support both options, and mixed combination (for example 1 digit can be common anode and another 2 common cathode).

It is codded in assembler, refreshing interrupt (0.5 ms per segment ~ 5 ms per digit) is triggered by WDT (timer peripheral is not used), and in worst case scenario, interrupt will take about 30 CPU cycles.

Link to post
Share on other sites

OK, so you don't use a timer-based PWM output, but vary the ON time in your code (NOPs or whatever) based on the number of segments being lit.  And I assume the "worst case" is displaying an 8.  Well that's pretty cool.  And assembler is good for this kind of thing.  I did all of my version in MSP430 assembler first, then moved it to Energia/Arduino to make it more accessible.

What LVC part did you use?


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...