Combining 7 segment displays

Discussion in 'General Electronics Chat' started by hotshot05, Jul 30, 2010.

  1. hotshot05

    Thread Starter New Member

    Jul 30, 2010
    2
    0
    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.
     
  2. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    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?
     
  3. hspalm

    Active Member

    Feb 17, 2010
    201
    8
    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.
     
  4. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    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.
     
  5. hotshot05

    Thread Starter New Member

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

    @hspalm But why one npn and another pnp???
     
  6. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    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.
     
Loading...