# Getting 12 x MAX7219 modules running

**URL:** <https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627>\
**Category:** LEDs and Multiplexing\
**Created:** [May 28, 2020, 8:38pm UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627 "2020-05-28T20:38:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 28, 2020, 8:38pm UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/1 "2020-05-28T20:38:31Z")

</div>

I thought I would share this with you all, it may help someone.

I’ve been trying to get 12 MAX7219 modules running concurrently for quite a while before I design a PCB to use 0.56” 8 digit 7-segment displays. I’m using the HCMAX7219 library, and despite the Hobby Components web page on the HCMAX7219 library claiming that you can daisy chain 12+ modules, I have found through trial and error that I can only successfully get up to 8 modules running from the same instance.

In hardware I daisy chained 6 modules with the DIN, CS, and CLK pins, and connected the VCC and GND pins directly from the power supply, which is also powering the Arduino via the 5V & GND pins. The power supply is a bench power supply supplying 5V and up to 2Amps.

Software is using the HCMAX7219 library, two instances each controlling 6 MAX7219 modules via separate CS pins and shared DIN and CLK pins.

Hope this assists a few people.

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [May 28, 2020, 10:49pm UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/2 "2020-05-28T22:49:41Z")

</div>

Hmmm. I have no idea from where the "HCMAX7219" library comes, so cannot help much. Since it starts with "HC", I must assume it is something unique to Hobby Components and I would have to find them if I wanted to figure it out. Maybe not just now! 🙄

It would be useful to know what sort of "Arduino" it is. If it was an ESP8266 or some other 3.3 V system you would be

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 29, 2020, 5:55am UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/3 "2020-05-29T05:55:54Z")

</div>

HCMAX7219 library is from Hobby Components, as I pointed out.

Arduino is a Uno.

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [May 29, 2020, 11:28am UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/4 "2020-05-29T11:28:01Z")

</div>

OK, well, let's [see the offending code](https://www.youtube.com/watch?v=tdQL_7osGzc). 😀 Refer to the [posting instructions](http://arduino.cc/forum/index.php/topic,148850.0.html), point 7.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 29, 2020, 12:07pm UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/5 "2020-05-29T12:07:20Z")

</div>

I don't have a problem, I was just posting the msg in case others were having problems.

---

<div class="post-metadata">

**Author:** ![marco\_c](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@marco\_c](https://forum.arduino.cc/u/marco_c)\
**Post date:** [May 29, 2020, 6:26pm UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/6 "2020-05-29T18:26:51Z")

</div>

Looks like that library has a setting in the header file that needs to be changed for the number of MAX7219 ICs in the chain.

```cpp
/ *****************************USER CONFIGURATION**************************** /
/* CHANGE THIS VALUE IF YOU ARE DASY CHAINING MORE THAN ONE DRIVER */
#define NUMBEROFDRIVERS 1

```

Did you change this to 12?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 30, 2020, 12:18pm UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/7 "2020-05-30T12:18:19Z")

</div>

> marco\_c:  
> Looks like that library has a setting in the header file that needs to be changed for the number of MAX7219 ICs in the chain.
> 
> ```arduino
> / *****************************USER CONFIGURATION**************************** /
> 
> ```

/\* CHANGE THIS VALUE IF YOU ARE DASY CHAINING MORE THAN ONE DRIVER \*/  
#define NUMBEROFDRIVERS 1

> ```arduino
> 
> Did you change this to 12?
> 
> ```

No, changed it to 6. I couldn’t get a single instance of the HCMAX7219 to control more than 8 MAX7219 modules, so I created two separate instances; one using CS pin connected to D9 and the other CS using D10, both controlling 6 modules.

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [May 30, 2020, 12:26pm UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/8 "2020-05-30T12:26:46Z")

</div>

> andyh-1963:  
> No, changed it to 6. I couldn’t get a single instance of the HCMAX7219 to control more than 8 MAX7219 modules,

So the actual question was, **when** you were attempting to to "get 12 MAX7219 modules running concurrently", **did you** in fact set NUMBEROFDRIVERS to **12**?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 30, 2020, 4:38pm UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/9 "2020-05-30T16:38:23Z")

</div>

> Paul\_\_B:  
> So the actual question was, **when** you were attempting to to "get 12 MAX7219 modules running concurrently", **did you** in fact set NUMBEROFDRIVERS to **12**?

Yes, but I found that I could only control up to a maximum of 8 modules from a single instance. I progressively added 1 module at a time incrementing the NUMBEROFDRIVERS in the class header by 1 to match the number of modules connected.

---

<div class="post-metadata">

**Author:** ![6v6gt](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/6v6gt/32/225488_2.png) [@6v6gt](https://forum.arduino.cc/u/6v6gt)\
**Post date:** [June 3, 2020, 6:30am UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/10 "2020-06-03T06:30:45Z")

</div>

Interesting topic. What, incidentally, is the limiting factor for the maximum number of MAX7219/21 chips that can be daisychained together in a single chain, assuming your code/library supports it ?

Is it clear from the datasheet ?  
Datasheet: [https://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf](https://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf)

With most shift register type designs, there is no limit specified, but some signal buffering may be required.  
I have seen retailers of some modules which use these chips advising against chaining too many together.  
It could also be that some MAX clones do not perform identically to the real thing.

---

<div class="post-metadata">

**Author:** ![marco\_c](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@marco\_c](https://forum.arduino.cc/u/marco_c)\
**Post date:** [June 3, 2020, 10:59am UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/11 "2020-06-03T10:59:39Z")

</div>

No set limit. With my library users have had 40+ modules all working fine with appropriate buffering and power supply.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 3:15am UTC](https://forum.arduino.cc/t/getting-12-x-max7219-modules-running/657627/12 "2021-05-06T03:15:47Z")

</div>

Closed on May 6, 2021, 3:15am UTC


