- 1、本文档共10页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
/*12864zw 实例教程,包括自定义字符,图片显示等等*/
#includereg52.h
#include intrins.h
sbit RS=P2^2;//串口时为CS
sbit RW=P2^3; //串口为SID
sbit E=P2^4; //串口为时钟SCLK //
sbit stop=P3^2;
sbit PSB=P2^5;
sbit REST=P2^7;
//以下是用at89x51.h头文件的定义
/* #define RS P2_0
#define RW P2_3 //定义引脚
#define E P2_4 #define PSB P2_3
#define REST P2_7
#define Data P0
#includeat89x51.h */
#define BF 0x80
//用于检测LCM状态字中的Busy标识
typedef unsigned int Uint;
typedef unsigned char Uchar;
//字符串例子
//F1--English,也可以往里面写入汉字码,一个汉字由两个码组成
const Uchar F1English[]={0x46,0x31,0x2d,0x2d,0x45,0x6e,0x67,0x6c,0x69,0x73,0x68, 0x00};
const Uchar lengthF1=6; //字符串长度
//汉字,直接可以写入字形
unsigned char code uctech[] = {曾小贤愚人节快乐};
const Uchar lengthCF3=8;
Uchar code TAB1[]={
/*-- 调入了一幅图像:C:\Documents and Settings\Administrator\桌面
\12864.bmp --*/
/*-- 宽度x高度=128x64 --*/
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0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