12864液晶显示程序
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
12864液晶显示程序
由北京迪特福科技编撰提供
#include
#include
sbit RS = P2^5;
sbit RW = P2^6;
sbit E = P2^7;
sbit RES = P3^5;
#define Lcd_Bus P0 //MCU P1<------> LCM
#define FIRST_ADDR 0 //定义字符/汉字显示起始位置
unsigned char code zk[]={
0x08,0x20,0x1c,0x10,0x1c,0x1c,0xff,0x9e,0x7f,0x1e,0x1c,0x1f,0x3e,0x1f ,0x3e,0x1f,
0x77,0x1f,0x41,0x3f,0x00,0x7e,0x00,0xfe,0x83,0xfc,0x7f,0xf8,0x3f,0xf0 ,0x0f,0xc0,
};
unsigned char code BMP1[]={
/*-- 调入了一幅图像:D:\3033B\3033.bmp --*/
/*-- 宽度x高度=128x64 --*/
/*--总共52行数据,每行16个数据--*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x0C,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x08,0x00,0x00,0x00,0x00,0x00,0x07,0xF1,0x00,0x03,0x01,0x00,0xF0,0x00 ,0x00,0x00,
0x18,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x00,0x03,0x81,0x08,0x98,0x00 ,0x00,0x00,
0x10,0x1F,0x07,0x06,0x00,0x00,0x08,0x01,0x00,0x04,0x81,0x11,0x88,0x00 ,0x00,0x00,
0x10,0x21,0x0D,0x83,0xE3,0xC0,0x0F,0x02,0x00,0x04,0xC1,0x31,0x30,0x00 ,0x00,0x00,
0x10,0x21,0x18,0x83,0x06,0x40,0x09,0x82,0x00,0x0F,0xC1,0x21,0xE0,0x00 ,0x00,0x00,
0x10,0x2E,0x11,0x86,0x06,0x40,0x00,0x86,0x00,0x08,0x43,0xC3,0xE0,0x00 ,0x00,0x00,
0x30,0x30,0x11,0x86,0x04,0x40,0x41,0x84,0x10,0x18,0x63,0x82,0x18,0x00 ,0x00,0x00,
0x20,0x1E,0x1F,0x84,0x04,0x60,0x7E,0x04,0x08,0x10,0x23,0x04,0x0E,0x00 ,0x00,0x00,
0x3F,0x83,0x00,0xE0,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x02,0x00 ,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x38,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x6C,0x3C,0x00,0x20,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x42,0x22,0x03,0xFD,0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x40,0x62,0x00,0x22,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x46,0x42,0x00,0x22,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,
0x00,0x00,0x44,0x42,0x00,0x23,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,