forked from 423A35C7/STM32CubeMX-Keil_uVision5
期末大作业-增加矩阵LED
This commit is contained in:
2316
FinalHomework/Core/Inc/8X16.h
Normal file
2316
FinalHomework/Core/Inc/8X16.h
Normal file
File diff suppressed because it is too large
Load Diff
189
FinalHomework/Core/Inc/GB1616.h
Normal file
189
FinalHomework/Core/Inc/GB1616.h
Normal file
@@ -0,0 +1,189 @@
|
||||
// ------------------ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD>ݽṹ<DDBD><E1B9B9><EFBFBD><EFBFBD> ------------------------ //
|
||||
//struct typFNT_GB16 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>ݽṹ
|
||||
//{
|
||||
// unsigned char Index[3]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// unsigned char Msk[32]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//};
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char Index[2];
|
||||
char Msk[32];
|
||||
}typFNT_GB16;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3> //
|
||||
// <20><><EFBFBD>ֿ<EFBFBD>: <20><><EFBFBD><EFBFBD>16.dot,<2C><><EFBFBD><EFBFBD>ȡģ<C8A1><C4A3><EFBFBD><EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4>ϵ<EFBFBD><CFB5><EFBFBD> //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const typFNT_GB16 code codeGB_16[64] = // <20><><EFBFBD>ݱ<EFBFBD>
|
||||
{
|
||||
"<EFBFBD><EFBFBD>",0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x03,0xF8,0x02,0x00,
|
||||
0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0xFF,0xFE,0x00,0x00,
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x02,0x00,0x42,0x08,0x33,0xFC,0x14,0x00,0x8B,0xF8,0x62,0x88,0x22,0x48,0x0A,0x08,
|
||||
0x1F,0xFE,0x24,0x88,0xE4,0x48,0x24,0x08,0x27,0xFC,0x20,0x08,0x20,0x28,0x20,0x10,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: <20><> --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"<EFBFBD><EFBFBD>",0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08,
|
||||
0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08,0x01,0x02,0x01,0x02,0x00,0xFE,0x00,0x00,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: <20><> --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x3F,0xF0,0x00,0x20,0x00,0x40,0x00,0x80,0x01,0x00,0x01,0x00,0x01,0x04,
|
||||
0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: <20><> --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"<EFBFBD><EFBFBD>",0x06,0x08,0x78,0x88,0x08,0x48,0x08,0x48,0xFE,0x08,0x18,0x88,0x1C,0x48,0x2A,0x48,
|
||||
0x28,0x0E,0x48,0x78,0x8B,0x88,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: <20><> --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"<EFBFBD><EFBFBD>",0x10,0x20,0x10,0x20,0x10,0x20,0xFD,0xFE,0x10,0x20,0x14,0x20,0x19,0xFC,0x31,0x08,
|
||||
0xD0,0x88,0x10,0x90,0x10,0x60,0x10,0x60,0x10,0x90,0x11,0x0E,0x56,0x04,0x20,0x00,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: <20><> --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"<EFBFBD><EFBFBD>",0x01,0x00,0x01,0x00,0x7F,0xFE,0x02,0x00,0x04,0x00,0x0F,0xF0,0x18,0x10,0x28,0x10,
|
||||
0x4F,0xF0,0x88,0x10,0x08,0x10,0x0F,0xF0,0x08,0x10,0x08,0x90,0x08,0x70,0x08,0x20,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: <20><> --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0xFB,0xF8,0x92,0x08,0x93,0xF8,0xA2,0x08,0xA2,0x08,0x93,0xF8,0x8A,0x80,
|
||||
0x8A,0x48,0xAA,0x50,0x92,0x20,0x82,0x20,0x82,0x10,0x82,0x8E,0x83,0x04,0x82,0x00,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: <20><> --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x04,0x40,0x06,0x40,0x04,0x40,0x08,0x20,0x08,0x10,0x10,0x18,0x22,0x0E,
|
||||
0x43,0x04,0x02,0x00,0x04,0x20,0x08,0x10,0x11,0xF8,0x3F,0x18,0x10,0x10,0x00,0x00,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: ˾ --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"˾",0x00,0x00,0x3F,0xFC,0x00,0x04,0x00,0x04,0x7F,0xE4,0x00,0x04,0x00,0x04,0x3F,0xC4,
|
||||
0x20,0x44,0x20,0x44,0x3F,0xC4,0x20,0x44,0x20,0x04,0x00,0x14,0x00,0x08,0x00,0x00,
|
||||
|
||||
/*-- <20><><EFBFBD><EFBFBD>: <20><> --*/
|
||||
/*-- <20><><EFBFBD><EFBFBD>12; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>Ӧ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>x<EFBFBD><78>=16x16 --*/
|
||||
"<EFBFBD><EFBFBD>",0x01,0x00,0x01,0x20,0x01,0x10,0x01,0x00,0xFF,0xFE,0x01,0x00,0x03,0x80,0x05,0x40,
|
||||
0x05,0x20,0x09,0x10,0x11,0x18,0x21,0x0E,0xC1,0x04,0x01,0x00,0x01,0x00,0x00,0x00,
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x7F,0xFC,0x40,0x04,0x40,0x04,0x42,0x14,0x52,0x94,0x4A,0x54,0x44,
|
||||
0x24,0x44,0x24,0x4A,0x54,0x4A,0x54,0x52,0x94,0x61,0x04,0x40,0x04,0x40,0x14,0x40,0x08,/*"<22><>,0*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x10,0x80,0x10,0x80,0x20,0xF8,0x21,0x08,0x4B,0x10,0xFC,0xA0,0x10,0x40,0x20,0xA0,
|
||||
0x41,0x18,0xFA,0x06,0x45,0xF8,0x01,0x08,0x19,0x08,0xE1,0x08,0x41,0xF8,0x01,0x08,/*"<22><>,1*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x80,0x20,0x40,0x17,0xFC,0x14,0x04,0x80,0x00,0x43,0xF8,0x40,0x40,0x13,0xF8,
|
||||
0x12,0x48,0x23,0xF8,0xE2,0x48,0x23,0xF8,0x20,0x00,0x21,0x10,0x22,0x08,0x04,0x04,/*"<22><>,2*/
|
||||
|
||||
"ʾ",0x00,0x00,0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x01,
|
||||
0x00,0x01,0x00,0x11,0x10,0x11,0x08,0x21,0x04,0x41,0x02,0x81,0x02,0x05,0x00,0x02,0x00,/*"ʾ,3*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x08,0x20,0x08,0x20,0xFF,0xFE,0x08,0x20,0x08,0x20,0x00,0x00,0x7F,0xF8,0x02,0x08,
|
||||
0x02,0x08,0x02,0x08,0x02,0x08,0x02,0x50,0x02,0x20,0x02,0x00,0x02,0x00,0x02,0x00,/*"<22><>,4*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x02,0x00,0x02,0x00,0x02,0x00,0x03,0xFC,0x02,0x00,0x02,0x00,0x3F,0xF0,0x20,0x10,
|
||||
0x20,0x10,0x20,0x10,0x3F,0xF0,0x00,0x00,0x24,0x88,0x22,0x44,0x42,0x44,0x80,0x04,/*"<22><>,5*/
|
||||
|
||||
|
||||
|
||||
"˳",0x00,0x00,0x00,0xD6,0x54,0x54,0x54,0x54,
|
||||
0x54,0x6C,0x28,0x28,0x28,0x28,0x00,0x00,/*"W",0*/
|
||||
0x00,0x00,0x00,0x7C,0x10,0x10,0x10,0x10,
|
||||
0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,/*"I",1*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0xFC,0x42,0x48,0x48,0x78,
|
||||
0x48,0x48,0x40,0x40,0x40,0xE0,0x00,0x00,/*"F",2*/
|
||||
0x00,0x00,0x00,0x7C,0x10,0x10,0x10,0x10,
|
||||
0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,/*"I",3*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x3F,0xF0,0x02,0x00,0x02,0x00,
|
||||
0x02,0x00,0x02,0x00,0x7F,0xFC,0x04,0x80,
|
||||
0x04,0x80,0x04,0x80,0x08,0x80,0x08,0x80,
|
||||
0x10,0x84,0x20,0x84,0x40,0x7C,0x80,0x00,/*"<22><>",4*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x10,0x50,0x10,0x48,0x20,0x40,0x24,0x5C,
|
||||
0x45,0xE0,0xF8,0x40,0x10,0x5E,0x23,0xE0,
|
||||
0x40,0x44,0xFC,0x48,0x40,0x30,0x00,0x22,
|
||||
0x1C,0x52,0xE0,0x8A,0x43,0x06,0x00,0x02,/*"<22><>",5*/
|
||||
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x08,0x40,0x08,0x40,0x08,0x40,0x13,0xF8,0x10,0x40,0x30,0x80,0x37,0xFE,0x50,0x80,
|
||||
0x91,0x00,0x13,0xF8,0x10,0x08,0x11,0x10,0x10,0xA0,0x10,0x40,0x10,0x20,0x10,0x20,
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x28,0x00,0x24,0x3F,0xFE,0x20,0x20,0x2F,0xA4,0x20,0x24,0x2F,0xA8,0x28,0x98,
|
||||
0x28,0x92,0x4F,0xAA,0x40,0x46,0x80,0x82,0x01,0x00,0x48,0x84,0x48,0x12,0x87,0xF2,
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x3E,0x7C,0x22,0x44,0x22,0x44,0x3E,0x7C,0x01,0x20,0x01,0x10,0xFF,0xFE,
|
||||
0x02,0x80,0x0C,0x60,0x30,0x18,0xC0,0x06,0x3E,0x7C,0x22,0x44,0x22,0x44,0x3E,0x7C,
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x01,0x00,0x21,0x08,0x11,0x08,0x09,0x10,0x09,0x20,0x01,0x00,0xFF,0xFE,0x04,0x40,
|
||||
0x04,0x40,0x04,0x40,0x04,0x40,0x08,0x42,0x08,0x42,0x10,0x42,0x20,0x3E,0xC0,0x00,
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x7D,0xFC,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x94,0x7D,0x08,0x44,0xFC,
|
||||
0x44,0x84,0x44,0x84,0x44,0x84,0x7C,0xFC,0x00,0x00,0x48,0x88,0x44,0x44,0x84,0x44,/*"<22><>",1*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x40,0x40,0x40,0x27,0xFC,0x20,0x40,0x03,0xF8,0x00,0x40,0xE7,0xFE,0x20,0x00,
|
||||
0x23,0xF8,0x22,0x08,0x23,0xF8,0x22,0x08,0x2B,0xF8,0x32,0x08,0x22,0x28,0x02,0x10,/*"<22><>",0*/
|
||||
|
||||
"ѡ",0x00,0x40,0x22,0x40,0x12,0x40,0x13,0xF8,0x04,0x40,0x00,0x40,0xF7,0xFC,0x11,0x20,
|
||||
0x11,0x20,0x11,0x20,0x12,0x24,0x12,0x24,0x14,0x1C,0x28,0x00,0x47,0xFE,0x00,0x00,/*"ѡ",1*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x20,0x00,0x27,0xF8,0x22,0x08,0x21,0x10,0xF0,0xA0,0x20,0x40,0x21,0xB0,0x26,0x4E,
|
||||
0x30,0x40,0xE3,0xF8,0x20,0x40,0x20,0x40,0x27,0xFC,0x20,0x40,0xA0,0x40,0x40,0x40,/*"<22><>",2*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x08,0x80,0x08,0x80,0x08,0x80,0x11,0xFE,0x11,0x02,0x32,0x04,0x34,0x20,0x50,0x20,
|
||||
0x91,0x28,0x11,0x24,0x12,0x24,0x12,0x22,0x14,0x22,0x10,0x20,0x10,0xA0,0x10,0x40,/*"<22><>",3*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x10,0x40,0x10,0x40,0x20,0x40,0x7E,0x7C,0x42,0x84,0x42,0x84,0x43,0x04,0x42,0x44,
|
||||
0x7E,0x24,0x42,0x24,0x42,0x04,0x42,0x04,0x42,0x04,0x7E,0x04,0x42,0x28,0x00,0x10,/*"<22><>",4*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x02,0x00,0x02,0x00,0x07,0xF0,0x08,0x10,0x14,0x20,0x62,0x40,0x02,0x80,0x01,0x00,
|
||||
0x06,0x00,0x1F,0xF8,0xE8,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0F,0xF8,0x08,0x08,/*"<22><>",5*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x08,0x80,0x1C,0x80,0xF0,0x80,0x10,0xFE,0x11,0x02,0xFD,0x04,0x12,0x20,0x30,0x20,
|
||||
0x38,0xA8,0x54,0xA4,0x51,0x24,0x91,0x22,0x12,0x22,0x10,0x20,0x10,0xA0,0x10,0x40,/*"<22><>",6*/
|
||||
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x10,0x80,0x10,0x40,0x23,0xFC,0x22,0x04,0x4A,0x04,0xFB,0xFC,0x12,0x00,0x22,0x00,
|
||||
0x43,0xFC,0xFB,0x54,0x43,0x54,0x05,0xFC,0x1D,0x54,0xE5,0x54,0x49,0x44,0x01,0x0C,/*"<22><>",0*/
|
||||
|
||||
|
||||
"ģ",0x11,0x10,0x11,0x10,0x17,0xFC,0x11,0x10,0xFC,0x00,0x13,0xF8,0x32,0x08,0x3B,0xF8,0x56,
|
||||
0x08,0x53,0xF8,0x90,0x40,0x17,0xFC,0x10,0xA0,0x11,0x10,0x12,0x08,0x14,0x06,/*"ģ",0*/
|
||||
|
||||
"ʽ",0x00,0x48,0x00,0x44,0x00,0x44,0x00,0x40,0xFF,0xFE,0x00,0x40,0x00,0x40,0x3E,0x40,0x08,
|
||||
0x40,0x08,0x40,0x08,0x20,0x08,0x22,0x0F,0x12,0x78,0x0A,0x20,0x06,0x00,0x02,/*"ʽ",1*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0xFF,0xFE,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x40,0x02,0x20,0x02,
|
||||
0x10,0x02,0x08,0x02,0x08,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,/*"<22><>",1*/
|
||||
|
||||
"ȷ",0x00,0x40,0x00,0x40,0xFC,0x7C,0x10,0x84,0x11,0x08,0x22,0xFE,0x3C,0x92,0x64,0x92,0x64,
|
||||
0xFE,0xA4,0x92,0x24,0x92,0x24,0xFE,0x3C,0x92,0x25,0x12,0x21,0x0A,0x02,0x04,/*"ȷ",2*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x02,0x00,0x01,0x00,0x7F,0xFE,0x40,0x02,0x80,0x04,0x00,0x00,0x3F,0xF8,0x01,0x00,0x01,
|
||||
0x00,0x11,0x00,0x11,0xF8,0x11,0x00,0x11,0x00,0x29,0x00,0x47,0xFE,0x80,0x00,/*"<22><>",3*/
|
||||
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x01,0x00,0x11,0x10,0x09,0x20,0x01,0x00,0x7F,0xFC,0x05,0x40,0x09,0x20,0x11,0x10,0x60,
|
||||
0x08,0x01,0x00,0xFF,0xFE,0x02,0x80,0x04,0x40,0x08,0x20,0x30,0x18,0xC0,0x06,/*"<22><>",0*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x04,0x7F,0x84,0x12,0x24,0x12,0x24,0x12,0x24,0xFF,0xA4,0x12,0x24,0x22,0x04,0x22,
|
||||
0x14,0x41,0x08,0x81,0x00,0x3F,0xF8,0x01,0x00,0x01,0x00,0xFF,0xFE,0x00,0x00,/*"<22><>",1*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x01,0x80,0x03,0xC0,0x07,0xE0,0x0F,0xF0,0x1F,0xF8,0x3F,0xFC,0x7F,0xFE,0x00,0x00,0x00,
|
||||
0x00,0x7F,0xFE,0x3F,0xFC,0x1F,0xF8,0x0F,0xF0,0x07,0xE0,0x03,0xC0,0x01,0x80,/*<2A><>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x07,0xE0,0x1F,0xF8,0x3F,0xFC,0x7C,0x3E,0xF0,0x0E,0xE7,0x8F,0xEF,0xA7,0xE1,0xF7,/*"<22><>˾LOGO"*/
|
||||
0xEF,0xF7,0xE1,0xE7,0xEF,0x6F,0x70,0x0E,0x78,0x1E,0x3F,0xFC,0x1F,0xF8,0x07,0xE0,
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0xF0,0x00,0x00,0xFF,0xFE,
|
||||
0x08,0x00,0x10,0x00,0x1F,0xF0,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0xA0,0x00,0x40,/*"<22><>",0*/
|
||||
|
||||
"̖",0x00,0x00,0x07,0xE0,0x38,0x1C,0x60,0x06,0x43,0xC2,0x0E,0x70,0x30,0x0C,0x00,0x00,
|
||||
0x07,0xE0,0x0C,0x30,0x00,0x00,0x01,0x80,0x02,0x40,0x03,0xC0,0x01,0x80,0x00,0x00,/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ*/
|
||||
};
|
||||
|
||||
111
FinalHomework/Core/Inc/GB3232.h
Normal file
111
FinalHomework/Core/Inc/GB3232.h
Normal file
@@ -0,0 +1,111 @@
|
||||
// ------------------ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD>ݽṹ<DDBD><E1B9B9><EFBFBD><EFBFBD> ------------------------ //
|
||||
//struct typFNT_GB32 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>ݽṹ
|
||||
//{
|
||||
// unsigned char Index[3]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// unsigned char Msk[128]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char Index[2];
|
||||
char Msk[128];
|
||||
}typFNT_GB32;
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3> //
|
||||
// <20><><EFBFBD>ֿ<EFBFBD>: <20><><EFBFBD><EFBFBD>32.dot,<2C><><EFBFBD><EFBFBD>ȡģ<C8A1><C4A3><EFBFBD><EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4>ϵ<EFBFBD><CFB5><EFBFBD> //
|
||||
// ȡģ<C8A1><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡģ<C8A1><C4A3>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
const typFNT_GB32 code codeGB_32[] = // <20><><EFBFBD>ݱ<EFBFBD>
|
||||
{
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x80,0x00,0x00,
|
||||
0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
||||
0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
||||
0x03,0x00,0xC0,0x00,0x03,0xFF,0xE0,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
||||
0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
||||
0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
||||
0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x18,0x3F,
|
||||
0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"<22><>",0*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x08,0x07,0x00,0x00,
|
||||
0x04,0x06,0x00,0x00,0x06,0x04,0x00,0x20,0x03,0x0F,0xFF,0xF0,0x02,0x0C,0x00,0x00,
|
||||
0x00,0x18,0x00,0x00,0x40,0x98,0x00,0x00,0x20,0xBF,0xFF,0xC0,0x30,0xAC,0x00,0xC0,
|
||||
0x19,0x4C,0x40,0x80,0x19,0x0C,0x60,0x80,0x01,0x0C,0x30,0x80,0x01,0x08,0x30,0x80,
|
||||
0x02,0x18,0x00,0x88,0x03,0xFF,0xFF,0xFC,0x02,0x18,0x81,0x80,0x04,0x18,0x41,0x80,
|
||||
0x04,0x18,0x61,0x80,0x0C,0x10,0x21,0x80,0x3C,0x30,0x21,0x80,0x0C,0x30,0x01,0x88,
|
||||
0x08,0x7F,0xFF,0xFC,0x08,0x20,0x01,0x80,0x18,0x00,0x01,0x80,0x18,0x00,0x41,0x00,
|
||||
0x1C,0x00,0x3F,0x00,0x0C,0x00,0x0F,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,/*"<22><>",1*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x00,0x00,0xE0,0x30,0x00,
|
||||
0x00,0xC0,0x18,0x00,0x00,0xC0,0x18,0x00,0x01,0x80,0x18,0x10,0x01,0xBF,0xFF,0xF8,
|
||||
0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x07,0x80,0x00,0x60,
|
||||
0x07,0x07,0xFF,0xF0,0x0F,0x00,0x00,0x00,0x0B,0x00,0x00,0x00,0x13,0x00,0x00,0x60,
|
||||
0x23,0x0F,0xFF,0xF0,0x43,0x00,0x00,0x00,0x43,0x00,0x00,0x00,0x03,0x00,0x00,0x00,
|
||||
0x03,0x06,0x00,0x60,0x03,0x07,0xFF,0xE0,0x03,0x06,0x00,0x60,0x03,0x06,0x00,0x60,
|
||||
0x03,0x06,0x00,0x60,0x03,0x06,0x00,0x60,0x03,0x06,0x00,0x60,0x03,0x07,0xFF,0xE0,
|
||||
0x03,0x06,0x00,0x60,0x03,0x06,0x00,0x60,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"<22><>",4*/
|
||||
|
||||
"Ϣ",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,
|
||||
0x00,0x04,0x01,0x00,0x00,0xFF,0xFF,0xC0,0x00,0xC0,0x01,0x80,0x00,0xC0,0x01,0x80,
|
||||
0x00,0xC0,0x01,0x80,0x00,0xFF,0xFF,0x80,0x00,0xC0,0x01,0x80,0x00,0xC0,0x01,0x80,
|
||||
0x00,0xC0,0x01,0x80,0x00,0xFF,0xFF,0x80,0x00,0xC0,0x01,0x80,0x00,0xC0,0x01,0x80,
|
||||
0x00,0xC0,0x01,0x80,0x00,0xC0,0x01,0x80,0x00,0xFF,0xFF,0x80,0x00,0x82,0x00,0x00,
|
||||
0x00,0x01,0x80,0x00,0x00,0x21,0xC0,0x00,0x02,0x30,0xC0,0x40,0x02,0x30,0xC2,0x30,
|
||||
0x06,0x30,0x02,0x38,0x04,0x30,0x02,0x1C,0x0C,0x30,0x02,0x1C,0x1C,0x30,0x03,0x08,
|
||||
0x10,0x3F,0xFF,0x00,0x00,0x1F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"Ϣ",5*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x08,0x00,0x01,0xC0,0x0E,0x00,
|
||||
0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,
|
||||
0x01,0x98,0x0C,0x18,0x3F,0xFF,0xFF,0xFC,0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,
|
||||
0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,0x01,0x8C,0x0C,0x20,0x01,0xB3,0xFF,0xF0,
|
||||
0x01,0xC0,0x80,0x60,0x0F,0x80,0x80,0x60,0x3D,0x80,0x40,0xC0,0x31,0x80,0x40,0xC0,
|
||||
0x01,0x80,0x21,0x80,0x01,0x80,0x21,0x80,0x01,0x80,0x33,0x00,0x01,0x80,0x1E,0x00,
|
||||
0x01,0x80,0x0C,0x00,0x01,0x80,0x1E,0x00,0x01,0x80,0x37,0x00,0x01,0x80,0xE3,0xC0,
|
||||
0x1F,0x83,0x80,0xF8,0x07,0x8E,0x00,0x7C,0x02,0x30,0x00,0x00,0x00,0x00,0x00,0x00,/*"<22><>",6*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0xC0,0x00,
|
||||
0x00,0x01,0x8C,0x00,0x00,0x01,0x87,0x00,0x00,0x01,0x83,0x80,0x00,0x01,0x81,0x80,
|
||||
0x00,0x01,0x80,0x80,0x00,0x01,0x80,0x30,0x3F,0xFF,0xFF,0xF8,0x10,0x03,0xC0,0x00,
|
||||
0x00,0x07,0xC0,0x00,0x00,0x07,0xA0,0x00,0x00,0x0D,0xA0,0x00,0x00,0x0D,0x90,0x00,
|
||||
0x00,0x19,0x90,0x00,0x00,0x19,0x98,0x00,0x00,0x31,0x8C,0x00,0x00,0x61,0x86,0x00,
|
||||
0x00,0xC1,0x87,0x00,0x00,0x81,0x83,0x80,0x01,0x81,0x81,0xC0,0x03,0x01,0x80,0xF0,
|
||||
0x04,0x01,0x80,0x7C,0x08,0x01,0x80,0x38,0x10,0x01,0x80,0x10,0x60,0x01,0x80,0x00,
|
||||
0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,/*"<22><>",7*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0xC0,0x00,
|
||||
0x00,0x03,0x00,0x00,0x00,0x06,0x00,0x10,0x00,0x06,0x00,0x38,0x3F,0xFF,0xFF,0xFC,
|
||||
0x00,0x0C,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x30,0x01,0x00,
|
||||
0x00,0x7F,0xFF,0xC0,0x00,0x60,0x01,0x00,0x00,0xE0,0x01,0x00,0x01,0xE0,0x01,0x00,
|
||||
0x03,0x60,0x01,0x00,0x06,0x7F,0xFF,0x00,0x08,0x60,0x01,0x00,0x10,0x60,0x01,0x00,
|
||||
0x20,0x60,0x01,0x00,0x00,0x60,0x01,0x00,0x00,0x7F,0xFF,0x00,0x00,0x60,0x01,0x00,
|
||||
0x00,0x60,0x01,0x00,0x00,0x60,0x01,0x00,0x00,0x60,0x01,0x00,0x00,0x60,0x01,0x00,
|
||||
0x00,0x60,0x3F,0x00,0x00,0x60,0x0F,0x00,0x00,0x40,0x02,0x00,0x00,0x00,0x00,0x00,/*"<22><>",8*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x22,0x00,0x40,
|
||||
0x0F,0xF3,0xFF,0xE0,0x08,0x63,0x00,0x40,0x08,0x63,0x00,0x40,0x08,0x43,0x00,0x40,
|
||||
0x08,0x43,0x00,0x40,0x08,0xC3,0x00,0x40,0x08,0x83,0xFF,0xC0,0x08,0x83,0x00,0x40,
|
||||
0x09,0x03,0x00,0x40,0x08,0x83,0x00,0x40,0x08,0x43,0x00,0x40,0x08,0x63,0xFF,0xC0,
|
||||
0x08,0x23,0x20,0x40,0x08,0x33,0x10,0x20,0x08,0x33,0x10,0x70,0x08,0x33,0x10,0x60,
|
||||
0x08,0x33,0x19,0x80,0x08,0x33,0x0B,0x00,0x0B,0xF3,0x0C,0x00,0x08,0xE3,0x06,0x00,
|
||||
0x08,0x83,0x07,0x00,0x08,0x03,0x0B,0x80,0x08,0x03,0x31,0xC0,0x08,0x03,0xC0,0xF8,
|
||||
0x08,0x03,0x80,0x78,0x08,0x03,0x00,0x10,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"<22><>",9*/
|
||||
|
||||
"<EFBFBD><EFBFBD>",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x30,0x00,
|
||||
0x00,0x0C,0x20,0x00,0x00,0x1C,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x30,0x18,0x00,
|
||||
0x00,0x30,0x08,0x00,0x00,0x60,0x0C,0x00,0x00,0x60,0x04,0x00,0x00,0xC0,0x06,0x00,
|
||||
0x01,0x80,0x03,0x00,0x01,0x01,0x01,0x80,0x03,0x01,0x81,0xC0,0x06,0x03,0xC0,0xF0,
|
||||
0x0C,0x03,0x00,0x7C,0x10,0x07,0x00,0x30,0x20,0x06,0x00,0x00,0x00,0x0C,0x00,0x00,
|
||||
0x00,0x0C,0x00,0x00,0x00,0x18,0x10,0x00,0x00,0x30,0x08,0x00,0x00,0x20,0x0C,0x00,
|
||||
0x00,0x40,0x06,0x00,0x00,0x80,0x03,0x00,0x01,0x00,0x03,0x80,0x03,0xFF,0xFF,0xC0,
|
||||
0x03,0xE0,0x01,0xC0,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,/*"<22><>",10*/
|
||||
|
||||
"˾",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
|
||||
0x07,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60,
|
||||
0x00,0x00,0x00,0x60,0x00,0x00,0x18,0x60,0x1F,0xFF,0xFC,0x60,0x00,0x00,0x00,0x60,
|
||||
0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x03,0x00,0x60,0x60,0x03,0xFF,0xE0,0x60,
|
||||
0x03,0x00,0x40,0x60,0x03,0x00,0x40,0x60,0x03,0x00,0x40,0x60,0x03,0x00,0x40,0x60,
|
||||
0x03,0x00,0x40,0x60,0x03,0x00,0x40,0x60,0x03,0xFF,0xC0,0x60,0x03,0x00,0x40,0x60,
|
||||
0x03,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x00,0x00,0x10,0x60,
|
||||
0x00,0x00,0x0F,0xC0,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,/*"˾",11*/
|
||||
|
||||
};
|
||||
18
FinalHomework/Core/Inc/HC595.h
Normal file
18
FinalHomework/Core/Inc/HC595.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef __HC595_H
|
||||
#define __HC595_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void SendOneByte(uint8_t dat);
|
||||
void SendTwoBytes(uint16_t dat);
|
||||
void HanziDiplay(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
45
FinalHomework/Core/Inc/Hanzi.h
Normal file
45
FinalHomework/Core/Inc/Hanzi.h
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
#ifndef __HANZI_H
|
||||
#define __HANZI_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
const uint8_t HanziTab[] = /*"<22><>" 16x16<31><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*/
|
||||
{0x10,0x01,0x10,0x11,0x08,0x09,0x0C,0x07,0x8A,0x01,0x69,0x21,0x08,0x21,0x08,0x3E,
|
||||
0x88,0x00,0x80,0x00,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,/*"<22><>",0*/
|
||||
|
||||
0x40,0x00,0x40,0x00,0x40,0x00,0xFE,0x3F,0x20,0x00,0x90,0x00,0x88,0x00,0x84,0x00,
|
||||
0xFC,0x1F,0x80,0x00,0x90,0x04,0x88,0x08,0x84,0x10,0x82,0x20,0xA0,0x00,0x40,0x00,/*"<22><>",1*/
|
||||
0x10,0x00,0xD0,0x7F,0x12,0x04,0x12,0x04,0x12,0x04,0x92,0x3F,0x92,0x24,0x92,0x24,
|
||||
0x92,0x24,0x92,0x24,0x92,0x24,0x90,0x2C,0x88,0x14,0x08,0x04,0x04,0x04,0x02,0x04,/*"ʦ",2*/
|
||||
0x20,0x02,0x20,0x02,0xFF,0x7F,0x20,0x02,0x08,0x00,0x90,0x1F,0x92,0x10,0x84,0x10,
|
||||
0xA4,0x10,0xA0,0x14,0x90,0x08,0x8E,0x40,0x88,0x40,0x88,0x40,0x08,0x7F,0x00,0x00,/*"<22><>",3*/
|
||||
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x80,0x00,0x80,0x00,
|
||||
0x40,0x01,0x40,0x01,0x20,0x02,0x20,0x02,0x10,0x04,0x08,0x08,0x04,0x10,0x03,0x60,/*"<22><>",4*/
|
||||
0x44,0x10,0x88,0x10,0x88,0x08,0x00,0x04,0xFE,0x7F,0x02,0x40,0x01,0x20,0xF8,0x07,
|
||||
0x00,0x02,0x80,0x01,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"ѧ",5*/
|
||||
0x00,0x00,0xE2,0x1F,0x04,0x08,0x84,0x05,0x00,0x02,0xE0,0x3F,0x27,0x22,0x24,0x22,
|
||||
0xE4,0x3F,0x24,0x22,0x24,0x22,0xE4,0x3F,0x24,0x22,0x24,0x2A,0x2A,0x10,0xF1,0x7F,/*"ͨ",6*/
|
||||
0x10,0x02,0x10,0x04,0xD0,0x7F,0x08,0x00,0x08,0x00,0x8C,0x3F,0x0C,0x00,0x0A,0x00,
|
||||
0x89,0x3F,0x08,0x00,0x08,0x00,0x88,0x3F,0x88,0x20,0x88,0x20,0x88,0x3F,0x88,0x20,/*"<22><>",7*/
|
||||
0x08,0x00,0x08,0x00,0x08,0x00,0xF8,0x3F,0x08,0x00,0x04,0x00,0x04,0x00,0xFC,0x1F,
|
||||
0x00,0x10,0x00,0x10,0x00,0x10,0xFF,0x13,0x00,0x10,0x00,0x10,0x00,0x0A,0x00,0x04,/*"<22><>",8*/
|
||||
0x80,0x00,0x80,0x00,0x80,0x00,0xFC,0x1F,0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,
|
||||
0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,0x84,0x50,0x80,0x40,0x80,0x40,0x00,0x7F,/*"<22><>",9*/
|
||||
0x00,0x00,0xFE,0x1F,0x00,0x08,0x00,0x04,0x00,0x02,0x80,0x01,0x80,0x00,0xFF,0x7F,
|
||||
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"<22><>",10*/
|
||||
0x00,0x00,0x00,0x00,0xFE,0x3F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,
|
||||
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x00,0x00,0x00,0x00,/*"<22><>",11*/
|
||||
0x10,0x00,0xB8,0x3F,0x8F,0x20,0x88,0x20,0x88,0x20,0xBF,0x3F,0x08,0x00,0x0C,0x00,
|
||||
0x9C,0x7F,0x2A,0x04,0x2A,0x04,0x89,0x3F,0x08,0x04,0x08,0x04,0xC8,0x7F,0x08,0x00,/*"<22><>",12*/
|
||||
0x44,0x10,0x88,0x10,0x88,0x08,0x00,0x04,0xFE,0x7F,0x02,0x40,0x01,0x20,0xF8,0x07,
|
||||
0x00,0x02,0x80,0x01,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"ѧ",13*/
|
||||
0x00,0x02,0x1E,0x04,0xD2,0x7F,0x4A,0x40,0x2A,0x20,0x86,0x1F,0x0A,0x00,0x12,0x00,
|
||||
0xD2,0x7F,0x12,0x09,0x16,0x09,0x0A,0x09,0x82,0x48,0x82,0x48,0x42,0x70,0x22,0x00};/*"Ժ",14*/
|
||||
|
||||
|
||||
uint16_t const ScanTab[] =
|
||||
{0x00001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,
|
||||
0x0100,0x0200,0x0400,0x0800,0x1000,0x2000,0x4000,0x8000};
|
||||
|
||||
#endif
|
||||
@@ -77,6 +77,14 @@ void Error_Handler(void);
|
||||
#define LCD_CS_GPIO_Port GPIOB
|
||||
#define LCD_RS_Pin GPIO_PIN_14
|
||||
#define LCD_RS_GPIO_Port GPIOB
|
||||
#define HC595_OE_Pin GPIO_PIN_6
|
||||
#define HC595_OE_GPIO_Port GPIOC
|
||||
#define HC595_RCLK_Pin GPIO_PIN_7
|
||||
#define HC595_RCLK_GPIO_Port GPIOC
|
||||
#define HC595_SRCLK_Pin GPIO_PIN_8
|
||||
#define HC595_SRCLK_GPIO_Port GPIOC
|
||||
#define HC595_SER_Pin GPIO_PIN_9
|
||||
#define HC595_SER_GPIO_Port GPIOC
|
||||
#define KeyRow_Pin GPIO_PIN_4
|
||||
#define KeyRow_GPIO_Port GPIOB
|
||||
|
||||
|
||||
82
FinalHomework/Core/Src/HC595.c
Normal file
82
FinalHomework/Core/Src/HC595.c
Normal file
@@ -0,0 +1,82 @@
|
||||
#include "main.h"
|
||||
#include "Hanzi.h"
|
||||
|
||||
#define HC595_PORT GPIOC
|
||||
|
||||
//GPIO<49><4F>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>ߣ<EFBFBD>
|
||||
#define OE_SET HC595_PORT->BSRR=HC595_OE_Pin
|
||||
#define RCLK_SET HC595_PORT->BSRR=HC595_RCLK_Pin
|
||||
#define SRCLK_SET HC595_PORT->BSRR=HC595_SRCLK_Pin
|
||||
#define SER_SET HC595_PORT->BSRR=HC595_SER_Pin
|
||||
|
||||
//GPIO<49><4F>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>
|
||||
#define OE_CLR HC595_PORT->BRR=HC595_OE_Pin
|
||||
#define RCLK_CLR HC595_PORT->BRR=HC595_RCLK_Pin
|
||||
#define SRCLK_CLR HC595_PORT->BRR=HC595_SRCLK_Pin
|
||||
#define SER_CLR HC595_PORT->BRR=HC595_SER_Pin
|
||||
|
||||
#define LATCH595 {RCLK_CLR;RCLK_SET;RCLK_CLR;}
|
||||
|
||||
extern uint8_t mPos;
|
||||
extern uint8_t mNum;
|
||||
|
||||
void SendOneByte(uint8_t dat)
|
||||
{
|
||||
uint8_t i;
|
||||
OE_CLR;
|
||||
for(i=0;i<8;i++)
|
||||
{
|
||||
if((dat&0x80))
|
||||
SER_SET;
|
||||
else
|
||||
SER_CLR;
|
||||
dat <<= 1;
|
||||
SRCLK_CLR;//SRCLK=0;
|
||||
SRCLK_SET;// SRCLK=1;
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************
|
||||
SendTwoBytes(uint16_t dat,bit dir)
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD>HC595оƬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dat<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>dir<EFBFBD><EFBFBD>1:<3A>ȷ<EFBFBD><C8B7><EFBFBD>λ;0:<3A>ȷ<EFBFBD><C8B7><EFBFBD>λ
|
||||
<EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
********************************************************/
|
||||
void SendTwoBytes(uint16_t dat)
|
||||
{
|
||||
|
||||
uint8_t i;
|
||||
OE_CLR;
|
||||
for(i=0;i<16;i++)
|
||||
{
|
||||
if((dat &0x8000))
|
||||
SER_SET;
|
||||
else
|
||||
SER_CLR;
|
||||
dat <<= 1;
|
||||
|
||||
SRCLK_CLR;//SRCLK=0;
|
||||
SRCLK_SET;// SRCLK=1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>HanziDiplay()
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>̬<EFBFBD><CCAC>ʾһ<CABE><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
********************************************************/
|
||||
void HanziDiplay(void)
|
||||
{
|
||||
uint16_t temp;
|
||||
SendTwoBytes(ScanTab[mPos]);
|
||||
temp=HanziTab[2*mPos+1+32*mNum];
|
||||
temp=(temp<<8)|HanziTab[2*mPos+32*mNum];
|
||||
SendTwoBytes(temp);
|
||||
LATCH595;
|
||||
if(++mPos>=16)
|
||||
{
|
||||
mPos=0;
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,8 @@ void MX_GPIO_Init(void)
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOC, TickLed_Pin|AddrA_Pin|AddrB_Pin|AddrC_Pin
|
||||
|OE_Pin, GPIO_PIN_RESET);
|
||||
|OE_Pin|HC595_OE_Pin|HC595_RCLK_Pin|HC595_SRCLK_Pin
|
||||
|HC595_SER_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOA, SegLedData_Pin|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|
||||
@@ -94,30 +95,13 @@ void MX_GPIO_Init(void)
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : PC6 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_6;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : PC7 PC8 PC9 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
/*Configure GPIO pins : PCPin PCPin PCPin PCPin */
|
||||
GPIO_InitStruct.Pin = HC595_OE_Pin|HC595_RCLK_Pin|HC595_SRCLK_Pin|HC595_SER_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : PA8 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_8;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : PA9 PA10 PA11 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
|
||||
/* USER CODE BEGIN PV */
|
||||
uint16_t mPos=0;
|
||||
|
||||
uint16_t mNum=0;
|
||||
|
||||
stSysTickTimer sSysTickTimer = {
|
||||
0, 0, 0, 0
|
||||
};
|
||||
@@ -84,6 +88,7 @@ int main(void)
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
uint8_t KeyValue = 0;
|
||||
uint16_t cnt = 0;
|
||||
/* USER CODE END 1 */
|
||||
|
||||
/* MCU Configuration--------------------------------------------------------*/
|
||||
@@ -121,6 +126,12 @@ int main(void)
|
||||
/* USER CODE BEGIN 3 */
|
||||
if (sSysTickTimer.bTenMilSecOk) {
|
||||
sSysTickTimer.bTenMilSecOk = 0;
|
||||
if(++cnt>=30)
|
||||
{
|
||||
cnt=0;
|
||||
if(++mNum>=6)
|
||||
mNum=0;
|
||||
}
|
||||
KeyValue = MatrixKeyScan();
|
||||
if (KeyValue != NO_KEY) {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include "variable.h"
|
||||
#include "hc595.h"
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
@@ -190,6 +191,7 @@ void SysTick_Handler(void)
|
||||
/* USER CODE END SysTick_IRQn 0 */
|
||||
HAL_IncTick();
|
||||
/* USER CODE BEGIN SysTick_IRQn 1 */
|
||||
HanziDiplay();
|
||||
if (++sSysTickTimer.mMilSecCount >= 10) {
|
||||
sSysTickTimer.mMilSecCount = 0;
|
||||
sSysTickTimer.bTenMilSecOk = 1;
|
||||
|
||||
@@ -35,28 +35,24 @@ Mcu.Pin23=PC6
|
||||
Mcu.Pin24=PC7
|
||||
Mcu.Pin25=PC8
|
||||
Mcu.Pin26=PC9
|
||||
Mcu.Pin27=PA8
|
||||
Mcu.Pin28=PA9
|
||||
Mcu.Pin29=PA10
|
||||
Mcu.Pin27=PA13
|
||||
Mcu.Pin28=PA14
|
||||
Mcu.Pin29=PB3
|
||||
Mcu.Pin3=PC0
|
||||
Mcu.Pin30=PA11
|
||||
Mcu.Pin31=PA13
|
||||
Mcu.Pin32=PA14
|
||||
Mcu.Pin33=PB3
|
||||
Mcu.Pin34=PB4
|
||||
Mcu.Pin35=PB5
|
||||
Mcu.Pin36=PB6
|
||||
Mcu.Pin37=PB7
|
||||
Mcu.Pin38=VP_SYS_VS_Systick
|
||||
Mcu.Pin39=VP_SYS_VS_DBSignals
|
||||
Mcu.Pin30=PB4
|
||||
Mcu.Pin31=PB5
|
||||
Mcu.Pin32=PB6
|
||||
Mcu.Pin33=PB7
|
||||
Mcu.Pin34=VP_SYS_VS_Systick
|
||||
Mcu.Pin35=VP_SYS_VS_DBSignals
|
||||
Mcu.Pin36=VP_TIM3_VS_ClockSourceINT
|
||||
Mcu.Pin4=PC1
|
||||
Mcu.Pin40=VP_TIM3_VS_ClockSourceINT
|
||||
Mcu.Pin5=PC2
|
||||
Mcu.Pin6=PC3
|
||||
Mcu.Pin7=PA0
|
||||
Mcu.Pin8=PA1
|
||||
Mcu.Pin9=PA2
|
||||
Mcu.PinsNb=41
|
||||
Mcu.PinsNb=37
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32G473RCTx
|
||||
@@ -85,14 +81,6 @@ PA1.GPIO_PuPd=GPIO_PULLUP
|
||||
PA1.Locked=true
|
||||
PA1.PinState=GPIO_PIN_SET
|
||||
PA1.Signal=GPIO_Output
|
||||
PA10.GPIOParameters=GPIO_PuPd
|
||||
PA10.GPIO_PuPd=GPIO_PULLUP
|
||||
PA10.Locked=true
|
||||
PA10.Signal=GPIO_Input
|
||||
PA11.GPIOParameters=GPIO_PuPd
|
||||
PA11.GPIO_PuPd=GPIO_PULLUP
|
||||
PA11.Locked=true
|
||||
PA11.Signal=GPIO_Input
|
||||
PA13.Mode=Serial_Wire
|
||||
PA13.Signal=SYS_JTMS-SWDIO
|
||||
PA14.Mode=Serial_Wire
|
||||
@@ -127,12 +115,6 @@ PA7.GPIO_PuPd=GPIO_PULLUP
|
||||
PA7.Locked=true
|
||||
PA7.PinState=GPIO_PIN_SET
|
||||
PA7.Signal=GPIO_Output
|
||||
PA8.Locked=true
|
||||
PA8.Signal=GPIO_Input
|
||||
PA9.GPIOParameters=GPIO_PuPd
|
||||
PA9.GPIO_PuPd=GPIO_PULLUP
|
||||
PA9.Locked=true
|
||||
PA9.Signal=GPIO_Input
|
||||
PB0.GPIOParameters=GPIO_PuPd,GPIO_Label
|
||||
PB0.GPIO_Label=KeyLine
|
||||
PB0.GPIO_PuPd=GPIO_PULLUP
|
||||
@@ -214,20 +196,30 @@ PC3.GPIO_Label=OE
|
||||
PC3.GPIO_PuPd=GPIO_PULLUP
|
||||
PC3.Locked=true
|
||||
PC3.Signal=GPIO_Output
|
||||
PC6.GPIOParameters=GPIO_Speed,GPIO_PuPd,GPIO_Label
|
||||
PC6.GPIO_Label=HC595_OE
|
||||
PC6.GPIO_PuPd=GPIO_PULLUP
|
||||
PC6.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||
PC6.Locked=true
|
||||
PC6.Signal=GPIO_Input
|
||||
PC7.GPIOParameters=GPIO_PuPd
|
||||
PC6.Signal=GPIO_Output
|
||||
PC7.GPIOParameters=GPIO_Speed,GPIO_PuPd,GPIO_Label
|
||||
PC7.GPIO_Label=HC595_RCLK
|
||||
PC7.GPIO_PuPd=GPIO_PULLUP
|
||||
PC7.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||
PC7.Locked=true
|
||||
PC7.Signal=GPIO_Input
|
||||
PC8.GPIOParameters=GPIO_PuPd
|
||||
PC7.Signal=GPIO_Output
|
||||
PC8.GPIOParameters=GPIO_Speed,GPIO_PuPd,GPIO_Label
|
||||
PC8.GPIO_Label=HC595_SRCLK
|
||||
PC8.GPIO_PuPd=GPIO_PULLUP
|
||||
PC8.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||
PC8.Locked=true
|
||||
PC8.Signal=GPIO_Input
|
||||
PC9.GPIOParameters=GPIO_PuPd
|
||||
PC8.Signal=GPIO_Output
|
||||
PC9.GPIOParameters=GPIO_Speed,GPIO_PuPd,GPIO_Label
|
||||
PC9.GPIO_Label=HC595_SER
|
||||
PC9.GPIO_PuPd=GPIO_PULLUP
|
||||
PC9.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||
PC9.Locked=true
|
||||
PC9.Signal=GPIO_Input
|
||||
PC9.Signal=GPIO_Output
|
||||
PF0-OSC_IN.Mode=HSE-External-Oscillator
|
||||
PF0-OSC_IN.Signal=RCC_OSC_IN
|
||||
PF1-OSC_OUT.Mode=HSE-External-Oscillator
|
||||
|
||||
@@ -458,6 +458,36 @@
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Core\Inc\MatrixKey.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>HC595.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Core\Inc\HC595.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Hanzi.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Core\Inc\Hanzi.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>GB1616.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Core\Inc\GB1616.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>GB3232.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Core\Inc\GB3232.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>8X16.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\Core\Inc\8X16.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>HC595.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Core\Src\HC595.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>main.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
|
||||
Reference in New Issue
Block a user