Instructables
loading
loading
Picture of 16x8 LED dot matrix with MAX7219 module
BL-M12A881 diagram.png
MAX7219 pinout.png
BL-M12A881 pinout.png
BL-M12A881.jpg
MAX7219_8x8_red_dot_led_matrix_1.jpg
MAX7219_8x8_red_dot_led_matrix_2.jpg
MAX7219_8x8_red_dot_led_matrix_3.jpg
MAX7219_8x8_red_dot_led_matrix_4.jpg
MAX7219 Matrix connections.gif
MAX7219_KeyBoard.png
16x8 LED dot matrix with MAX7219 module


The objective of this project is: to show off the use of the module "MAX7219 dot matrix display module MCU control DIY"
In order to using it you will need the module that can be purchased on ebay:

http://www.ebay.com/itm/171048735052?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

And you will need the MaxMatrix libraries files (which are 3):

https://docs.google.com/file/d/0B_YlEklLDDS7MDhRdWJKdmZQTnc/edit?usp=sharing

https://docs.google.com/file/d/0B_YlEklLDDS7WE9lQ1F1aFhnYlE/edit?usp=sharing

https://docs.google.com/file/d/0B_YlEklLDDS7djd5T2JDeFVsaVE/edit?usp=sharing



The sketch with the code can be found on the link below:

https://docs.google.com/file/d/0B_YlEklLDDS7WTF0c2hlVzFCZWc/edit?usp=sharing


Or get all files at GitHub:
https://github.com/Arduinobymyself/Matrix16x8.git


See in the attached picture the interconnection diagram between Arduino module and MAX7219 module (it was used only 2 MAX7219 modules in this case):


Arduino pin 13 (alternative: pin 10) connected to the CLK pin of the module MAX7219
Arduino pin 11 (alternative: pin 8) connected to pin DIN module MAX7219
Arduino pin 10 (alternative: 9 pin) connected to pin CS module MAX7219
GND and VCC (+5V)

To expand the number of modules, you should just connect Dout pin of one MAX7219 module  with the Din pin of the another MAX7219 module... and so on.

The MAX7219 Dout pin is at the top of the module while Din pin is at the botton of the module.


Remembering that you can connect modules as you want, just connecting  the output of one module with the input of the other and leaving the other signals in parallel.
In the sketch, you should to modify the parameter "maxInUse" for the amount of modules that  you will use.





The video is just demo.
Remember that you can modify the messages in the code itself, or use the serial console to enter the message.

http://youtu.be/uG88Tt6Apoo




A second video using four MAX7219 modules.

http://youtu.be/yFx4r-WUp5g



New features were added to this project (on November 1st, 2014):

1 - 40x8 LED dot matrix;
2 - Start scrolling button;
3 - Speed control potentiometer;
4 - Intensity control

Some buttons were added as shown in schem above.

Here it is the new video showing these new features.
http://youtu.be/beo7N1SeYoE?list=UUgx66KiICvaM682IP4u7nng




Feel free to send me comments/questions/problems.




Best Regards


Marcelo Moraes
arduinobymyself.blogspot.com.br
arduinobymyself@gmail.com
Skype: marcelo.moraes

The Company

ArduinoByMyself is a non profitable entity. Our goal is to share knowledge and provide SW and HW free for everyone. We seek a better society and therefore we do not sell products but we give all the support for  everyone that want build their own project and we also give support for questions and problems as they needed.
We do not make projects by ordering  but every idea is valid and saved for future use  if interesting (technically and didactically speaking).
There are no copyrights in our projects, you can modify and use the code and description of how to do without legal implications (we only ask you to disclose "ArduinoByMyself" blog in order that other people also have access to the information contained in it).
1-40 of 84Next »
ssalunke19 hours ago
Dear,
Congro!! for project
Can I use 7219 for 24x6 matrix??
My mail ID is salunkesantosh97@gmail.com
So tell me... how i can do??
Thanks for time!!!
GerardoM13 months ago

Hello,

congratulations for the project !!!

I'd like to get help to realize this project using two MAX7219.

http://scuola.arduino.cc/lesson/l81bRbQ/Tabellone_Segnapunti.

I have some problem with the code is very urgent ...

GerardoM13 months ago

Ciao,

complimenti per il Progetto !!!

Mi piacerebbe Ricevere Aiuto per Realizzare this Progetto utilizzando 2 MAX7219.

http://scuola.arduino.cc/lesson/l81bRbQ/Tabellone_Segnapunti.

Ho Qualche Problema con il codice ... è Molto urgente

WernerM14 months ago

