MAX7219 and displays with LedControl

I have daisychained 10 max7219 with 8 digit displays. Everything works well on the first 8 chips, but I can't get the last 2 chips to work. Is there a way to change ledcontrol to use more chips? I have tried adjusting the max chips to 10, but that is not working. Is there a max of the 7219 daisychain?

Do you mean you have 10 MAX7219 trying to control 10 8x8 LED displays?

Describe what is not working.

What about controlling 60 LEDs individually? What board can do that best?

TimotheusCaligulus:
What about controlling 60 LEDs individually? What board can do that best?

Please don’t hijack someone else’s post.

Create one of your own.

klarson18: yes. There are 10 8x8 displays. I am able to get only 8 working.

And what is not working? ? ?

Is your code written for 10 displays? Other than changing the max chips.

Are you sure that your displays work? Switch #1 with #9 and #2 with #10.

This problem is not infrequently reported.

It is likely due to capacitance and inductance in the wiring and the speed of the SPI transfer.

The simplest approach will probably be to use a library which uses "bit-banging" instead of the fast SPI interface.

I haven't used LedControl (because so far, I do my own bit-banging) but surely you do not need to alter the library files to specify the number of MAX devices in the chain - that does not sound right at all.

"Bit-banging" refers to writing code to send out the bits and generate clock pulses, rather than using the SPI hardware to do this. That should slow down things sufficiently to allow for propagation times and set-up delays in the registers.

I cannot give references, but it certainly has been mentioned in the past that people have problems chaining more than 8 or 10 MAX devices. Since they are CMOS, connecting more in parallel simply slows down the transitions due to the extra capacitance but the eventual output level is not restricted, so performing the operations more slowly should overcome such problems. The same thing necessarily applies to using longer cables between modules.

Paul__B: I haven't used LedControl (because so far, I do my own bit-banging) but surely you do not need to alter the library files to specify the number of MAX devices in the chain - that does not sound right at all.

He's not changing library files.

He is changing a value of a variable in an example sketch. At least, that is what I hope he is doing.

By the way, I have ten of the 8x8 LED matrices chained together, and it works. I must have gotten lucky.

I bought ten of the LED matrix with MAX7219 pcb "kits" on eBay and soldered them directly to PCB. They are running off the Arduino.

I wrote a scrolling message sketch with 25 characters using the LedControl library.

klarson18: ieee, did you have to change the variable to 10 in the .cpp file?

No.

I used the example programs to check out my displays and changed the number of displays I was using in those sketches.

ieee488: He's not changing library files.

Funny. I read:

klarson18: I am also using ledcontrol.h and adjusted the ledcontrol.cpp file to show 10 chips instead of 8 (line 50 and 51)

Paul__B: Funny. I read:

Goes to show I was skimming.

Paul__B:
This problem is not infrequently reported.

It is likely due to capacitance and inductance in the wiring and the speed of the SPI transfer.

The simplest approach will probably be to use a library which uses “bit-banging” instead of the fast SPI interface.

I’m using the same LED control library. The docs say it is limited to 8 displays. I scanned through the code and didn’t see an easy way to increase the limit.

I’m using it with 10 MAX7219 modules by creating 2 LedControl objects each with it’s own 3 hardware pins. The code is a bit inelegant where write my data to the displays but it works.

Oracle: I'm using the same LED control library. The docs say it is limited to 8 displays. I scanned through the code and didn't see an easy way to increase the limit.

I'm using it with 10 MAX7219 modules by creating 2 LedControl objects each with it's own 3 hardware pins. The code is a bit inelegant where write my data to the displays but it works.

The comments in LCDemoCascadedDevice says

***** Please set the number of devices you have *****
 But the maximum default of 8 MAX72XX wil also work.

What I did was change LedControl lc=LedControl(12,11,10,8); to LedControl lc=LedControl(12,11,10, 10);

I have 10 of the 8x8 displays on printed circuit boards with the SMT MAX7219.

It works for me.

ieee488: The comments in LCDemoCascadedDevice says

***** Please set the number of devices you have *****
 But the maximum default of 8 MAX72XX wil also work.

What I did was change LedControl lc=LedControl(12,11,10,8); to LedControl lc=LedControl(12,11,10, 10);

I have 10 of the 8x8 displays on printed circuit boards with the SMT MAX7219.

It works for me.

I also have the 8x8 displays each on their own PCB with SMT chips. It's my own PCB design using 60mm matrices. It's actually in pieces on my workbench right now since it's still a work in progress, if I get a chance I'll try to put all 10 on the same chain again.

I bought the PCBs on eBay unassembled except for the surface mount devices. I soldered in the headers. The PCBS also came with female-female jumper cables which is what I used to connect them all together.

ieee488: I bought the PCBs on eBay unassembled except for the surface mount devices.

So that was the good stackable module? |500x500 It uses shorting jumpers to connect adjacent modules. Of course, you need the straight pin headers to do that, not the ones shown there. And they do not include the 10 µF capacitors.

ieee488: The PCBs also came with female-female jumper cables which is what I used to connect them all together.

That's curious! The leads (needs five) are usually supplied with the old, crummy non-stackable module. |500x500 But it has no SMD parts.

If you do assemble them, it is better to mount the 90° header for the output side on the back of the board, pointing down. Come to think of it, it may be best if you are using jumpers rather than a breadboard, to mount the input header similarly.

If chaining more than about four, you should "bus" the 5 V and ground to each, rather than chaining. That may even resolve some problems here.

Paul__B: So that was the good stackable module?

They are the 10 that I am able to chain together even though the MAX7219 connections are wrong and I had to insert the matrices upside down.

Yes. They are the "good" modules in that [u]they work for me[/u].

FC-16 is on the PCBs that I have.

Paul__B: |500x500 It uses shorting jumpers to connect adjacent modules. Of course, you need the straight pin headers to do that, not the ones shown there. And they do not include the 10 µF capacitors.

Mine came with the jumpers. You should shop eBay more often. My seller included them. They're a bonus. If you want them with jumpers try eBay seller survy2014. No guarantee since the jumpers were not pictured for the ones I bought.

I used them for chaining the 10 together initially without the 10 uF capacitors.

Now that the matrices are soldered on a PCB, there are 10 uF capacitors.

I didn't use the right-angle connectors. I had my own straight headers.

Paul__B: That's curious! The leads (needs five) are usually supplied with the old, crummy non-stackable module. |500x500 But it has no SMD parts.

If you do assemble them, it is better to mount the 90° header for the output side on the back of the board, pointing down. Come to think of it, it may be best if you are using jumpers rather than a breadboard, to mount the input header similarly.

If chaining more than about four, you should "bus" the 5 V and ground to each, rather than chaining. That may even resolve some problems here.

Thanks. But as I wrote before. My apparatus is working just fine.

I don't appreciate your tone implying that I am lying about these parts and what came with my eBay purchase.

klarson18:
You must be good ieee488. the most that can be done is 8. I would like to know your secret. “The packet size for the chip is 16 bytes, which has 8 bytes of data. That means a maximum of 7 no-op bytes and as such it is limited to a maximum of 8 chips”

If you must know, I don’t read that stuff, and I didn’t read it.

Ignorance is bliss I guess. :slight_smile:

I bought 10. I hooked up 10.