LED Matrix

Z2M Part: EMA-00004-A

Display patterns on 8x8 LED matrix with MAX7219.

Circuit Diagram
Circuit diagram for LED Matrix
Wire Connections & Pin Configuration

Wire Color Connections:

Yellow/Orange → Pins 10, 11, 12 to MAX7219 CS, CLK, DIN
Red → 5V to MAX7219 VCC
Black → GND to MAX7219 GND

Pin Configuration:

Arduino Digital Pin 10 → MAX7219 CS
Arduino Digital Pin 11 → MAX7219 CLK
Arduino Digital Pin 12 → MAX7219 DIN
Arduino 5V → MAX7219 VCC
Arduino GND → MAX7219 GND
Arduino Code
Edit
#include <LedControl.h>

int DIN = 12;  // Data In pin
int CS = 11;   // Chip Select pin
int CLK = 10;  // Clock pin

// Binary pattern for \"Z\"
byte z[8] = {
  B11111111,
  B11111111,
  B00001110,
  B00011100,
  B00111000,
  B01110000,
  B11111111,
  B11111111
};

// Hex values for \"II\" and \"M\"
byte II[8] = {0x7C, 0x7C, 0x0C, 0x7C, 0x7C, 0x60, 0x7C, 0x7C};
byte m[8] = {0x81, 0xC3, 0xA5, 0x99, 0x81, 0x81, 0x81, 0x81};

// Initialize LED control object: LedControl(dataPin, clockPin, csPin, numDevices)
LedControl lc = LedControl(DIN, CLK, CS, 1);

void setup() {
  // Wake up MAX72XX from power-saving mode
  lc.shutdown(0, false);

  // Set brightness level (0–15)
  lc.setIntensity(0, 8);

  // Clear display at startup
  lc.clearDisplay(0);
}

void loop() {
  printByte(z);
  delay(1000);
  printByte(II);
  delay(1000);
  printByte(m);
  delay(1000);
}

// Function to display an 8x8 pattern
void printByte(byte character[8]) {
  for (int i = 0; i < 8; i++) {
    lc.setRow(0, i, character[i]);
  }
}

Instruction Details

Wiring: Connect MAX7219 DIN to Digital Pin 12, CLK to Pin 11, CS to Pin 10. Connect VCC to 5V and GND to GND.
Library: Sketch → Include Library → Manage Libraries → search "MD_Parola" or "LedControl" → Install.
Upload Code: Tools → Board → Arduino Uno. Tools → Port → select your COM port. Click Upload button.
View Output: Scrolling text or patterns display on LED matrix. Chain multiple modules for larger displays.

How to Use

  1. Connect the required components as per the Pin Configuration above
  2. Open Arduino IDE and create a new sketch
  3. Copy and paste the code above
  4. Select your Arduino board and COM port from Tools menu
  5. Click the Upload button to upload the code to your Arduino
  6. Open Serial Monitor (if applicable) to see the output

Components Required

  • Arduino Uno
  • MAX7219 8×8 LED Matrix Module
  • Breadboard
  • Jumper Wires

Category: LEDs & Display