您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 酒店餐饮 > lcd12864显示图片程序
#includereg51.h//51单片机常用寄存器定义#includeabsacc.h//解析XBYTE宏定义#defineDISPON0x3f//显示开#defineDISPOFF0x3e//显示关,参考指令表显示开关设置#defineFIRSTROW0xc0//显示关,参考指令表显示开关设置#defineSETY0xb8//Y方向,8页64行,参考指令表,[2..0]在0到8页选择#defineSETX0x40//Y方向,8页64行,参考指令表,[2..0]在0到8页选择/*与硬件相关的编址设计*//*左屏命令和数据读写编址*//*P2+P0口16位有效编址,有效位是P2.3~P2.0,无关位用“1”表示*//*P2.0—RS*//*P2.1—R/W*//*P2.2—CS1*//*P2.3—CS2*/#defineLLCD_CMD_WRXBYTE[0xf4f0]#defineLLCD_DAT_WRXBYTE[0xf5f0]#defineLLCD_CMD_RDXBYTE[0xf6f0]#defineLLCD_DAT_RDXBYTE[0xf7f0]/*左屏命令和数据读写编址*/#defineRLCD_CMD_WRXBYTE[0xf8f0]#defineRLCD_DAT_WRXBYTE[0xf9f0]#defineRLCD_CMD_RDXBYTE[0xfaf0]#defineRLCD_DAT_RDXBYTE[0xfbf0]sbitK1=P1^0;sbitK2=P1^1;/*延时子程序*/voiddelay(unsignedchartimer){unsignedchari;while(--timer)for(i=0;i100;i++);}codeunsignedcharlogo[]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0xFF,0xFF,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