⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showfun.c

📁 proteus仿真实例大全
💻 C
📖 第 1 页 / 共 2 页
字号:

/************************************************************************************/
/* LCM 240128 显示程序 */
/* MCU 型号: Winbond W78E58-24 */
/* 时钟频率: 22.1184 MHz */
/* 接口方式: 直接接口(挂总线) */
/* 开发环境: Keil C51 V6.14 */
/* 开发日期: 2001.06.12- */
/* 程序编写: Youth */
/************************************************************************************/

#include <stdarg.h>
#include <stdio.h>
#include <math.h>
#include <intrins.h>
#include <absacc.h>
#include <string.h>
#include <showfun.h>



code uchar const uPowArr[] = {0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};

// ASCII 字模宽度及高度定义
#define ASC_CHR_WIDTH 8
#define ASC_CHR_HEIGHT 12
#define HZ_CHR_HEIGHT 12
#define HZ_CHR_WIDTH 12

char code MSK1[]={0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};
char code MSK2[]={0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};
char code ASC_MSK[96*12] = {
// Terminal9; 此字体下对应的点阵为:宽x高=8x12
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff, // < 0x20时,打印此字
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// ' '
0x00,0x30,0x78,0x78,0x78,0x30,0x30,0x00,0x30,0x30,0x00,0x00,// '!'
0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '"'
0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,// '#'
0x30,0x30,0x7c,0xc0,0xc0,0x78,0x0c,0x0c,0xf8,0x30,0x30,0x00,// '$'
0x00,0x00,0x00,0xc4,0xcc,0x18,0x30,0x60,0xcc,0x8c,0x00,0x00,// '%'
0x00,0x70,0xd8,0xd8,0x70,0xfa,0xde,0xcc,0xdc,0x76,0x00,0x00,// '&'
0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '''
0x00,0x0c,0x18,0x30,0x60,0x60,0x60,0x30,0x18,0x0c,0x00,0x00,// '('
0x00,0x60,0x30,0x18,0x0c,0x0c,0x0c,0x18,0x30,0x60,0x00,0x00,// ')'
0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,// '*'
0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,// '+'
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x60,0x00,// ','
0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,// '-'
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x00,0x00,// '.'
0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00,// '/'
0x00,0x7c,0xc6,0xce,0xde,0xd6,0xf6,0xe6,0xc6,0x7c,0x00,0x00,// '0'
0x00,0x10,0x30,0xf0,0x30,0x30,0x30,0x30,0x30,0xfc,0x00,0x00,// '1'
0x00,0x78,0xcc,0xcc,0x0c,0x18,0x30,0x60,0xcc,0xfc,0x00,0x00,// '2'
0x00,0x78,0xcc,0x0c,0x0c,0x38,0x0c,0x0c,0xcc,0x78,0x00,0x00,// '3'
0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x1e,0x00,0x00,// '4'
0x00,0xfc,0xc0,0xc0,0xc0,0xf8,0x0c,0x0c,0xcc,0x78,0x00,0x00,// '5'
0x00,0x38,0x60,0xc0,0xc0,0xf8,0xcc,0xcc,0xcc,0x78,0x00,0x00,// '6'
0x00,0xfe,0xc6,0xc6,0x06,0x0c,0x18,0x30,0x30,0x30,0x00,0x00,// '7'
0x00,0x78,0xcc,0xcc,0xec,0x78,0xdc,0xcc,0xcc,0x78,0x00,0x00,// '8'
0x00,0x78,0xcc,0xcc,0xcc,0x7c,0x18,0x18,0x30,0x70,0x00,0x00,// '9'
0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x38,0x38,0x00,0x00,0x00,// ':'
0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x38,0x38,0x18,0x30,0x00,// ';'
0x00,0x0c,0x18,0x30,0x60,0xc0,0x60,0x30,0x18,0x0c,0x00,0x00,// '<'
0x00,0x00,0x00,0x00,0x7e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,// '='
0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,// '>'
0x00,0x78,0xcc,0x0c,0x18,0x30,0x30,0x00,0x30,0x30,0x00,0x00,// '?'
0x00,0x7c,0xc6,0xc6,0xde,0xde,0xde,0xc0,0xc0,0x7c,0x00,0x00,// '@'
0x00,0x30,0x78,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0x00,0x00,// 'A'
0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00,// 'B'
0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xc0,0xc6,0x66,0x3c,0x00,0x00,// 'C'
0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00,// 'D'
0x00,0xfe,0x62,0x60,0x64,0x7c,0x64,0x60,0x62,0xfe,0x00,0x00,// 'E'
0x00,0xfe,0x66,0x62,0x64,0x7c,0x64,0x60,0x60,0xf0,0x00,0x00,// 'F'
0x00,0x3c,0x66,0xc6,0xc0,0xc0,0xce,0xc6,0x66,0x3e,0x00,0x00,// 'G'
0x00,0xcc,0xcc,0xcc,0xcc,0xfc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,// 'H'
0x00,0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,// 'I'
0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78,0x00,0x00,// 'J'
0x00,0xe6,0x66,0x6c,0x6c,0x78,0x6c,0x6c,0x66,0xe6,0x00,0x00,// 'K'
0x00,0xf0,0x60,0x60,0x60,0x60,0x62,0x66,0x66,0xfe,0x00,0x00,// 'L'
0x00,0xc6,0xee,0xfe,0xfe,0xd6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,// 'M'
0x00,0xc6,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0x00,0x00,// 'N'
0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00,0x00,// 'O'
0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0xf0,0x00,0x00,// 'P'
0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xce,0xde,0x7c,0x0c,0x1e,0x00,// 'Q'
0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0xe6,0x00,0x00,// 'R'
0x00,0x78,0xcc,0xcc,0xc0,0x70,0x18,0xcc,0xcc,0x78,0x00,0x00,// 'S'
0x00,0xfc,0xb4,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,// 'T'
0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,// 'U'
0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x00,0x00,// 'V'
0x00,0xc6,0xc6,0xc6,0xc6,0xd6,0xd6,0x6c,0x6c,0x6c,0x00,0x00,// 'W'
0x00,0xcc,0xcc,0xcc,0x78,0x30,0x78,0xcc,0xcc,0xcc,0x00,0x00,// 'X'
0x00,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x30,0x30,0x78,0x00,0x00,// 'Y'
0x00,0xfe,0xce,0x98,0x18,0x30,0x60,0x62,0xc6,0xfe,0x00,0x00,// 'Z'
0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00,// '['
0x00,0x00,0x80,0xc0,0x60,0x30,0x18,0x0c,0x06,0x02,0x00,0x00,// '\'
0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00,// ']'
0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '^'
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,// '_'
0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '`'
0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0x76,0x00,0x00,// 'a'
0x00,0xe0,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,// 'b'
0x00,0x00,0x00,0x00,0x78,0xcc,0xc0,0xc0,0xcc,0x78,0x00,0x00,// 'c'
0x00,0x1c,0x0c,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,// 'd'
0x00,0x00,0x00,0x00,0x78,0xcc,0xfc,0xc0,0xcc,0x78,0x00,0x00,// 'e'
0x00,0x38,0x6c,0x60,0x60,0xf8,0x60,0x60,0x60,0xf0,0x00,0x00,// 'f'
0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0x7c,0x0c,0xcc,0x78,// 'g'
0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0xe6,0x00,0x00,// 'h'
0x00,0x18,0x18,0x00,0x78,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,// 'i'
0x00,0x0c,0x0c,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0x78,// 'j'
0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x6c,0x66,0xe6,0x00,0x00,// 'k'
0x00,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,// 'l'
0x00,0x00,0x00,0x00,0xfc,0xd6,0xd6,0xd6,0xd6,0xc6,0x00,0x00,// 'm'
0x00,0x00,0x00,0x00,0xf8,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,// 'n'
0x00,0x00,0x00,0x00,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,// 'o'
0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x7c,0x60,0xf0,// 'p'
0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x1e,// 'q'
0x00,0x00,0x00,0x00,0xec,0x6e,0x76,0x60,0x60,0xf0,0x00,0x00,// 'r'
0x00,0x00,0x00,0x00,0x78,0xcc,0x60,0x18,0xcc,0x78,0x00,0x00,// 's'
0x00,0x00,0x20,0x60,0xfc,0x60,0x60,0x60,0x6c,0x38,0x00,0x00,// 't'
0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,// 'u'
0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0x78,0x30,0x00,0x00,// 'v'
0x00,0x00,0x00,0x00,0xc6,0xc6,0xd6,0xd6,0x6c,0x6c,0x00,0x00,// 'w'
0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x38,0x6c,0xc6,0x00,0x00,// 'x'
0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x3c,0x0c,0x18,0xf0,// 'y'
0x00,0x00,0x00,0x00,0xfc,0x8c,0x18,0x60,0xc4,0xfc,0x00,0x00,// 'z'
0x00,0x1c,0x30,0x30,0x60,0xc0,0x60,0x30,0x30,0x1c,0x00,0x00,// '{'
0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00,0x00,// '|'
0x00,0xe0,0x30,0x30,0x18,0x0c,0x18,0x30,0x30,0xe0,0x00,0x00,// '}'
0x00,0x73,0xda,0xce,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// '~'
};

typedef struct typFNT_GB16 // 汉字字模显示数据结构
{
char Index[2];
char Msk[24];
};
struct typFNT_GB16 code GB_16[] = { // 显示为12*12
"中",0x04,0x00,0x04,0x00,0x7F,0xC0,0x44,0x40,0x44,0x40,0x44,0x40,0x7F,0xC0,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00,
"文",0x08,0x00,0x04,0x40,0xFF,0xE0,0x11,0x00,0x11,0x00,0x11,0x00,0x0A,0x00,0x0A,0x00,0x04,0x00,0x1B,0x00,0xE0,0xE0,0x00,0x00,
"测",0x9E,0x20,0x52,0x20,0x12,0xA0,0x96,0xA0,0x56,0xA0,0x56,0xA0,0x56,0xA0,0xD6,0xA0,0x44,0xA0,0x4A,0x20,0x71,0x60,0x00,0x00,
"试",0x80,0xC0,0x40,0xA0,0x5F,0xE0,0x00,0x80,0xC0,0x80,0x4F,0x80,0x44,0x80,0x44,0x80,0x57,0xA0,0x6C,0x60,0x40,0x20,0x00,0x00,
"液",0x81,0x00,0x5F,0xE0,0x25,0x00,0x85,0xC0,0xAA,0x40,0x4E,0xC0,0x5A,0x40,0x49,0x80,0xC8,0x80,0x49,0x40,0x4E,0x20,0x00,0x00,
"晶",0x1F,0x80,0x10,0x80,0x1F,0x80,0x10,0x80,0x1F,0x80,0x00,0x00,0x7B,0xE0,0x4A,0x20,0x7B,0xE0,0x4A,0x20,0x7B,0xE0,0x00,0x00,
"显",0x3F,0x80,0x20,0x80,0x3F,0x80,0x20,0x80,0x3F,0x80,0x00,0x00,0x4A,0x40,0x2A,0x40,0x2A,0x80,0x0B,0x00,0xFF,0xE0,0x00,0x00,
"示",0x00,0x80,0x7F,0xC0,0x00,0x00,0x00,0x00,0xFF,0xE0,0x04,0x00,0x14,0x80,0x24,0x40,0x44,0x20,0x84,0x20,0x1C,0x00,0x00,0x00,
//"及",0x7F,0x80,0x10,0x80,0x11,0x00,0x11,0x00,0x19,0xC0,0x14,0x40,0x14,0x80,0x23,0x00,0x23,0x00,0x4C,0x80,0xB0,0x60,0x00,0x00,
//"的",0x11,0x00,0x21,0x00,0xFB,0xE0,0x8A,0x20,0x8C,0x20,0x8A,0x20,0xF9,0x20,0x89,0x20,0x88,0x20,0xF8,0x20,0x89,0xC0,0x00,0x00,
//"试",0x80,0xC0,0x40,0xA0,0x5F,0xE0,0x00,0x80,0xC0,0x80,0x4F,0x80,0x44,0x80,0x44,0x80,0x57,0xA0,0x6C,0x60,0x40,0x20,0x00,0x00,
//"验",0xF1,0x00,0x11,0x00,0x52,0x80,0x54,0x40,0x5B,0xA0,0xF0,0x00,0x15,0x40,0x35,0x40,0xD5,0x40,0x10,0x80,0x6F,0xE0,0x00,0x00,
//"程",0x37,0xC0,0xE4,0x40,0x24,0x40,0xF7,0xC0,0x20,0x00,0x6F,0xE0,0x71,0x00,0xA7,0xC0,0xA1,0x00,0x21,0x00,0x2F,0xE0,0x00,0x00,
//"序",0x04,0x00,0x7F,0xE0,0x40,0x00,0x5F,0x80,0x45,0x00,0x42,0x00,0x7F,0xE0,0x42,0x40,0x42,0x00,0x82,0x00,0x8E,0x00,0x00,0x00,
"键",0x41,0x00,0x7F,0xC0,0x89,0x40,0xEB,0xE0,0x5D,0x40,0x47,0xC0,0xF5,0x00,0x57,0xE0,0x49,0x00,0x6D,0x00,0x53,0xE0,0x00,0x00,
"盘",0x08,0x00,0x3F,0x80,0x24,0x80,0xFF,0xE0,0x28,0x80,0x25,0x80,0x40,0x00,0xBF,0xC0,0x2A,0x40,0x2A,0x40,0xFF,0xE0,0x00,0x00,
//"字",0x04,0x00,0x7F,0xE0,0xC0,0x20,0x3F,0x80,0x02,0x00,0x04,0x00,0xFF,0xE0,0x04,0x00,0x04,0x00,0x04,0x00,0x1C,0x00,0x00,0x00,
//"可",0x00,0x40,0xFF,0xE0,0x00,0x80,0x7C,0x80,0x44,0x80,0x44,0x80,0x44,0x80,0x7C,0x80,0x44,0x80,0x00,0x80,0x03,0x80,0x00,0x00,
//"以",0x00,0x80,0x48,0x80,0x44,0x80,0x44,0x80,0x40,0x80,0x40,0x80,0x48,0x80,0x50,0x80,0x61,0x40,0x46,0x20,0x18,0x20,0x00,0x00,
"按",0x21,0x00,0x2F,0xE0,0xF8,0x20,0x22,0x00,0x32,0x00,0x6F,0xE0,0xA4,0x40,0x24,0x80,0x23,0x80,0x21,0x40,0xEE,0x20,0x00,0x00,
"点",0x04,0x00,0x07,0xC0,0x04,0x00,0x04,0x00,0x3F,0x80,0x20,0x80,0x20,0x80,0x3F,0x80,0x00,0x00,0x49,0x40,0xC9,0x20,0x00,0x00,
"定",0x04,0x00,0x7F,0xE0,0xC0,0x20,0x00,0x00,0x7F,0xC0,0x04,0x00,0x24,0x00,0x27,0xC0,0x34,0x00,0x4C,0x00,0x83,0xE0,0x00,0x00,
"位",0x24,0x00,0x22,0x00,0x5F,0xE0,0x40,0x00,0xC8,0x80,0x48,0x80,0x44,0x80,0x45,0x00,0x45,0x00,0x41,0x00,0x5F,0xE0,0x00,0x00,
"直",0x04,0x00,0xFF,0xE0,0x04,0x00,0x3F,0x80,0x20,0x80,0x20,0x80,0x3F,0x80,0x20,0x80,0x3F,0x80,0x20,0x80,0xFF,0xE0,0x00,0x00,
"线",0x22,0x80,0x22,0x40,0x52,0x60,0x97,0x80,0xE2,0x60,0x4F,0x80,0xB2,0x40,0xC2,0x80,0x31,0x20,0xC6,0xA0,0x18,0x60,0x00,0x00,
"绘",0x21,0x00,0x21,0x00,0x52,0x80,0x94,0x40,0xEB,0xA0,0x20,0x00,0x5F,0xE0,0xE2,0x00,0x02,0x80,0xF4,0x40,0x8F,0xE0,0x00,0x00,
"制",0x10,0x20,0x54,0x20,0x7E,0xA0,0x90,0xA0,0xFE,0xA0,0x10,0xA0,0x7E,0xA0,0x52,0xA0,0x52,0x20,0x56,0x20,0x10,0xE0,0x00,0x00,
"图",0x7F,0xE0,0x48,0x20,0x5F,0x20,0x6A,0x20,0x44,0x20,0x4A,0x20,0x75,0xA0,0x42,0x20,0x4C,0x20,0x42,0x20,0x7F,0xE0,0x00,0x00,
"片",0x22,0x00,0x22,0x00,0x22,0x00,0x3F,0xE0,0x20,0x00,0x20,0x00,0x3F,0x00,0x21,0x00,0x21,0x00,0x41,0x00,0x81,0x00,0x00,0x00,
"绘",0x21,0x00,0x21,0x00,0x52,0x80,0x94,0x40,0xEB,0xA0,0x20,0x00,0x5F,0xE0,0xE2,0x00,0x02,0x80,0xF4,0x40,0x8F,0xE0,0x00,0x00,
"制",0x10,0x20,0x54,0x20,0x7E,0xA0,0x90,0xA0,0xFE,0xA0,0x10,0xA0,0x7E,0xA0,0x52,0xA0,0x52,0x20,0x56,0x20,0x10,0xE0,0x00,0x00,

"流",0x82,0x00,0x5F,0xE0,0x42,0x00,0x04,0x80,0xAF,0xC0,0x60,0x40,0x2A,0x80,0x4A,0x80,0xCA,0xA0,0x52,0xA0,0x62,0xE0,0x00,0x00,
"电",0x04,0x00,0x04,0x40,0x7F,0xE0,0x44,0x40,0x7F,0xC0,0x44,0x40,0x44,0x40,0x7F,0xC0,0x44,0x00,0x04,0x20,0x03,0xE0,0x00,0x00,
"机",0x20,0x80,0x27,0xC0,0xFC,0x80,0x24,0x80,0x24,0x80,0x74,0x80,0x6C,0x80,0xA4,0x80,0xA4,0xA0,0x28,0xA0,0x30,0xE0,0x00,0x00,
"加",0x20,0x00,0x20,0x00,0xFD,0xE0,0x25,0x20,0x25,0x20,0x25,0x20,0x25,0x20,0x25,0x20,0x45,0x20,0x45,0xE0,0x99,0x20,0x00,0x00,
"减",0x81,0x40,0x41,0x40,0x5F,0xE0,0x11,0x00,0x5F,0x20,0x51,0x20,0x9F,0x40,0x9A,0x80,0xAE,0xA0,0xA9,0x60,0x42,0x20,0x00,0x00,
"速",0x82,0x00,0x5F,0xE0,0x42,0x00,0x0F,0xC0,0xCA,0x40,0x4F,0xC0,0x43,0x00,0x46,0x80,0x5A,0x40,0xA2,0x00,0x9F,0xE0,0x00,0x00,
"及",0x7F,0x80,0x10,0x80,0x11,0x00,0x11,0x00,0x19,0xC0,0x14,0x40,0x14,0x80,0x23,0x00,0x23,0x00,0x4C,0x80,0xB0,0x60,0x00,0x00,

"系",0x03,0xC0,0x7C,0x00,0x08,0x80,0x3F,0x00,0x04,0x00,0x08,0x80,0x3F,0xC0,0x15,0x00,0x24,0x80,0x44,0x40,0x9C,0x20,0x00,0x00,
"统",0x21,0x00,0x27,0xE0,0x51,0x00,0xF2,0x00,0x24,0x40,0x47,0xE0,0xF2,0x80,0x02,0x80,0x32,0xA0,0xC4,0xA0,0x18,0xE0,0x00,0x00,
"步",0x04,0x00,0x27,0xC0,0x24,0x00,0x24,0x00,0xFF,0xE0,0x04,0x00,0x14,0x40,0x24,0x80,0x41,0x00,0x06,0x00,0x78,0x00,0x00,0x00,
"长",0x20,0x80,0x21,0x00,0x22,0x00,0x24,0x00,0x28,0x00,0xFF,0xE0,0x24,0x00,0x22,0x00,0x21,0x00,0x2C,0x80,0x30,0x60,0x00,0x00,
"顺",0x57,0xE0,0x51,0x00,0x57,0xE0,0x54,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x55,0x20,0x51,0x80,0x92,0x40,0x8C,0x20,0x00,0x00,
"时",0x00,0x80,0xF0,0x80,0x9F,0xE0,0x90,0x80,0x94,0x80,0xF2,0x80,0x92,0x80,0x90,0x80,0xF0,0x80,0x90,0x80,0x03,0x80,0x00,0x00,
"针",0x41,0x00,0x41,0x00,0x79,0x00,0x81,0x00,0xF7,0xE0,0x21,0x00,0xF9,0x00,0x21,0x00,0x29,0x00,0x31,0x00,0x21,0x00,0x00,0x00,
"旋",0x42,0x00,0x23,0xE0,0xF4,0x00,0x4F,0xE0,0x71,0x20,0x55,0x40,0x55,0x00,0x55,0xE0,0x55,0x00,0xB7,0x00,0x89,0xE0,0x00,0x00,
"转",0x21,0x00,0xF9,0x00,0x47,0xE0,0x61,0x00,0xA7,0xE0,0xFA,0x00,0x23,0xC0,0x38,0x40,0xE0,0x80,0x23,0x00,0x20,0x80,0x00,0x00,
"逆",0x84,0x40,0x42,0x80,0x5F,0xE0,0x01,0x00,0xC9,0x40,0x49,0x40,0x4F,0xC0,0x42,0x00,0x44,0x00,0xA8,0x00,0x9F,0xE0,0x00,0x00,

//"旋",0x42,0x00,0x23,0xE0,0xF4,0x00,0x4F,0xE0,0x71,0x20,0x55,0x40,0x55,0x00,0x55,0xE0,0x55,0x00,0xB7,0x00,0x89,0xE0,0x00,0x00,
//"转",0x21,0x00,0xF9,0x00,0x47,0xE0,0x61,0x00,0xA7,0xE0,0xFA,0x00,0x23,0xC0,0x38,0x40,0xE0,0x80,0x23,0x00,0x20,0x80,0x00,0x00,
"方",0x04,0x00,0x02,0x40,0xFF,0xE0,0x08,0x00,0x0F,0x80,0x08,0x80,0x08,0x80,0x10,0x80,0x10,0x80,0x20,0x80,0xC7,0x00,0x00,0x00,
"向",0x04,0x00,0x08,0x40,0x7F,0xE0,0x40,0x40,0x5F,0x40,0x51,0x40,0x51,0x40,0x5F,0x40,0x40,0x40,0x40,0x40,0x41,0xC0,0x00,0x00,

//"时",
//"针",
};

uchar gCurRow,gCurCol; // 图形当前行、列存储,行高16点,列宽8点
uchar tCurRow,tCurCol; // 文本当前行、列存储,行高8点 ,列宽8点
uchar ShowModeSW; // 当前显示模式
uint txthome,grhome;

/******************************************************************************/
uchar fnGetRow();
uchar fnGetCol();
uchar fnST01(); // 状态位STA1,STA0判断(读写指令和读写数据)
uchar fnST2(); // 状态位ST2判断(数据自动读状态)
uchar fnST3(); // 状态位ST3判断(数据自动写状态)
uchar fnST6(); // 状态位ST6判断(屏读/屏拷贝状态)
uchar fnPR1(uchar uCmd,uchar uPar1,uchar uPar2); // 写双参数的指令
uchar fnPR11(uchar uCmd,uchar uPar1); // 写单参数的指令
uchar fnPR12(uchar uCmd); // 写无参数的指令
uchar fnPR13(uchar uData); // 写数据
uchar fnPR2(); // 读数据
void fnSetPos(uchar urow, uchar ucol);	// 设置当前地址
void cursor(uchar uRow, uchar uCol); 	//设置当前显示行、列
void at(unsigned char x,unsigned char y);/*设定文本x,y值*/
void cls();	 // 清屏
char fnLCMInit(); // LCM 初始化
void charout(uchar *str); //ASCII(8*8) 显示函数
uchar dprintf(uchar x,uchar y,char *fmt);// ASCII(8*16) 及 汉字(16*16) 显示函数
void OutToLCD(uchar Dat,uchar x,uchar y);//显示辅助函数 

void SetShowMode(uchar newShowModeSW);	
void Line( unsigned char x1, unsigned char y1, unsigned char x2, unsigned char y2, bit Mode);
void Pixel(unsigned char PointX,unsigned char PointY, bit Mode);

uchar fnGetRow(void)
{
	return gCurRow;
}

uchar fnGetCol(void)
{
	return gCurCol;
}

uchar fnST01(void) // 状态位STA1,STA0判断(读写指令和读写数据)
{
	uchar i;
	
	for(i=10;i>0;i--)
	{
		if((LCMCW & 0x03) == 0x03)
		break;
	}
	return i; // 若返回零,说明错误
}

uchar fnST2(void) // 状态位ST2判断(数据自动读状态)
{
	uchar i;
	
	for(i=10;i>0;i--)
	{
		if((LCMCW & 0x04) == 0x04)
		break;
	}
	return i; // 若返回零,说明错误
}

uchar fnST3(void) // 状态位ST3判断(数据自动写状态)
{
	uchar i;
	
	for(i=10;i>0;i--)
	{
		if((LCMCW & 0x08) == 0x08)
		break;
	}
	return i; // 若返回零,说明错误
}

uchar fnST6(void) // 状态位ST6判断(屏读/屏拷贝状态)
{
	uchar i;
	
	for(i=10;i>0;i--)
	{
		if((LCMCW & 0x40) == 0x40)
		break;
	}
	return i; // 若返回零,说明错误
}

uchar fnPR1(uchar uCmd,uchar uPar1,uchar uPar2) // 写双参数的指令
{
	if(fnST01() == 0)
	return 1;
	LCMDW = uPar1;
	if(fnST01() == 0)
	return 2;
	LCMDW = uPar2;
	if(fnST01() == 0)
	return 3;
	LCMCW = uCmd;
	return 0; // 返回0成功
}

uchar fnPR11(uchar uCmd,uchar uPar1) // 写单参数的指令
{
	if(fnST01() == 0)
	return 1;
	LCMDW = uPar1;
	if(fnST01() == 0)
	return 2;
	LCMCW = uCmd;
	return 0; // 返回0成功
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -