4 digit 7 segment Display - constant on

Hello together.

I was working today the first time with a 4 digit 7 segment display. Seems like I have one with common cathode. (Don't know anymore where I bought it... I guess it was part of a set. So I don't have a datasheet.)

I wired it up and used the library SevSeg from Dean Reading. It is working good for numbers. setChars I don't get to work. The display is lighten up just single fractions. But that is not so important.

The big 'bad' thing is that the library is constantly refreshing the display. What I could find out is that the single segments are lighten up just for a short time and then switched off again. The library is lighten up the single segments so fast, that the eye thinks that they are all on in the same time.
Here is my problem. I need a way to switch the segments on and leave them on. Because my program is doing more stuff then just handling the display. Like playing a tone function, in which it remains for several seconds. Which would mean that the display is dark in this time.
And I will show a date on the display... so no need to refresh it every x ms.

Is it possible to switch segments on (the needed ones for the current date) and leave them in this state (HIGH or LOW)? Or is this not possible with this kind of display?

You could do that but you'd need a ton more pins. You'd need 32 pins for the segments and 4 more for the cathodes.

The best bet would be to fix the other code so it isn't blocking. Then you could do all that at the same time.


You can direct drive the display with shift registers. You can drive a 4 digit display with just three pins. You need 4 shift registers. No library is needed. You can drive them with just "shiftout" function.

You can drive them with just "shiftout" function.

If you want to be really slick, you can hook shift registers up to the SPI bus and drive them with that a lot faster and with smaller code.

Or buy a $1 module from Ebay that drives the 7-seg display with commands from the SPI or I2C bus.
e.g. MAX7219 or TM1638

Yes, the driver chips handle the multiplexing.

You can use bare 7-segs and look after the multiplexing with an Arduino interrupt routine.
If your Arduino crashes or you disable interrupts, you burn out the LEDs that are currently lit.

The custom driver chips do not have this problem.