编译环境keil5
以下为源码
.c文件:
#include "stm32f1xx_hal.h"
#include "lcd256128.h"
#define D0 PBout(14)
#define D1 PBout(15)
#define D2 PCout(6)
#define D3 PCout(7)
#define D4 PCout(8)
#define D5 PCout(9)
#define D6 PAout(8)
#define D7 PAout(9)
#define csl PAout(10)
#define reset PAout(11)
#define rs PAout(12)
#define rd PBout(13)
#define wr PBout(12)
const char ASCII_CODE[95][16]=
{
/*-- ID:0,??:" ",ASCII??:20,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*-- ID:1,??:"!",ASCII??:21,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x0E,0x1F,0x1F,0x0E,0x00,0x00,0x00,0x00,0x00,0xD8,0xD8,0x00,0x00,0x00,
/*-- ID:2,??:""",ASCII??:22,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x78,0x7C,0x00,0x00,0x7C,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*-- ID:3,??:"#",ASCII??:23,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x02,0x0F,0x0F,0x02,0x0F,0x0F,0x02,0x00,0x20,0xF8,0xF8,0x20,0xF8,0xF8,0x20,0x00,
/*-- ID:4,??:"$",ASCII??:24,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x0E,0x1F,0x11,0xF1,0xF1,0x19,0x0C,0x00,0x60,0x30,0x10,0x1C,0x1C,0xF0,0xE0,0x00,
/*-- ID:5,??:"%",ASCII??:25,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x06,0x06,0x00,0x00,0x01,0x03,0x06,0x00,0x18,0x30,0x60,0xC0,0x80,0x18,0x18,0x00,
/*-- ID:6,??:"&",ASCII??:26,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x0D,0x1F,0x13,0x1E,0x0D,0x01,0x00,0xF0,0xF8,0x08,0x88,0xF0,0xF8,0x08,0x00,
/*-- ID:7,??:"'",ASCII??:27,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x04,0x7C,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*-- ID:8,??:"(",ASCII??:28,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x07,0x0F,0x18,0x10,0x00,0x00,0x00,0x00,0xE0,0xF0,0x18,0x08,0x00,0x00,
/*-- ID:9,??:")",ASCII??:29,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x10,0x18,0x0F,0x07,0x00,0x00,0x00,0x00,0x08,0x18,0xF0,0xE0,0x00,0x00,
/*-- ID:10,??:"*",ASCII??:2A,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x02,0x03,0x01,0x01,0x03,0x02,0x00,0x80,0xA0,0xE0,0xC0,0xC0,0xE0,0xA0,0x80,
/*-- ID:11,??:"+",ASCII??:2B,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x00,0x00,0x80,0x80,0xE0,0xE0,0x80,0x80,0x00,
/*-- ID:12,??:",",ASCII??:2C,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x3C,0x38,0x00,0x00,0x00,
/*-- ID:13,??:"-",ASCII??:2D,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,
/*-- ID:14,??:".",ASCII??:2E,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,
/*-- ID:15,??:"/",ASCII??:2F,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x00,0x00,0x00,0x01,0x03,0x06,0x00,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,
/*-- ID:16,??:"0",ASCII??:30,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x0F,0x1F,0x10,0x11,0x12,0x1F,0x0F,0x00,0xF0,0xF8,0x48,0x88,0x08,0xF8,0xF0,0x00,
/*-- ID:17,??:"1",ASCII??:31,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x00,0x04,0x0C,0x1F,0x1F,0x00,0x00,0x00,0x00,0x08,0x08,0xF8,0xF8,0x08,0x08,0x00,
/*-- ID:18,??:"2",ASCII??:32,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x08,0x18,0x10,0x11,0x13,0x1E,0x0C,0x00,0x38,0x78,0xC8,0x88,0x08,0x18,0x18,0x00,
/*-- ID:19,??:"3",ASCII??:33,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x08,0x18,0x11,0x11,0x11,0x1F,0x0E,0x00,0x10,0x18,0x08,0x08,0x08,0xF8,0xF0,0x00,
/*-- ID:20,??:"4",ASCII??:34,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x01,0x03,0x06,0x0C,0x1F,0x1F,0x00,0x00,0x80,0x80,0x80,0x88,0xF8,0xF8,0x88,0x00,
/*-- ID:21,??:"5",ASCII??:35,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x1F,0x1F,0x11,0x11,0x11,0x11,0x10,0x00,0x10,0x18,0x08,0x08,0x88,0xF8,0xF0,0x00,
/*-- ID:22,??:"6",ASCII??:36,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x07,0x0F,0x19,0x11,0x11,0x01,0x00,0x00,0xF0,0xF8,0x08,0x08,0x08,0xF8,0xF0,0x00,
/*-- ID:23,??:"7",ASCII??:37,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x18,0x18,0x10,0x10,0x11,0x1F,0x1E,0x00,0x00,0x00,0x78,0xF8,0x80,0x00,0x00,0x00,
/*-- ID:24,??:"8",ASCII??:38,???:?x?=8x16,??:?W=8 ?H=16,?16??*/
0x0E,0x1F,0x11,0x11,0x11,0x1F,0x0E,0x00,0xF0,0xF8,0x08,0x08,0x08</