Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Multiplexing 7segment displays

Status
Not open for further replies.
It's a PNP transistor, meanning it switches on when base is off.
For example, if you output low to RA3 and RB0-7, you get a number "8" and the dp on the left-most display.
The idea is to use this method and to activate the displays in sequency, each one switched on 25% of the time. If you do this fast enough, the human eye would not be able to tell that it's actually displaying discontinuously.
 

HEllo
This is 7-display with common anode ,meaning common ,for one digit is - so for example you put low (because of PNP transistor) PIN RA3 and you put low on pins from RB0-RB7 and a,b,c,d,e,f,g segments of the first digit will light, changing from RA0 to RA3 you could light any of four displays.Putting on low PINS form RB0-RB7 you could make any digit from 0 to 9.This is if you want to light just one display at the time.IF you want to light 4 displayes at the time you must first put digit on display one ,RA3 goes low and then put your wanted digit using PIN RB0 to RB7, after you finish that then, RA3 goes high ,then RA2 goes low, and then again desired digit with RB0 to RB7, and so on... until you reach RA0.REsult will be your digit one on first display, then another digit on second display.......You are wondering how can I see all digit at the same time.Trick is that you must have program which will fast write digit to one display and then go to another .Program must work in circle when he finis 4th display it must go to first.And for human eye it will look that all displayes are working at the same time because it is so fast it is called refresing.But in real time only one display is working , you can not noticed because it is so fast.
borko
 

Thanks.
Why isn't the common anodes connected to the pins directly,why do we need a transistor in between ...isn't each pin supplying 10 ma for each segment which is enough ?
 

of course a 10mA aren't enough !

In a multiplexed system, the average current of each led is the ratio betweeen the driving current and the number of digits you're scanning. In this case, you have four digits, so the average current is simply a quarter.

Consider the worst driving case, which is when all the LEds are on (the digit is displaying "8."), so supose you want your display to look as driven by 10 mA, so these transistors must to be able to deal with:

10mA x 4 x 8 = 320mA (!)

Regards
 

Here is a quote from the page that has the original drawing:

"You'll also note in the figure that I snuck in a transistor between the PIC and the
common anode to each display. Since the current for the entire display runs
through this one pin, it could overload a single I/O line. The transistor amplifies
the current drive capability of the I/O line to solve this dilemma. It is easy to
operate, put ground on the I/O pin to turn on the transistor and enable a given
display, put 5 volts on the pin to turn off the transistor and the display."

https://picbasic.com/resources/articles/ledart.htm
 

Does someone know what is the limit of 7-displays I can connect to pic ,lets say that I have not limit for pins , I mean that all displays can light and that I do not see flashing?
 

In movies the frame rate is 24 frames/s (in television either 25 or 30) so
your refresh rate per digit should be somewhere in that region - regardless
of how many digits you have. I.e. the limit is set by a combination of clock cycle
and software.
You will have to make your own system design estimation depending on your
project's requirement specification. :wink:

/Rambo
 

Regnum said:
of course a 10mA aren't enough !

In a multiplexed system, the average current of each led is the ratio betweeen the driving current and the number of digits you're scanning. In this case, you have four digits, so the average current is simply a quarter.

Consider the worst driving case, which is when all the LEds are on (the digit is displaying "8."), so supose you want your display to look as driven by 10 mA, so these transistors must to be able to deal with:

10mA x 4 x 8 = 320mA (!)

Regards

Thanks for your answer,but this is what's confusing me:
the 7 segments digits don't operate at the same time, so I think that current will be flowing through one digit only each time , so 10 mA x 8 =80 mA ,and I would need 320mA if all the digits are operating at the same time which is not happening...or is it like that because it's only operating for a short time?


:grin:
 

Let's say that we source the current to one digit from pin RA0 and sink it through
pins RB0-RB7. As you say 8 x 10mA = 80 mA will flow from pin RA0 - but the
datasheet for the 16F84 states that the maximum output current sourced or
sunk by any (one) I/O pin is 25mA. So the RBx pins are (each) well within limits, but
the RA0 pin is way out of the limits. See? :wink:

/Rambo
 

