How to reduce pins needed for a display circuit ?

hello guys,
i hope you all having a good day

well what i want to know is this :
is there anyway any method to help reduce the pins needed to run multiple 7-segments and LEDs ?

in my project i have:

  • one 7-segment of 1 digit means 8 pins needed means 1 shift register
  • four 7-segment of 2 digits each and 8 pins needed for each and 2 shift registers for each digit
  • 13 LEDs grouping it by 2 which means 6 + 1 which means 7 pins needed means 1 shift register
  • another 6 leds which means 6 pins and 1 shift register for this

so here we are for this PCB which contains five 7-Segements and 19 LEDs and a pin connector of 53 + 2 for power which will go to the shift registers

so i need a method to reduce the 53 please ?

You could try using LED tube modules, some of which only need I/O 3 pins for 4 digits.

There are a variety available with different chips and number of LEDs.

I have one similar to this one.

And attached JPG for wiring.

FF8QIRLH5TUAPQX.MEDIUM.jpg

lemming:
Tutorial – Arduino and the MAX7219 LED Display Driver IC | tronixstuff.com

And attached JPG

yea i checked this one but unfortunately it won't work because my displays of 2 digits are CA and not CC and it doesn't comes in CC model from the supplier :frowning:

aisc:
You could try using LED tube modules, some of which only need I/O 3 pins for 4 digits.

There are a variety available with different chips and number of LEDs.

I have one similar to this one.

i thought about this one so far i couldn't find the format and dimensions i need :S
i will check today to see the supplier if he has any

thanks :slight_smile:

firashelou:
yea i checked this one but unfortunately it won't work because my displays of 2 digits are CC and not CA and it doesn't comes in CC model from the supplier

Nonsense!

A common but completely incorrect assertion. The MAX7219 works just fine with either common cathode or common anode 7-segment displays.

You do have to write different code for using common anode displays and cannot use the in-built character generator, that is all. And it is not practical to mix the two (except that if you do not want the decimals, one MAX7219 can control 8 digits of one polarity plus one digit of the other!).

aisc:
I have one similar to this one.

The problem with that one is that it uses 74HC595s (probably incorrectly) and you would need to multiplex it in software. The MAX7219 performs all the multiplexing for you.

I have a MAX7219 breakout board that will let you connect up the digits and discretes easily.
As Paul__B says, the common anode stuff will take some additional code.
If you had all of CC or all of CA it would be much easier.
You also just use daisychained shift registers, one per digit plus however many for the discretes, and not do any multiplexing. Keep the data to be displayed in an array, when a segment changes in the array, send all the bytes out again.
Use SPI.transfer, only commits 4 pins: chip select, clock, serial data out, and serial data in (not used with shiftout registers).

digitalWrite (csPin, LOW);
for (byte x = 0; x<8; x=x+1){
SPI.transfer(dataArray[x]);
}
digitalWrite (csPin, HIGH); // outputs update on this rising edge

Paul__B:
Nonsense!

A common but completely incorrect assertion. The MAX7219 works just fine with either common cathode or common anode 7-segment displays.

You do have to write different code for using common anode displays and cannot use the in-built character generator, that is all. And it is not practical to mix the two (except that if you do not want the decimals, one MAX7219 can control 8 digits of one polarity plus one digit of the other!).

i read in a tutorial that's why :o

so it can be done that's great, about mixing the 2 well that's a must because i have normal 3mm LED so those are considered common cathode because all will be connected to GND

Paul__B:
The problem with that one is that it uses 74HC595s (probably incorrectly) and you would need to multiplex it in software. The MAX7219 performs all the multiplexing for you.

ok so working with MAX7219 will make things even easier :smiley: ?

but what about the 1 digit 7 segment that will have different function than the other 4 segments of 2 digits each ! so i need to know if this will mix things up and make it a pain in the a++ to work with it ?
and does it need resistor to be connected to the displays like working with the 595 shift reg ?

  • one 7-segment of 1 digit means 8 pins needed means 1 shift register
  • four 7-segment of 2 digits each and 8 pins needed for each and 2 shift registers for each digit
  • 13 LEDs grouping it by 2 which means 6 + 1 which means 7 pins needed means 1 shift register
  • another 6 leds which means 6 pins and 1 shift register for this

