This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Tuesday, July 21, 2015

Led matrix, MAX7219 board.

In this post we will evaluate the MAX7219 board. This board was designed to control an 8x8 led matrix. I bought four boards in ebay, I like this model.
How to assemble the boards.
  • We solder two headers in each board.
  • We will solder the led matrix, be sure to put the led matrix in correct position.

How to connect the boards.
We will connect the boards in the following way.
Video.


Request.
Email contact: armicrocontroller@gmail.com


Description of library.
This library support 1, 2, 3, 4 ...n boards, so we will need define the quantity of boards at max7219.h file.

Initializes the modules.

MAX7219_Init() 

Example:
MAX7219_Init();


Sets font.
MAX7219_SetFont(_font,_width,_min,_max)

  • _font: font to be set.
  • _width: char width (pixels)
  • _min: range minimum
  • _max: range maximum
Example:
MAX7219_SetFont(Font_6x8, 6, 32, 127);

Writes a char.
MAX7219_WriteChar(c,col)

  • c: char to be written
  • col: set column. Valid values: 0...
Example:
MAX7219_WriteChar('A', 0);

Prints text constant.
MAX7219_ConstText(buffer,col)

  • buffer: text to be written
  • col: set column. Valid values: 0...
Example:
MAX7219_ConstText("Hello",1);

Prints text variable.
MAX7219_Text(buffer,col)

  • buffer: text to be written
  • col: set column. Valid values: 0...
Example:
unsigned char i;
char buffer2[20];
i = 12;
sprintf(buffer2,"%03d",i);
MAX7219_Text(buffer2, 10);

This function does motion of scroll.
MAX7219_ConstTextScroll(buffer)
MAX7219_TextScroll(buffer)

MAX7219_ResetScroll(void)
  • buffer: text to be written
Example:
MAX7219_ResetScroll();
while(1){
MAX7219_ConstTextScroll("Hello.");
Delay_ms(300);
}

Displays Symbol.
MAX7219_Symbol8x8(buffer,col)

  • buffer: byte of array
  • col: set column. Valid values: 0...
Example:
MAX7219_Symbol8x8(8x8Symbol);

Fills RAM memory.
MAX7219_FillScreen(pattern)

  • pattern: byte to fill RAM memory
Example:
MAX7219_FillScreen(255);

Inverts the RAM memory.
MAX7219_InvertScreen()

Example:
MAX7219_InvertScreen();


Draws a Pixel on LED Matrix.
MAX7219_Pixel(x,y,color)
  • x: x position. Valid values: 0..
  • y: y position. Valid values: 0..7
  • color: color parameter. Valid values: 1, 2, 3
Example:
MAX7219_Pixel(1,1,1);