Seven segment display

Thread Starter

helloeveryone

Joined Apr 8, 2011
64
When using a four digit seven segment display it is only possible to display four digits at exactly the same time by:
i) only if you display four different digits
ii) it is impossible to display four digits at exactly the same time
iii) only if you display four of the same digits
iv) only if the microcontroller we are using has enough pins to connect each digit separately
 

t06afre

Joined May 11, 2009
5,934
As they are stated here these options do not give very much sense. Are they taken out of some other context unknown to us. Like the course are using some specific micro.
But then driving seven segment displays from a micro. It is common to use a multiplexing technique. You write information to one display at the time. But so fast that the eye will see it as the displays are written to simultaneous. For that you will need to use 7+4 pins for the four displays
 

elec_mech

Joined Nov 12, 2008
1,500
Just to add a bit to what t06afre said, it depends almost exclusively on the display you use.

There are a few ways to achieve a four digit display:
  1. Four single digit 7-segment displays
  2. One four digit 7-segment display with one set of pins shared by all segments (multiplexed) with separate pins for the common (anode or cathode) for each digit
  3. One four digit 7-segment display with individual pins for each and every segment

The first and third options would allow you to turn on each digit simultaneously and independently of one another, but will require a lot of wiring and lots of microcontroller pins.

The second option requires multiplexing - turning on one digit at a time rapidly. Only one digit is lit at a specific instance in time, but the timing is so fast (each digit comes on and off) that it appears to the human eye all are on at the same time. This requires less pins from the microcontroller but more resources in order to handle the timing. If your microcontroller has limited capability or you simply want to off load the timing operation, you can use a dedicated multi-digit controller like the MAX7219 (I2C) or the MAX7221 (SPI).

You can use the first or third options and wire the segments together to achieve a multiplexed display - still a lot of wiring, but leaves you needing only about 11 pins from the microcontroller instead of 28, more pins if you need decimal points or colons lit.

For these reasons a multiplexed display is used more often than not for multiple digits. However, note that because the multiplexed display is only lighting one digit at any given time, you need to provide more current to the segments to maintain the same brightness as a non-multiplexed display.

Addition: Just saw your last post before I finished this one - you have a multiplexed display (option 2). So you'll need 11-12 microcontroller pins and incorporate timing to turn each digit on and off one at a time rapidly or use a dedicated display IC.
 

t06afre

Joined May 11, 2009
5,934
You have limitations in the display used. In this kind of display. You have to use multiplexing and kind of trick the eye. If you want to show data in all four displays. The exception is in the case you want show the same information on all four displays all the time for some queer reason. Not very practical. And the solution would also most probably require a much larger current than the IO pins connected to the display, are able to source
 

elec_mech

Joined Nov 12, 2008
1,500
I know that the L293D is usually used for driving motors. But could I use it to help the atmega32 drive the common anode display?
I suppose you could, but why? Does the display require more current than your microcontroller can safely output or are you looking to offload the timing tasks?

If the former, I'd suggest using a ULN2003 (7 outputs, up to 500mA) or a ULN2803 (8 outputs, up to 500mA). This assumes you're using 5VDC to power the microcontroller.

If the latter, then look at a MAX7219 or MAX7221. These can each control up to eight digits, but they run ~$11 USD. You can probably find less expensive ICs that control less digits since you only need four.
 

GopherT

Joined Nov 23, 2012
8,009
Given the commn cathode display above, the answer would either be, "only if all digits are the same."

That would be crazy to program it for all digits to suddenly display ony when all for digits are the same but it is technically "possible" and, therefore, "impossible" is not correct.

You have to cut these professors/instructors some slack with the questions. From experience, it is very difficult to think up questions AND think of plausible wrong answers for multiple choice tests.
 
Top