Read NTP time from Ethernet and drive six 7-segment LEDs using a MAX7221 to show time, date, month, week, year etc....

Dependencies:   NTPClient_NetServices mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Max7221.h Source File

Max7221.h

00001 const unsigned short int LED_DIGIT1 = 0x0100;
00002 const unsigned short int LED_DIGIT2 = 0x0200;
00003 const unsigned short int LED_DIGIT3 = 0x0300;
00004 const unsigned short int LED_DIGIT4 = 0x0400;
00005 const unsigned short int LED_DIGIT5 = 0x0500;
00006 const unsigned short int LED_DIGIT6 = 0x0600;
00007 const unsigned short int LED_DIGIT7 = 0x0700;
00008 const unsigned short int LED_DIGIT8 = 0x0800;
00009 
00010 //                                                  PABCDEFG
00011 const unsigned short int LED_A = 0x0077; // 0000000001110111;
00012 const unsigned short int LED_b = 0x001F; // 0000000000011111;
00013 const unsigned short int LED_c = 0x000D; // 0000000000001101;
00014 const unsigned short int LED_C = 0x004E; // 0000000001001110;
00015 const unsigned short int LED_d = 0x003D; // 0000000000111101;
00016 const unsigned short int LED_e = 0x006F; // 0000000001101111;
00017 const unsigned short int LED_E = 0x004F; // 0000000001001111;
00018 const unsigned short int LED_F = 0x0047; // 0000000001000111;
00019 const unsigned short int LED_g = 0x007B; // 0000000001111011;
00020 const unsigned short int LED_h = 0x0017; // 0000000000010111;
00021 const unsigned short int LED_H = 0x0037; // 0000000000110111;
00022 const unsigned short int LED_I = 0x0030; // 0000000000110111;
00023 const unsigned short int LED_i = 0x0010; // 0000000000010000;
00024 const unsigned short int LED_J = 0x003C; // 0000000000111100;
00025 const unsigned short int LED_L = 0x000E; // 0000000000001110;
00026 const unsigned short int LED_M = 0x0076; // 0000000001110110;
00027 const unsigned short int LED_N = 0x0076; // 0000000001110110;
00028 const unsigned short int LED_n = 0x0015; // 0000000000010101;
00029 const unsigned short int LED_o = 0x001D; // 0000000000011101;
00030 const unsigned short int LED_O = 0x007E; // 0000000001111110;
00031 const unsigned short int LED_P = 0x0067; // 0000000001100111;
00032 const unsigned short int LED_r = 0x0005; // 0000000000000101;
00033 const unsigned short int LED_S = 0x005B; // 0000000001011011;
00034 const unsigned short int LED_t = 0x000F; // 0000000000001111;
00035 const unsigned short int LED_u = 0x001C; // 0000000000011100;
00036 const unsigned short int LED_U = 0x003E; // 0000000000111110;
00037 const unsigned short int LED_V = 0x003E; // 0000000000111110;
00038 const unsigned short int LED_W = 0x003E; // 0000000000111110;
00039 const unsigned short int LED_y = 0x003B; // 0000000000111011;
00040 const unsigned short int LED__ = 0x0000; // 0000000000000000;
00041 const unsigned short int LED_0 = 0x007E; // 0000000001111110;
00042 const unsigned short int LED_1 = 0x0030; // 0000000000110000;
00043 const unsigned short int LED_2 = 0x006D; // 0000000001101101;
00044 const unsigned short int LED_3 = 0x0079; // 0000000001111001;
00045 const unsigned short int LED_4 = 0x0033; // 0000000000110011;
00046 const unsigned short int LED_5 = 0x005B; // 0000000001011011;
00047 const unsigned short int LED_6 = 0x005F; // 0000000001011111;
00048 const unsigned short int LED_7 = 0x0070; // 0000000001110000;
00049 const unsigned short int LED_8 = 0x007F; // 0000000001111111;
00050 const unsigned short int LED_9 = 0x007B; // 0000000001111011;
00051