The discrete LEDs, wire them up like they are common cathode displays. 6 or 7 unique anodes, 1 common cathode.
You have a single digit; common anode or common cathode?
You have two dual digits; common anode or common cathode?
I ask because it is not clear to me from the descriptions previously given.

CrossRoads:
The discrete LEDs, wire them up like they are common cathode displays. 6 or 7 unique anodes, 1 common cathode.
You have a single digit; common anode or common cathode?
You have two dual digits; common anode or common cathode?
I ask because it is not clear to me from the descriptions previously given.

the single digit is common cathode
the dual digit common anode

So if I get that right, it is two common anode, 2 digit displays totalling four digits - or is it four dual displays totalling eight digits?

If you had the latter, four dual displays totalling eight digits, you would use one MAX7219 to drive them all and it would be fully occupied, another MAX7219 would control everything else.

If it is only two dual digit displays totalling four digits, then as I say, if you do not need decimals on these, then the single common cathode display can take the place of the decimals (and can use its own decimal) and you have another 28 LED positions to use as well.

Paul__B:
So if I get that right, it is two common anode, 2 digit displays totalling four digits - or is it four dual displays totalling eight digits?

If you had the latter, four dual displays totalling eight digits, you would use one MAX7219 to drive them all and it would be fully occupied, another MAX7219 would control everything else.

If it is only two dual digit displays totalling four digits, then as I say, if you do not need decimals on these, then the single common cathode display can take the place of the decimals (and can use its own decimal) and you have another 28 LED positions to use as well.

hello,
thanks for your info and sorry for my late reply i wasn't home lately
about the displays : i have 8 digits which means 4 dual displays

about the max7219 do i need any resistors connected to the displays because if i don't that would solve a big problem :slight_smile: ?

what do you mean decimals ? you mean the points ? because i don't need any points and how does the display take place of the decimals ?

firashelou:
i have 8 digits which means 4 dual displays

So you dedicate one MAX7219 to those if they are all the same.

firashelou:
about the max7219 do i need any resistors connected to the displays because if i don't that would solve a big problem.

And indeed, the MAX7219 is designed to solve exactly that problem. One resistor sets the current for all digits.

firashelou:
I don't need any points and how does the display take place of the decimals ?

If you do not need the decimals, then the line that would serve eight of them becomes the common for the ninth display - but the opposite form, common anode/ cathode - while the eight digit drive lines (or at least seven of them) become its segments. And the "decimal decimal" point may be an extra for you. :grinning:

Paul__B:
So you dedicate one MAX7219 to those if they are all the same.
And indeed, the MAX7219 is designed to solve exactly that problem. One resistor sets the current for all digits.

If you do not need the decimals, then the line that would serve eight of them becomes the common for the ninth display - but the opposite form, common anode/ cathode - while the eight digit drive lines (or at least seven of them) become its segments. And the "decimal decimal" point may be an extra for you. :grinning:

amazing !! so 1 resistor would do the job that is a relief :smiley:
ok it says a resistor of 9.53K means a 10K would do right ?

so i need 2 chips of the MAX7219 (no trasistors needed, no shift registers needed), 2 resistors of 10K 1 for each chip

by the way what is the difference between the MAX7219 and the MAX7221 ?

hello guys,
i would like to know please if there is any alternatives for these chips : MAX7219 or MAX7221 ?

firashelou:
ok it says a resistor of 9.53K means a 10K would do right?

Absolutely. Or 12k, or 15k, or 18k or ...

firashelou:
By the way what is the difference between the MAX7219 and the MAX7221 ?

Subtle. Described in that datasheet.

Generally, don't worry about it. Mostly interchangeable.

firashelou:
i would like to know please if there is any alternatives for these chips : MAX7219 or MAX7221 ?

Yes, one is the alternative for the other. :grinning: :grinning:


OK, I know the coding difference between the two, but there is one correct way to code it and you will never know the difference.

Paul__B:
Yes, one is the alternative for the other. :grinning: :grinning:


OK, I know the coding difference between the two, but there is one correct way to code it and you will never know the difference.

i mean any alternative chips for these 2 ?

firashelou:
i mean any alternative chips for these 2 ?

I know you meant that but as I have otherwise posted, these are most likely the most readily available, compared to any other.