Combining 7 segment displays

Thread Starter

hotshot05

Joined Jul 30, 2010
2
For my project, I need to use two or more 7 segment displays.

I am using an Atmega16L microcontroller.
Is it possible to combine two 7 segment displays so that those use only one port i.e 8 pins and no more ?

I am using C programming and AVRStudio.
So please mention how to write the program which will display the numbers.
If I connected the displays separately to each port, just by making the different segments glow, I can display the numbers. But if I combine them, how to display the numbers?

P.S: I am a total newbie to microcontroller electronics and it would help if you thought of me as a layman and gave your reply accordingly.
So please try to avoid jargon.
 

tom66

Joined May 9, 2009
2,595
You can get away with it using 9 pins. Two pins to select the displays and seven pins for the seven segments. Add another pin for a decimal point. Or, you can use a shift register (a device for shifting data in a bit at a time, and outputting it in parallel), then you can get away with 3 pins, clock, data, and display enable.

Is that OK?
 

hspalm

Joined Feb 17, 2010
201
You dont really need 2 pins for selecting displays either, you can just use one pnp for the first display and one npn for the second.
You need to shift the two values you want to display on the 7 pins at the same rate (at least 50hz or so) as the selecting pin goes high and low. Then you can display numbers on both displays at the same time. Or, so it seems.
 

tom66

Joined May 9, 2009
2,595
That would work; but it isn't extensible to multiple displays. If the OP wanted to add some more LEDs or another display, he'd be out of luck.

OP, you could even get away without transistors, just use the microcontroller's inputs to sink current, be careful though not to exceed the 25mA output current limit.
 

Thread Starter

hotshot05

Joined Jul 30, 2010
2
For what are the transistors used??
To increase the current coming from the microcontroller pins??

@hspalm But why one npn and another pnp???
 

tom66

Joined May 9, 2009
2,595
Correct, the microcontroller pins can't sink much current (25mA is usually the maximum; YMMV - your micro may vary.)

If you had two displays you'd use one NPN to select the first display when the pin is high and a PNP to select the second display when the pin is low.
 
Top