📄 define.c
字号:
#include <reg51.h>
#include <stdio.h>
#include <math.h>
#include <absacc.h>
/* 直接访问方式地址定义,根据用户平台接口修改 */
#define cwadd XBYTE[0x0000] /* 写指令代码地址 */
#define cradd XBYTE[0x0200] /* 写显示数据地址 */
#define dwadd XBYTE[0x0100] /* 读显示数据地址 */
#define dradd XBYTE[0x0300] /* 读忙状态地址 */
/* 定义标志位 */
sbit ACC_7=ACC^7;
/* 设为全局变量 */
unsigned int com,dat;
/*-----------光标移动演示用字库-----------*/
unsigned int TABCL[18]={0x43,0x75,0x72,0x73,0x6f,0x72,0x20,0x4c,0x65,0x66,0x74,0x20,0x53,0x63,0x72,0x6f,0x6c,0x6c};
/*-----------画面滚动演示用字库----------*/
unsigned int TABL[11]={0x4c,0x65,0x66,0x74,0x20,0x53,0x63,0x72,0x6f,0x6c,0x6c};
/*-----------建立自定义演示用字符库-----------*/
code unsigned int CGTAB[9][8]={0x08,0x0f,0x12,0x0f,0x0a,0x1f,0x02,0x02, /* "↓"代码=0 */
0x0f,0x09,0x0f,0x09,0x0f,0x09,0x11,0x00, /* "月"代码=1 */
0x1f,0x11,0x11,0x1f,0x11,0x11,0x1f,0x00, /* "日"代码=2 */
0x11,0x0a,0x04,0x1f,0x04,0x1f,0x04,0x00, /* "¥"代码=3 */
0x0e,0x00,0x1f,0x0a,0x0a,0x0a,0x13,0x00, /* "元"代码=4 */
0x18,0x18,0x07,0x08,0x08,0x08,0x07,0x00, /* "℃"代码=5 */
0x04,0x0a,0x15,0x04,0x04,0x04,0x04,0x00, /* "↑"代码=6 */
0x17,0x15,0x15,0x15,0x15,0x15,0x17,0x00, /* "10"代码=7 */
0x04,0x04,0x04,0x04,0x15,0x0a,0x04,0x00 }; /* "↓"代码=8 */
/*-----------自定义字符显示用字库-----------*/
code unsigned int TABDY[4][9]={0x4d,0x44,0x4c,0x53,0x34,0x30,0x32,0x36,0x36,
0x20,0x03,0x32,0x35,0x35,0x2e,0x30,0x30,0x04,
0x31,0x39,0x39,0x37,0x00,0x37,0x01,0x31,0x02,
0x20,0x54,0x3d,0x33,0x35,0x05,0x06,0x20,0x07};
/*-----------修改错误显示演示用字库-----------*/
/* 首先写入Modification,但第二个"o"误写为"0" */
code unsigned int RDTAB[12]={0x4d,0x6f,0x64,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x30,0x6e};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -