Input Pin Details:
The main input header (located at the left end) includes:
-
VCC: Connect to 5V power supply. Because the display can draw up to 1A at high brightness, it’s best to power it directly from a stable supply rather than the microcontroller’s onboard regulator. Alternatively, keep brightness below 25% (level 3/15) to avoid overheating or overloading USB power.
-
GND: Connect to system ground, which must be common with the microcontroller ground if using an external power source.
-
DIN (Data In), CS (Chip Select / LOAD), CLK (Clock): SPI communication pins that connect to any digital output pins on your microcontroller.
Pin Connection Summary:
Pin |
Connection |
VCC |
5V power supply (preferably direct) |
GND |
System ground (common with MCU) |
DIN |
Digital output pin on MCU |
CS |
Digital output pin on MCU |
CLK |
Digital output pin on MCU |
Arduino Wiring Example for 8x8 MAX7219 Module:
-
Arduino pin 8 → DIN
-
Arduino pin 9 → CS
-
Arduino pin 10 → CLK
-
Arduino 5V → VCC
-
Arduino GND → GND
You can download the LedControl library here to simplify programming.
Sample Arduino Code:
#include "LedControl.h"
int displayCount = 4; // Number of cascaded displays (1-8)
int brightness = 3; // Brightness level (0-15)
LedControl lc = LedControl(8, 10, 9, displayCount); // Pins: DIN=8, CLK=10, CS=9
void setup() {
for (int i = 0; i < displayCount; i++) {
lc.shutdown(i, false); // Wake up display
lc.setIntensity(i, brightness); // Set brightness
lc.clearDisplay(i); // Clear display
}
}
void loop() {
// Light LEDs diagonally from top-left to bottom-right
for (int display = displayCount - 1; display >= 0; display--) {
for (int col = 7; col >= 0; col--) {
for (int row = 0; row <= 7; row++) {
lc.setLed(display, row, col, true);
delay(60);
lc.setLed(display, row, col, false);
}
}
}
// Light entire rows across all displays
for (int row = 0; row <= 7; row++) {
for (int display = 0; display < displayCount; display++) {
lc.setRow(display, row, B11111111);
}
delay(750);
}
// Clear LEDs in reverse order
for (int display = displayCount - 1; display >= 0; display--) {
for (int col = 7; col >= 0; col--) {
for (int row = 0; row <= 7; row++) {
lc.setLed(display, row, col, false);
delay(60);
}
}
}
}
Input Pin Details:
The main input header (located at the left end) includes:
-
VCC: Connect to 5V power supply. Because the display can draw up to 1A at high brightness, it’s best to power it directly from a stable supply rather than the microcontroller’s onboard regulator. Alternatively, keep brightness below 25% (level 3/15) to avoid overheating or overloading USB power.
-
GND: Connect to system ground, which must be common with the microcontroller ground if using an external power source.
-
DIN (Data In), CS (Chip Select / LOAD), CLK (Clock): SPI communication pins that connect to any digital output pins on your microcontroller.
Pin Connection Summary:
Pin |
Connection |
VCC |
5V power supply (preferably direct) |
GND |
System ground (common with MCU) |
DIN |
Digital output pin on MCU |
CS |
Digital output pin on MCU |
CLK |
Digital output pin on MCU |
Arduino Wiring Example for 8x8 MAX7219 Module:
-
Arduino pin 8 → DIN
-
Arduino pin 9 → CS
-
Arduino pin 10 → CLK
-
Arduino 5V → VCC
-
Arduino GND → GND
You can download the LedControl library here to simplify programming.
Sample Arduino Code:
#include "LedControl.h"
int displayCount = 4; // Number of cascaded displays (1-8)
int brightness = 3; // Brightness level (0-15)
LedControl lc = LedControl(8, 10, 9, displayCount); // Pins: DIN=8, CLK=10, CS=9
void setup() {
for (int i = 0; i < displayCount; i++) {
lc.shutdown(i, false); // Wake up display
lc.setIntensity(i, brightness); // Set brightness
lc.clearDisplay(i); // Clear display
}
}
void loop() {
// Light LEDs diagonally from top-left to bottom-right
for (int display = displayCount - 1; display >= 0; display--) {
for (int col = 7; col >= 0; col--) {
for (int row = 0; row <= 7; row++) {
lc.setLed(display, row, col, true);
delay(60);
lc.setLed(display, row, col, false);
}
}
}
// Light entire rows across all displays
for (int row = 0; row <= 7; row++) {
for (int display = 0; display < displayCount; display++) {
lc.setRow(display, row, B11111111);
}
delay(750);
}
// Clear LEDs in reverse order
for (int display = displayCount - 1; display >= 0; display--) {
for (int col = 7; col >= 0; col--) {
for (int row = 0; row <= 7; row++) {
lc.setLed(display, row, col, false);
delay(60);
}
}
}
}