I am really struggling with this. All my chars are appearing rotated 90 degrees counterclockwise, and shifting downwards instead of from right to left. Then when the character disappears from one LED block (I am using 7219's bought in a strip of four, all cascaded via jumpers, checked the in > out, everything is OK) it starts reappearing on the block to the right, and so on.

I was trying to understand how the MaxMatrix.cpp works, playing with the writeDot function, but I can't figure out how to shift the bits the correct way in order to fix this issue.

Too frustrated right now. Anyone who has a clue is welcome to jump in.

dirkd2 WernerM14 months ago

Hi Werner,

I am also struggling with this.

I am hoping somebody can help

WernerM1 dirkd24 months ago

Hi Dirk

Marcelo was kind enough, to direct me to another library that is much more complete and configurable to many different matrices. It's called Parola and you can download it from this URL:

https://parola.codeplex.com/releases

This one works, but it requires you to configure some defines in its header file. Once you have downloaded and installed this library, go to the examples folder and there you will find a sketch to help you find the correct parameters for your display. Then open the header file and find the define that has these parameters and enable it.

It works a treat!

dirkd2 WernerM14 months ago

Hi Werner,

What did you change in your file?

Im trying to find the parameters but no result

WernerM1 dirkd24 months ago

The parameters to change depend on your type of hardware.

First, you need to have installed the MD_MAX72XX library (which is a dependancy to make Parola library work - as stated in Parola's main webpage: https://parola.codeplex.com/)

Then, within the MD_MAX72XX library's example sketches, find the one named MD_MAX72XX_HW_Mapper and load it with the Serial Monitor window open. Follow the instructions.

After finding out the 3 settings given out by the hw mapper sketch, edit the MD_MAX72xx_lib.h and find the define statement that has the same settings as the hw mapper told you. Note its name (e.g., "#if USE_FC16_HW")

Now, edit the MD_MAX72xx.h file and find the define that has the same as noted above, and change its value to 1. Whatever else has a setting of 1 already, change it to 0.

perryscope1 year ago

I am having problems using any more that 4 modules?

Up to 4 and its working great!

If I add a fifth module then i get corrupted columns on the first module, iF i add a sixth I get more corrupted columns on the second display as well as corruption on all of the first?

I tried the change to the printCharWithShift Function as sugested to..

void printCharWithShift(char c, int shift_speed){
if (c < 64) return;
c -= 64;
memcpy_P(buffer, CH + 7*c, 7);
m.writeSprite(64, 0, buffer);
m.setColumn(64 + buffer[0], 0);

for (int i=0; i<buffer[0]+1; i++)

delay(shift_speed);
m.shiftLeft(false, false);
}
}

...and this then used all six modules correctly but everything was in upper case and no spaces were shown?

Can anyone share some there code thats working for more than 4 modules?

Cheers

The constant value (let's call it 'xx') that's being left in the code will only allow for 'xx' / 8. So in order for the code to see as many display modules as desired, you need to replace the constant by

(maxInUse * 8)

davebodnar1 year ago

Marcelo - First I would like to thank you for an excellent project! I have a number of units working well and find them fascinating!

Unfortunately I have the same problem as "perryscope" when I get above 5 modules. Even after editing the code (changing 32 to 64, etc) the display shows only upper case and some characters are not represented accurately at all.

Can you help with code that works reliably with six or more modules? I have materials to go to 10 modules and hope to get it working soon.

I apprecaite your help!

dave

The constant value (let's call it 'xx') that's being left in the code will only allow for 'xx' / 8. So in order for the code to see as many display modules as desired, you need to replace the constant by

(maxInUse * 8)

davebodnar made it!1 year ago

Good news! I spent some time experimenting today and have the software working well with up to 9 modules. Details of how this can be done are on my web page here:

http://www.trainelectronics.com/Arduino/LED_Matrix...

I was unable to get more than 9 working but hope that I or someone else will figure it out!

Again, Marcelo, thanks for your project!

dave

index.2.jpgindex.4.jpg

The constant value (let's call it 'xx') that's being left in the code will only allow for 'xx' / 8. So in order for the code to see as many display modules as desired, you need to replace the constant by

(maxInUse * 8)

davebodnar1 year ago

Good news! I spent some time experimenting today and have the software working well with up to 9 modules. Details of how this can be done are on my web page here:

http://www.trainelectronics.com/Arduino/LED_Matrix...

I was unable to get more than 9 working but hope that I or someone else will figure it out!

Again, Marcelo, thanks for your project!

dave

index.2.jpgindex.4.jpg

The constant value (let's call it 'xx') that's being left in the code will only allow for 'xx' / 8. So in order for the code to see as many display modules as desired, you need to replace the constant by

(maxInUse * 8)

parsing davebodnar10 months ago

Thank you davebodnar!!!!!! Grazie alle tue fotografie sono riuscito a collegare tutto in modo funzionante!!!!!!!!!!!!!!!!!!! You are great!!!!!!

IainM110 months ago

Hi Marcelo, or anyone who has made this project.

My problem is that with using any more than one matrix (2 or 3) then the text and scrolling effects are just duplicated on the 2nd and 3rd matrix ???? Basically as if they are working independently. Data in is serial connection and clock and cs are parallel. I have used other similar libraries and the same result. Begining to think the HW may be faulty. Any Ideas anyone?

BIGDOG1971 (author)  IainM19 months ago
You must use the code as shown below (up to 8 modules are allowed).

#include
#include

PROGMEM prog_uchar CH[] = {
3, 8, B00000000, B00000000, B00000000, B00000000, B00000000, // space
1, 8, B01011111, B00000000, B00000000, B00000000, B00000000, // !
3, 8, B00000011, B00000000, B00000011, B00000000, B00000000, // "
5, 8, B00010100, B00111110, B00010100, B00111110, B00010100, // #
4, 8, B00100100, B01101010, B00101011, B00010010, B00000000, // $
5, 8, B01100011, B00010011, B00001000, B01100100, B01100011, // %
5, 8, B00110110, B01001001, B01010110, B00100000, B01010000, // &
1, 8, B00000011, B00000000, B00000000, B00000000, B00000000, // '
3, 8, B00011100, B00100010, B01000001, B00000000, B00000000, // (
3, 8, B01000001, B00100010, B00011100, B00000000, B00000000, // )
5, 8, B00101000, B00011000, B00001110, B00011000, B00101000, // *
5, 8, B00001000, B00001000, B00111110, B00001000, B00001000, // +
2, 8, B10110000, B01110000, B00000000, B00000000, B00000000, // ,
4, 8, B00001000, B00001000, B00001000, B00001000, B00000000, // -
2, 8, B01100000, B01100000, B00000000, B00000000, B00000000, // .
4, 8, B01100000, B00011000, B00000110, B00000001, B00000000, // /
4, 8, B00111110, B01000001, B01000001, B00111110, B00000000, // 0
3, 8, B01000010, B01111111, B01000000, B00000000, B00000000, // 1
4, 8, B01100010, B01010001, B01001001, B01000110, B00000000, // 2
4, 8, B00100010, B01000001, B01001001, B00110110, B00000000, // 3
4, 8, B00011000, B00010100, 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, B00000000, // 7
4, 8, B00110110, B01001001, B01001001, B00110110, B00000000, // 8
4, 8, B00000110, B01001001, B01001001, B00111110, B00000000, // 9
2, 8, B01010000, B00000000, B00000000, B00000000, B00000000, // :
2, 8, B10000000, B01010000, B00000000, B00000000, B00000000, // ;
3, 8, B00010000, B00101000, B01000100, B00000000, B00000000, // <
3, 8, B00010100, B00010100, B00010100, B00000000, B00000000, // =
3, 8, B01000100, B00101000, B00010000, B00000000, B00000000, // >
4, 8, B00000010, B01011001, B00001001, B00000110, B00000000, // ?
5, 8, B00111110, B01001001, B01010101, B01011101, B00001110, // @
4, 8, B01111110, B00010001, B00010001, B01111110, B00000000, // A
4, 8, B01111111, B01001001, B01001001, B00110110, B00000000, // B
4, 8, B00111110, B01000001, B01000001, B00100010, B00000000, // C
4, 8, B01111111, B01000001, B01000001, B00111110, B00000000, // D
4, 8, B01111111, B01001001, B01001001, B01000001, B00000000, // E
4, 8, B01111111, B00001001, B00001001, B00000001, B00000000, // F
4, 8, B00111110, B01000001, B01001001, B01111010, B00000000, // G
4, 8, B01111111, B00001000, B00001000, B01111111, B00000000, // H
3, 8, B01000001, B01111111, B01000001, B00000000, B00000000, // I
4, 8, B00110000, B01000000, B01000001, B00111111, B00000000, // J
4, 8, B01111111, B00001000, B00010100, B01100011, B00000000, // K
4, 8, B01111111, B01000000, B01000000, B01000000, B00000000, // L
5, 8, B01111111, B00000010, B00001100, B00000010, B01111111, // M
5, 8, B01111111, B00000100, B00001000, B00010000, B01111111, // N
4, 8, B00111110, B01000001, B01000001, B00111110, B00000000, // O
4, 8, B01111111, B00001001, B00001001, B00000110, B00000000, // P
4, 8, B00111110, B01000001, B01000001, B10111110, B00000000, // Q
4, 8, B01111111, B00001001, B00001001, B01110110, B00000000, // R
4, 8, B01000110, B01001001, B01001001, B00110010, B00000000, // S
5, 8, B00000001, B00000001, B01111111, B00000001, B00000001, // T
4, 8, B00111111, B01000000, B01000000, B00111111, B00000000, // U
5, 8, B00001111, B00110000, B01000000, B00110000, B00001111, // V
5, 8, B00111111, B01000000, B00111000, B01000000, B00111111, // W
5, 8, B01100011, B00010100, B00001000, B00010100, B01100011, // X
5, 8, B00000111, B00001000, B01110000, B00001000, B00000111, // Y
4, 8, B01100001, B01010001, B01001001, B01000111, B00000000, // Z
2, 8, B01111111, B01000001, B00000000, B00000000, B00000000, // [
4, 8, B00000001, B00000110, B00011000, B01100000, B00000000, // \ backslash
2, 8, B01000001, B01111111, B00000000, B00000000, B00000000, // ]
3, 8, B00000010, B00000001, B00000010, B00000000, B00000000, // hat
4, 8, B01000000, B01000000, B01000000, B01000000, B00000000, // _
2, 8, B00000001, B00000010, B00000000, B00000000, B00000000, // `
4, 8, B00100000, B01010100, B01010100, B01111000, B00000000, // a
4, 8, B01111111, B01000100, B01000100, B00111000, B00000000, // b
4, 8, B00111000, B01000100, B01000100, B00101000, B00000000, // c
4, 8, B00111000, B01000100, B01000100, B01111111, B00000000, // d
4, 8, B00111000, B01010100, B01010100, B00011000, B00000000, // e
3, 8, B00000100, B01111110, B00000101, B00000000, B00000000, // f
4, 8, B10011000, B10100100, B10100100, B01111000, B00000000, // g
4, 8, B01111111, B00000100, B00000100, B01111000, B00000000, // h
3, 8, B01000100, B01111101, B01000000, B00000000, B00000000, // i
4, 8, 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, B00000100, B01111000, // m
4, 8, B01111100, B00000100, B00000100, B01111000, B00000000, // n
4, 8, B00111000, B01000100, B01000100, B00111000, B00000000, // o
4, 8, B11111100, B00100100, B00100100, B00011000, B00000000, // p
4, 8, B00011000, B00100100, B00100100, B11111100, B00000000, // q
4, 8, B01111100, B00001000, B00000100, B00000100, B00000000, // r
4, 8, B01001000, B01010100, B01010100, B00100100, B00000000, // s
3, 8, B00000100, B00111111, B01000100, B00000000, B00000000, // t
4, 8, B00111100, B01000000, B01000000, B01111100, B00000000, // u
5, 8, B00011100, B00100000, B01000000, B00100000, B00011100, // v
5, 8, B00111100, B01000000, B00111100, B01000000, B00111100, // w
5, 8, B01000100, B00101000, B00010000, B00101000, B01000100, // x
4, 8, B10011100, B10100000, B10100000, B01111100, B00000000, // y
3, 8, B01100100, B01010100, B01001100, B00000000, B00000000, // z
3, 8, B00001000, B00110110, B01000001, B00000000, B00000000, // {
1, 8, B01111111, B00000000, B00000000, B00000000, B00000000, // |
3, 8, B01000001, B00110110, B00001000, B00000000, B00000000, // }
4, 8, B00001000, B00000100, B00001000, B00000100, B00000000, // ~
};

int data = 8; // DIN pin of MAX7219 module
int load = 9; // CS pin of MAX7219 module
int clock = 10; // CLK pin of MAX7219 module

int maxInUse = 4; //change this variable to set how many MAX7219's you'll use

MaxMatrix m(data, load, clock, maxInUse); // define module

byte buffer[100];

// active sentenses
char string1[] = " Hello, my name is ... ";
char string2[] = " I am glad to show you my Arduino scrolling dot Matrix ";
char string3[] = " using MAX7219 IC ";
char string4[] = " up to 8 modules ";
char string5[] = " There you will find a lot of projects with Arduino. ";
char string6[] = " =) ";

// just for tests
char string7[] = " A B C D E F G H I J K L M N O P Q R S T U V X W Y Z ";
char string8[] = " a b c d e f g h i j k l m n o p q r s t u v x w y z ";
char string9[] = " 1 2 3 4 5 6 7 8 9 0 - = ";
char string10[] = " ! @ # $ % ¨ & * ( ) _ + ";
char string11[] = " ' , . ; ~ ] ´ [ | < > : ^ } ` { / ? ";

void setup(){
m.init(); // module initialize
m.setIntensity(5); // dot matix intensity 0-15
Serial.begin(9600); // serial communication initialize
}

void loop(){

// this is the code if you want to entering a message via serial console
while (Serial.available() > 0){
byte c = Serial.read();
Serial.println(c, DEC);
printCharWithShift(c, 100);
}
delay(100);
m.shiftLeft(false, true);

/*
// print the active sentences
printStringWithShift(string1, 100);
printStringWithShift(string2, 100);
printStringWithShift(string3, 100);
printStringWithShift(string4, 100);
printStringWithShift(string5, 100);
printStringWithShift(string6, 100);
*/


}

void printCharWithShift(char c, int shift_speed){
if (c < 64) return;
c -= 64;
memcpy_P(buffer, CH + 7*c, 7);
m.writeSprite(64, 0, buffer);
m.setColumn(64 + buffer[0], 0);

for (int i=0; i {
delay(shift_speed);
m.shiftLeft(false, false);
}
}

void printStringWithShift(char* s, int shift_speed){
while (*s != 0){
printCharWithShift(*s, shift_speed);
s++;
}
}

Hi Author, I'm not able to understand the char array definitions for mapping a character, from the code above you have mentioned 4, 8, B00001000, B00000100, what is 4 and 8 here?

thanks in advance

Regards

Venkat

You'll need to look at the MaxMatrix library source file, writeSprite function will give you a clue what those numbers are for.

BIGDOG1971 (author)  IainM19 months ago
do not forget to modify the MAXINUSE code line to the amount of modules you are using.

Arduino: 1.6.0 (Windows 8), Board: "Arduino Uno"

Build options changed, rebuilding all

In file included from Scroll.ino:1:0:
Scroll.ino:15:23: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

WernerM14 months ago

Hi,
To those getting an "error: 'prog_uchar' does not name a type" message:
You need to replace 'prog_uchar' with 'const unsigned char'

My problem is different: All characters appear rotated 90 degrees counterclockwise, and shifting from upwards to downwards. Not sure whether this is fixed by changing the character map or this needs to be fixed in the library functions themselves.

Anyone else having this problem?

Marcelo, para vc entender: meu problema é que os caracteres estão aparecendo no display rotacionados em 90 graus sentido anti-horario, e o shift está ocorrendo de cima para baixo. A sua planilha excel não está funcionando, eu não consigo alterar a cor dos blocos quando escrevo '1' em um deles (fica sempre desenhada a letra 'r').

Abraços.

dirkd25 months ago

Hi,

I'm getting an error:

MAX7219_5.ino:31:7: error: 'prog_uchar' does not name a type

How can i fix this?

WernerM1 dirkd24 months ago

Hi, you need to replace '

'prog_uchar'

with

'const unsigned char'

Hey guys thanks for the video.I tried this out and made some progress as such but there is one issue.

1.The text that is scrolling is really hard to read as the brightness of the LED's surrounding the one which scroll both glow at almost same intensity.

The Code is am using is as follows:

#include <avr/pgmspace.h>
#include "LedControl.h"
#include <TimerOne.h>

int DataPin = 2;
int LoadPin = 3;
int ClockPin = 4;
byte buffer[8];

#define SCAN_LIMIT_REG 0x0B
#define DECODE_MODE_REG 0x09
#define SHUTDOWN_REG 0x0C
#define INTENSITY_REG 0x0A

static byte font[][8] PROGMEM =
{
{B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000},
{B00000100, B00000100, B00000100, B00000100, B00000100, B00000100, B00000000, B00000100},
{B00001010, B00001010, B00001010, B00000000, B00000000, B00000000, B00000000, B00000000},
{B00000000, B00001010, B00011111, B00001010, B00011111, B00001010, B00011111, B00001010},
{B00000111, B00001100, B00010100, B00001100, B00000110, B00000101, B00000110, B00011100},
{B00011001, B00011010, B00000010, B00000100, B00000100, B00001000, B00001011, B00010011},
{B00000110, B00001010, B00010010, B00010100, B00001001, B00010110, B00010110, B00001001},
{B00000100, B00000100, B00000100, B00000000, B00000000, B00000000, B00000000, B00000000},
{B00000010, B00000100, B00001000, B00001000, B00001000, B00001000, B00000100, B00000010},
{B00001000, B00000100, B00000010, B00000010, B00000010, B00000010, B00000100, B00001000},
{B00010101, B00001110, B00011111, B00001110, B00010101, B00000000, B00000000, B00000000},
{B00000000, B00000000, B00000100, B00000100, B00011111, B00000100, B00000100, B00000000},
{B00000000, B00000000, B00000000, B00000000, B00000000, B00000110, B00000100, B00001000},
{B00000000, B00000000, B00000000, B00000000, B00001110, B00000000, B00000000, B00000000},
{B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000100},
{B00000001, B00000010, B00000010, B00000100, B00000100, B00001000, B00001000, B00010000},
{B00001110, B00010001, B00010011, B00010001, B00010101, B00010001, B00011001, B00001110},
{B00000100, B00001100, B00010100, B00000100, B00000100, B00000100, B00000100, B00011111},
{B00001110, B00010001, B00010001, B00000010, B00000100, B00001000, B00010000, B00011111},
{B00001110, B00010001, B00000001, B00001110, B00000001, B00000001, B00010001, B00001110},
{B00010000, B00010000, B00010100, B00010100, B00011111, B00000100, B00000100, B00000100},
{B00011111, B00010000, B00010000, B00011110, B00000001, B00000001, B00000001, B00011110},
{B00000111, B00001000, B00010000, B00011110, B00010001, B00010001, B00010001, B00001110},
{B00011111, B00000001, B00000001, B00000001, B00000010, B00000100, B00001000, B00010000},
{B00001110, B00010001, B00010001, B00001110, B00010001, B00010001, B00010001, B00001110},
{B00001110, B00010001, B00010001, B00001111, B00000001, B00000001, B00000001, B00000001},
{B00000000, B00000100, B00000100, B00000000, B00000000, B00000100, B00000100, B00000000},
{B00000000, B00000100, B00000100, B00000000, B00000000, B00000100, B00000100, B00001000},
{B00000001, B00000010, B00000100, B00001000, B00001000, B00000100, B00000010, B00000001},
{B00000000, B00000000, B00000000, B00011110, B00000000, B00011110, B00000000, B00000000},
{B00010000, B00001000, B00000100, B00000010, B00000010, B00000100, B00001000, B00010000},
{B00001110, B00010001, B00010001, B00000010, B00000100, B00000100, B00000000, B00000100},
{B00001110, B00010001, B00010001, B00010101, B00010101, B00010001, B00010001, B00011110},
{B00001110, B00010001, B00010001, B00010001, B00011111, B00010001, B00010001, B00010001},
{B00011110, B00010001, B00010001, B00011110, B00010001, B00010001, B00010001, B00011110},
{B00000111, B00001000, B00010000, B00010000, B00010000, B00010000, B00001000, B00000111},
{B00011100, B00010010, B00010001, B00010001, B00010001, B00010001, B00010010, B00011100},
{B00011111, B00010000, B00010000, B00011110, B00010000, B00010000, B00010000, B00011111},
{B00011111, B00010000, B00010000, B00011110, B00010000, B00010000, B00010000, B00010000},
{B00001110, B00010001, B00010000, B00010000, B00010111, B00010001, B00010001, B00001110},
{B00010001, B00010001, B00010001, B00011111, B00010001, B00010001, B00010001, B00010001},
{B00011111, B00000100, B00000100, B00000100, B00000100, B00000100, B00000100, B00011111},
{B00011111, B00000100, B00000100, B00000100, B00000100, B00000100, B00010100, B00001000},
{B00010001, B00010010, B00010100, B00011000, B00010100, B00010010, B00010001, B00010001},
{B00010000, B00010000, B00010000, B00010000, B00010000, B00010000, B00010000, B00011111},
{B00010001, B00011011, B00011111, B00010101, B00010001, B00010001, B00010001, B00010001},
{B00010001, B00011001, B00011001, B00010101, B00010101, B00010011, B00010011, B00010001},
{B00001110, B00010001, B00010001, B00010001, B00010001, B00010001, B00010001, B00001110},
{B00011110, B00010001, B00010001, B00011110, B00010000, B00010000, B00010000, B00010000},
{B00001110, B00010001, B00010001, B00010001, B00010001, B00010101, B00010011, B00001111},
{B00011110, B00010001, B00010001, B00011110, B00010100, B00010010, B00010001, B00010001},
{B00001110, B00010001, B00010000, B00001000, B00000110, B00000001, B00010001, B00001110},
{B00011111, B00000100, B00000100, B00000100, B00000100, B00000100, B00000100, B00000100},
{B00010001, B00010001, B00010001, B00010001, B00010001, B00010001, B00010001, B00001110},
{B00010001, B00010001, B00010001, B00010001, B00010001, B00010001, B00001010, B00000100},
{B00010001, B00010001, B00010001, B00010001, B00010001, B00010101, B00010101, B00001010},
{B00010001, B00010001, B00001010, B00000100, B00000100, B00001010, B00010001, B00010001},
{B00010001, B00010001, B00001010, B00000100, B00000100, B00000100, B00000100, B00000100},
{B00011111, B00000001, B00000010, B00000100, B00001000, B00010000, B00010000, B00011111},
{B00001110, B00001000, B00001000, B00001000, B00001000, B00001000, B00001000, B00001110},
{B00010000, B00001000, B00001000, B00000100, B00000100, B00000010, B00000010, B00000001},
{B00001110, B00000010, B00000010, B00000010, B00000010, B00000010, B00000010, B00001110},
{B00000100, B00001010, B00010001, B00000000, B00000000, B00000000, B00000000, B00000000},
{B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00011111},
{B00001000, B00000100, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000},
{B00000000, B00000000, B00000000, B00001110, B00010010, B00010010, B00010010, B00001111},
{B00000000, B00010000, B00010000, B00010000, B00011100, B00010010, B00010010, B00011100},
{B00000000, B00000000, B00000000, B00001110, B00010000, B00010000, B00010000, B00001110},
{B00000000, B00000001, B00000001, B00000001, B00000111, B00001001, B00001001, B00000111},
{B00000000, B00000000, B00000000, B00011100, B00010010, B00011110, B00010000, B00001110},
{B00000000, B00000011, B00000100, B00000100, B00000110, B00000100, B00000100, B00000100},
{B00000000, B00001110, B00001010, B00001010, B00001110, B00000010, B00000010, B00001100},
{B00000000, B00010000, B00010000, B00010000, B00011100, B00010010, B00010010, B00010010},
{B00000000, B00000000, B00000100, B00000000, B00000100, B00000100, B00000100, B00000100},
{B00000000, B00000010, B00000000, B00000010, B00000010, B00000010, B00000010, B00001100},
{B00000000, B00010000, B00010000, B00010100, B00011000, B00011000, B00010100, B00010000},
{B00000000, B00010000, B00010000, B00010000, B00010000, B00010000, B00010000, B00001100},
{B00000000, B00000000, B00000000, B00001010, B00010101, B00010001, B00010001, B00010001},
{B00000000, B00000000, B00000000, B00010100, B00011010, B00010010, B00010010, B00010010},
{B00000000, B00000000, B00000000, B00001100, B00010010, B00010010, B00010010, B00001100},
{B00000000, B00011100, B00010010, B00010010, B00011100, B00010000, B00010000, B00010000},
{B00000000, B00001110, B00010010, B00010010, B00001110, B00000010, B00000010, B00000001},
{B00000000, B00000000, B00000000, B00001010, B00001100, B00001000, B00001000, B00001000},
{B00000000, B00000000, B00001110, B00010000, B00001000, B00000100, B00000010, B00011110},
{B00000000, B00010000, B00010000, B00011100, B00010000, B00010000, B00010000, B00001100},
{B00000000, B00000000, B00000000, B00010010, B00010010, B00010010, B00010010, B00001100},
{B00000000, B00000000, B00000000, B00010001, B00010001, B00010001, B00001010, B00000100},
{B00000000, B00000000, B00000000, B00010001, B00010001, B00010001, B00010101, B00001010},
{B00000000, B00000000, B00000000, B00010001, B00001010, B00000100, B00001010, B00010001},
{B00000000, B00000000, B00010001, B00001010, B00000100, B00001000, B00001000, B00010000},
{B00000000, B00000000, B00000000, B00011111, B00000010, B00000100, B00001000, B00011111},
{B00000010, B00000100, B00000100, B00000100, B00001000, B00000100, B00000100, B00000010},
{B00000100, B00000100, B00000100, B00000100, B00000100, B00000100, B00000100, B00000100},
{B00001000, B00000100, B00000100, B00000100, B00000010, B00000100, B00000100, B00001000},
{B00000000, B00000000, B00000000, B00001010, B00011110, B00010100, B00000000, B00000000}
};

void clearDisplay()
{
for (byte x=0; x<8; x++)
{
buffer[x] = B00000000;
}
screenUpdate();
}

void initMAX7219()
{
pinMode(DataPin, OUTPUT);
pinMode(LoadPin, OUTPUT);
pinMode(ClockPin, OUTPUT);
clearDisplay();
writeData(SCAN_LIMIT_REG, B00000111);
writeData(DECODE_MODE_REG, B00000000);
writeData(SHUTDOWN_REG, B00000001);
intensity(15);
}
void intensity(int intensity)
{
writeData(INTENSITY_REG, intensity);
}
void writeData(byte msb, byte lsb)
{
digitalWrite(LoadPin, LOW);
shiftOut(DataPin, ClockPin, MSBFIRST, (msb));
shiftOut(DataPin, ClockPin, MSBFIRST, (lsb));
digitalWrite(LoadPin, HIGH);
}
void scroll(char myString[], int rate) {
byte firstChrRow, secondChrRow;
byte ledOutput;
byte chrIndex = 0;
byte Char1, Char2;
byte scrollBit = 0;
byte strLength = 0;
unsigned long time;
unsigned long counter;
while (myString[strLength])
{
strLength++;
}
counter = millis();
while (chrIndex < (strLength))
{
time = millis();
if (time > (counter + rate))
{
Char1 = constrain(myString[chrIndex],32,126);
Char2 = constrain(myString[chrIndex+1],32,126);
for (byte y= 0; y<8; y++)
{
firstChrRow = pgm_read_byte(&font[Char1 - 32][y]);
secondChrRow = (pgm_read_byte(&font[Char2 - 32][y])) << 1;
ledOutput = (firstChrRow << scrollBit)|(secondChrRow >> (8 - scrollBit) );
buffer[y] = ledOutput;
}
scrollBit++;
if (scrollBit > 6)
{
scrollBit = 0;
chrIndex++;
}
counter = millis();
}
}
}
void screenUpdate()
{
for (byte row = 0; row < 8; row++)
{
writeData(row+1, buffer[row]);
}
}
void setup()
{
initMAX7219();
Timer1.initialize(10000);
Timer1.attachInterrupt(screenUpdate);
Serial.begin(9600);
}
void loop()
{
clearDisplay();
scroll("12345", 1000);
scroll(" Chapter 7 - LED Displays ", 200);
scroll(" HELLO WORLD!!! :) ", 200);
}

___________________________________________________________________

Also i have connected the MAX 7219 with a Led Matrix That is a little different .

IMG_20150307_191206.jpgIMG_20150307_191218.jpgIMG_20150307_191536.jpg
OsmaniaI5 months ago

great videos :)

i have questions:

is it possible use this code for raspberry pi?

Hi,

how if i use 5x8 dot matrix....

can you halp me,,,,,

biboz5 months ago

Hi Author, thanx for sharing you wonderful project.Can you please give me the button.h library,I have emailed you severally without lack...please drop in the link since the zip above doesn't contain the folder.

Much appreciated.

sgharbi16 months ago

hi all,

I am trying to do scrolling text with six pieces of MAX7219 module.

i want to do something like this https://www.youtube.com/watch?v=KHYyukODlMc
But i do not found the sketch ....i have arduino Uno and the last arduino software .
I was trying all solutions without results .....always problem.....
Please help me. i need it for school

I wait your reply

Hi Author,

I have a query, the char array that you have defined to map the characters for the display: 3, 8, B00000000, B00000000, B00000000, B00000000, B00000000,

What is 3 and 8 denote?

Regards,

venkat

Hello friend

would you please explain me the format / definition for the character

4, 8, B01111110, B00010001, B00010001, B01111110, B00000000, // A

regards,

venkat

Hello, I am thinking of doing this project for a Christmas present, but I don't want to give them my arduino. Can I use a chip like the ATTiny or Atmega to replace he arduino??

BIGDOG1971 (author)  louis.bates.777 months ago
Hi Louis,

Yes, you can replace the arduino board by a ATMega-328 (with arduino bootloader) and a minimun configuratiion (using battery 3 ~ 9V for example).
arduino minimum configuration.jpg

Hi Marcelo, i tried to compile the source code you gave. it gave me error notifications like this one

"MAX7219_8.ino:24:9: error: 'prog_uchar' does not name a type

MAX7219_8.ino: In function 'void printCharWithShift(char, int)':

MAX7219_8.ino:182:20: error: 'CH' was not declared in this scope"

and this one

"MAX7219_8.ino:24:17: error: variable 'CH' must be const in order to be put into read-only section by means of '__attribute__((progmem))'"

i am using arduino IDE 1.5.7 and windows 7

do u have any idea about this error?

thanks,

Bondan

gkumar219 months ago

HI Marcelo, I'm trying to include a special character which is the symbol for "Om". I've made the following addition to the CH[] array - 8, 8, B01000010, B10000001, B10011001, B01100110, B00011110, B00010011, B10010011, B01101110,

but I'm unable to get it to display. Any suggestions on how I can get this to display in my regular printStringwithShift function? Your response will be very helpful

gkumar21 gkumar219 months ago

I'm also unable to display the backslash symbol. How do I get that on display?

Bidduh9 months ago

Hi,

When I verify the code "MaxMatrix" dose not name a type give massage and this line show yellow color. MaxMatrix m(data, load, clock, maxInUse); // define module

BIGDOG1971 (author)  Bidduh9 months ago
Hi Bidduh

This kind of issue is due to libraries installation failure.
To solve the problem, proceed as shown below.

Remove all project libraries from the "libraries" folder.
To install the library(ies), follow the steps below:
1 - take sure that the Arduino's IDE is closed;
2 - unzip the library(ies) in the "libraries" folder of the Arduino's IDE;
3 - open the .ino file and compile it..

90% of people with this kind of problem, have solved it by following the procedure above.
If not, please re-install the arduino's IDE.


I hope I have helped you.

Feel free to send me your questions.


Best Regards


Marcelo Moraes
arduinobymyself.blogspot.com.br
arduinobymyself@gmail.com
Skype: marcelo.moraes
1-40 of 84Next »