Max7219 led display multiple

Hello, i found out to use more than 1 7-segment 8 digit display, it' s simple but i could not find this on the internet, so i like to share this, i hope i help a lot of poeple !

#include "DigitLedDisplay.h"

DigitLedDisplay ld = DigitLedDisplay(2, 3, 4);
DigitLedDisplay ld1 = DigitLedDisplay(5, 6, 7);

void setup()
{ 
    ld.setBright(7);
    ld1.setBright(7);
    ld.setDigitLimit(8);
    ld1.setDigitLimit(8);
}
void loop()
{ 
   ld.clear();
   ld1.clear();
   ld.printDigit(1, 0);
   ld.printDigit(2, 5);
   ld1.printDigit(3, 5);
   ld1.printDigit(4, 0);
 }
1 Like

Very nice

Using one Arduino pin for data of one MAX7219 and clock of another MAX7219 causes problems.

Yes that is why you use 3 pins for each max7219, you have 12 digital pins so you can control 4 displays. i have tested it and works fine.

Hello, you are right, sorry about that, you need to use different pins.

1 Like

Yes. Sometimes those little things are hard to see. Keep having fun!

when you invest further that topic you will recognize that the MAX7219 can be daisy chained. This means you can connect several MAX7219 on the same lines. Condition is the library supports that.

The library "LedControl" from Eberhart Fahle can control 8 MAX7219 daisy chained.

My library "NoiascaLedControl" also controls up to 8 daisy chained MAX7219 and can use the Hardware SPI.
https://werner.rothschopf.net/201904_arduino_ledcontrol_max7219.htm

2 posts were split to a new topic: Daisy Chain Two MAX7219 Devices?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.