Handson Technology MAX7218 User Manual Download Page 3

www.handsontec.com 

 

Connecting Table: 

Arduino 

MAX7219 Module 

5V 

VCC 

GND 

GND 

D7 

DIN 

D5 

CS 

D6 

CLK 

 

Once we wire up the modules we are ready to take a look at the Arduino code of the first example. We will use the 
MaxMatrix library which can be downloaded from 

GitHub

Copy and paste the below sketch to Arduino IDE and upload to Arduino Uno board: 

/* 
  8x8 LED Matrix MAX7219 Example 01 
  Based on the following library: 
  GitHub | riyas-org/max7219  

https://github.com/riyas-org/max7219

 

*/ 
 

#include <MaxMatrix.h> 

 

int

 DIN 

=

 

7

;

   

// DIN pin of MAX7219 module 

int

 CLK 

=

 

6

;

   

// CLK pin of MAX7219 module 

int

 CS 

=

 

5

;

    

// CS pin of MAX7219 module 

int

 maxInUse 

=

 

1

;

 

 
 
MaxMatrix m

(

DIN

,

 CS

,

 CLK

,

 maxInUse

);

  

 

char

 A

[]

 

=

 

{

4

,

 

8

,

 

            B01111110

,

 

            B00010001

,

 

            B00010001

,

 

            B01111110

,

 

           

};

 

 

char

 B

[]

 

=

 

{

4

,

 

8

,

 

            B01111111

,

 

            B01001001

,

 

            B01001001

,

 

            B00110110

,

 

           

};

 

 

char

 smile01

[]

 

=

 

{

8

,

 

8

,

 

                  B00111100

,

 

                  B01000010

,

 

                  B10010101

,

 

                  B10100001

,

 

                  B10100001

,

 

                  B10010101

,

 

                  B01000010

,

 

                  B00111100 
                 

};

 

char

 smile02

[]

 

=

 

{

8

,

 

8

,

 

                  B00111100

,

 

                  B01000010

,

 

                  B10010101

,

 

                  B10010001

,

 

                  B10010001

,

 

                  B10010101

,

 

                  B01000010

,

 

Summary of Contents for MAX7218

Page 1: ...ays panel to be built A convenient 3 wire serial interface connects to all common controller board like Arduino or Raspberry Individual dot may be addressed and updated without rewriting the entire di...

Page 2: ...2 www handsontec com MAX7291 Module Matrix Connection Arduino Connection Examples Now let s connect the 8 8 LED Matrix module to the Arduino Board Here s the circuit schematic...

Page 3: ...9 Example 01 Based on the following library GitHub riyas org max7219 https github com riyas org max7219 include MaxMatrix h int DIN 7 DIN pin of MAX7219 module int CLK 6 CLK pin of MAX7219 module int...

Page 4: ...6 2 true delay 1000 m setDot 6 3 true delay 1000 m clear Clears the display for int i 0 i 8 i m setDot i i true delay 300 m clear Displaying the character at x y upper left corner of the character m w...

Page 5: ...0100 B00010010 B01111111 B00000000 4 4 8 B00100111 B01000101 B01000101 B00111001 B00000000 5 4 8 B00111110 B01001001 B01001001 B00110000 B00000000 6 4 8 B01100001 B00010001 B00001001 B00000111 B000000...

Page 6: ...B01000000 B10000000 B10000100 B01111101 B00000000 j 4 8 B01111111 B00010000 B00101000 B01000100 B00000000 k 3 8 B01000001 B01111111 B01000000 B00000000 B00000000 l 5 8 B01111100 B00000100 B01111100 B...

Page 7: ...buffer CH 7 c 7 m writeSprite 32 0 buffer m setColumn 32 buffer 0 0 for int i 0 i buffer 0 1 i delay shift_speed m shiftLeft false false Extract the characters from the text string void printStringWit...

Reviews: