affichage MAX7219 4 afficheur 8x8 en SPI 4 in 1 Dot Matrix MAX7219

Dependencies:   mbed

Committer:
jlsalvat
Date:
Thu Jun 16 12:09:52 2022 +0000
Revision:
3:97af1281969a
Parent:
2:675b923da5d2
ajout affichage horizontal;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vermaelen 2:675b923da5d2 1 //------------------------------------------------------------------------------
vermaelen 2:675b923da5d2 2 #define NO_OP_REG 0x00 //Used for Max7219 Cascading purposes
vermaelen 2:675b923da5d2 3 #define DECODE_MODE_REG 0x09
vermaelen 2:675b923da5d2 4 #define INTESITY_REG 0x0A
vermaelen 2:675b923da5d2 5 #define SCAN_LIMIT_REG 0x0B
vermaelen 2:675b923da5d2 6 #define SHUTDOWN_REG 0x0C
vermaelen 2:675b923da5d2 7 #define DISPLAY_TEST_REG 0x0F
vermaelen 2:675b923da5d2 8 //------------------------------------------------------------------------------
vermaelen 2:675b923da5d2 9 #define DISABLE_DECODE 0x00
vermaelen 2:675b923da5d2 10 #define BRIGHTNESS 0x05
vermaelen 2:675b923da5d2 11 #define SCAN_ALL_DIGITS 0x07
vermaelen 2:675b923da5d2 12 #define SHUTDOWN_MODE 0x00
vermaelen 2:675b923da5d2 13 #define NORMAL_OPERATION 0x01
vermaelen 2:675b923da5d2 14 #define DISABLE_TEST 0x00
vermaelen 2:675b923da5d2 15
vermaelen 2:675b923da5d2 16
vermaelen 2:675b923da5d2 17 unsigned const char led_blank[]= {
vermaelen 1:61f61158c345 18 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
vermaelen 1:61f61158c345 19 }; //blank
vermaelen 2:675b923da5d2 20 unsigned const char led_heart[]= {
vermaelen 1:61f61158c345 21 0x18,0x7E,0x7E,0xF8,0xF8,0x7E,0x7E,0x18
vermaelen 1:61f61158c345 22 }; //heart
vermaelen 1:61f61158c345 23
vermaelen 2:675b923da5d2 24 void MAX7219_NoOperation();
vermaelen 2:675b923da5d2 25 void MAX7219_write(char regName,char data,char chip);
vermaelen 2:675b923da5d2 26 void MAX7219_displayText(char* text);
vermaelen 2:675b923da5d2 27 void MAX7219_init(char noChips);
vermaelen 2:675b923da5d2 28 void MAX7219_config(char chip);
vermaelen 2:675b923da5d2 29 void MAX7219_display(unsigned const char led[], char no_chip);