XNOX_Rambo said:
Let's say that we source the current to one digit from pin RA0 and sink it through
pins RB0-RB7. As you say 8 x 10mA = 80 mA will flow from pin RA0 - but the
datasheet for the 16F84 states that the maximum output current sourced or
sunk by any (one) I/O pin is 25mA. So the RBx pins are (each) well within limits, but
the RA0 pin is way out of the limits. See? :wink:

/Rambo

okay , why do we need 380 mA for each digit then although one is only active in scanning?
 

We don't.

Regnum was describing what happens if we don't use multiplexing.
The topics in this forum often go out of control because people are so eager to
explain things to the fullest... :wink:

Your entire display will only need 80mA (if all segments of a digit are lit) thanks to
the multiplexing - regardless of how many digits you have or how fast you scan the
digits. Only ONE digit is active at any time.

There, I hope this is the bottom line! :D

But you are of course welcome to ask more questions.

/Rambo
 

    cmos babe

    Points: 2
    Helpful Answer Positive Rating
XNOX_Rambo said:
Let's say that we source the current to one digit from pin RA0 and sink it through
pins RB0-RB7. As you say 8 x 10mA = 80 mA will flow from pin RA0 - but the
datasheet for the 16F84 states that the maximum output current sourced or
sunk by any (one) I/O pin is 25mA. So the RBx pins are (each) well within limits, but
the RA0 pin is way out of the limits. See? :wink:

/Rambo

only one I/O deal with one segment of the 7 segment LED thus, as stated above by others, the I/O only handle approx. 10mA... which meets the limits
 

XNOX_Rambo said:
We don't.

Your entire display will only need 80mA (if all segments of a digit are lit) thanks to
the multiplexing - regardless of how many digits you have or how fast you scan the
digits. Only ONE digit is active at any time.

There, I hope this is the bottom line! :D

But you are of course welcome to ask more questions.

/Rambo

Maybe regnum was trying to say, that in a multiplexed LED display, the brightness of the LEDs will decrease. In order to compensate this, a larger supply current to the LEDs would be necessary, and the simple calculation would then be the nominal current (10mA for each segment) multiplied by the number of multiplexed device.

But in reality, this would cause a significantly high current value, so we should also do some trial-and-error. If we are already satisfied with the brightness of the 7-segment without increasing its current (total of 80mA for all segments lit), well that's fine, there's no need to increase it any more. The maximum sinking current of the PIC I/O port must also be considered when increasing the LED current.

Increasing current in a multiplexed LED system is OK for the LEDs. It won't destroy them. Multiplexing speed should be high enough, though. CMIIW
 

    cmos babe

    Points: 2
    Helpful Answer Positive Rating
XNOX_Rambo said:
We don't.
Regnum was describing what happens if we don't use multiplexing.
The topics in this forum often go out of control because people are so eager to
explain things to the fullest...
Stop drinking beer before posting... I didn't describe anything about such a non-multiplexed thing. Any N-digits multiplexed display segment needs N times the current what drives the same segment in a non-multiplexed display, if you wanna get a similar brightness.
Maybe topics in this forum often go out of control because people ain't so eager to read carefully... :wink:

irfansyah said:
Maybe regnum was trying to say, that in a multiplexed LED display, the brightness of the LEDs will decrease. In order to compensate this, a larger supply current to the LEDs would be necessary, and the simple calculation would then be the nominal current (10mA for each segment) multiplied by the number of multiplexed device. ..
Yeah, that's the point!
In a 4-digit multiplexed system the duty cycle of each LED is simply a quarter, so you must drive the LEDs with four times the average current you want to drive the LEDs in a non-multiplexed scheme. That's the reason why transistor should deal with 320mA instead of 80mA.
As irfansyah said, of course you may try lower currents, compromising the LEDs brightness.

Regards,
Regnum
 

in the datasheet, there's peak current in continous condition and instan condition (switching), in the continous condition max peak curren are several time more lower then in swtch condirion ( might be 1/5) so increasing amoun of current in switch condition are not damage the seven segmen component

best regards
 

Sorry about that, Regnum!

It was 3 o'clock in the morning when I commented on your post so I was kind of drunk... :wink:

You are absolutely right.

/Rambo
 

Don't worry Rambo, ...no problem really!

Three o'clock in the morning.... I emptied a bottle of whisky, unsheathed my guitar, "growled" some blues and cried a lot for the pets who have gone with my seven ex-wives...

Just kidding :)

Regards,
Regnum
 

    cmos babe

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top