Saturday, November 14, 2015

MAX7219 7-Segment Display

Do you like the 7-segment displays?
This board has a MAX7219, the board has eight digits connected in cascade. The board works at 5V and has SPI interface.

 
Video.

Description of library.

Initializes the MAX7219.

MAX7219_Init(void)
Example:
MAX7219_Init();

Writes a single digit.
MAX7219_WriteDigit(c, digit)

  • c: Sets the 7-segment character.
  • digit: Sets the digit.
Example:
MAX7219_WriteDigit('2', 5);

Writes constant numbers.
MAX7219_ConstDigit(buffer);

  • buffer: Sets the numbers.
Example:
MAX7219_ConstDigit("00001234");

Writes numbers.
MAX7219_Digit(buffer);

  • buffer: Sets the numbers.
Example:
unsigned int i;
char buffer2[20];

i = 25;
sprintf(buffer2, "%8d", i);
MAX7219_Digit(buffer2);

Clears the 8 digits.

MAX7219_Clear(void);
Example:
MAX7219_Clear();

Schematic.


0 comments:

Post a Comment