12864液晶显示程序(图案文字)

合集下载

12864液晶屏使用手册

12864液晶屏使用手册

12864液晶屏手册一、液晶显示模块概述12864A-1汉字图形点阵液晶显示模块,可显示汉字及图形,内置8192个中文汉字(16X16点阵,16*8=128,16*4=64,一行只能写8个汉字,4行;)、128个字符(8X16点阵)及64X256点阵显示RAM(GDRAM)。

主要技术参数和显示特性:电源:VDD ~+5V(内置升压电路,无需负压);显示内容:128列×64行(128表示点数)显示颜色:黄绿显示角度:6:00钟直视LCD类型:STN与MCU接口:8位或4位并行/3位串行配置LED背光多种软件功能:光标显示、画面移位、自定义字符、睡眠模式等二、外形尺寸1.外形尺寸图2.主要外形尺寸项目标准尺寸单位模块体积××mm二、模块引脚说明逻辑工作电压(VDD):~电源地(GND):0V工作温度(Ta):0~60℃(常温) / -20~75℃(宽温)三、接口时序模块有并行和串行两种连接方法(时序如下):8位并行连接时序图MPU写资料到模块MPU从模块读出资料2、串行连接时序图串行数据传送共分三个字节完成:第一字节:串口控制—格式11111ABCA为数据传送方向控制:H表示数据从LCD到MCU,L表示数据从MCU到LCDB为数据类型选择:H表示数据是显示数据,L表示数据是控制指令C固定为0第二字节:(并行)8位数据的高4位—格式DDDD0000第三字节:(并行)8位数据的低4位—格式0000DDDD串行接口时序参数:(测试条件:T=25℃VDD=备注:1、当模块在接受指令前,微处理顺必须先确认模块内部处于非忙碌状态,即读取BF标志时BF需为0,方可接受新的指令;如果在送出一个指令前并不检查BF标志,(一般在输入每天指令前加个delay)那么在前一个指令和这个指令中间必须延迟一段较长的时间,即是等待前一个指令确实执行完成,指令执行的时间请参考指令表中的个别指令说明。

2、“RE”为基本指令集与扩充指令集的选择控制位元,当变更“RE”位元后,往后的指令集将维持在最后的状态,除非再次变更“RE”位元,否则使用相同指令集时,不需每次重设“RE”位元。

带字库12864液晶显示程序

带字库12864液晶显示程序

#include <reg52.h>#include <intrins.h>#define uint unsigned int#define uchar unsigned char#define LCDdata P0//采用并行模式sbit E = P2^7;sbit RW = P2^6;sbit RS = P2^5;sbit RST = P2^4;sbit key1 = P2^0; //时、分、秒选择键sbit key2 = P2^1; //加一键sbit key3 = P2^2; //减一键void init();//void check_busy();void delayms(uint x);void write_com(uchar com);void write_data(uchar date);//void delay(uchar y);void t_bcd();void disp_time();void t_time();uchar code string[]={"00时00分00秒"}; uchar code tab[] ={"长春工业大学"}; uchar code tab1[]={"人文信息学院"}; uchar code tab2[]={"electronic 沈琦"};uchar time[6];//显示缓冲区uchar count;char sec,min,hour;//--------------主函数-----------------void main(){init();while(1){if(count == 200){count = 0;sec++;if(sec == 60){sec = 0;min++;if(min == 60){min = 0;hour++;if(hour == 24){hour = 0;}}}t_bcd();disp_time();}t_time();}}//-------------初始化----------------void init(){uchar i;// RST = 0;// delayms(1);// RST = 1;// delayms(40);write_com(0x30);write_com(0x0f);write_com(0x01);write_com(0x81);for(i=0;i<12;i++){write_data(string[i]);delayms(5);}write_com(0x90);for(i=0;i<16;i++){write_data(tab[i]);delayms(5);}write_com(0x8a);for(i=0;i<12;i++){write_data(tab1[i]);delayms(5);}write_com(0x98);for(i=0;i<16;i++){write_data(tab2[i]);delayms(5);}TMOD = 0x01;TH0 = (65536-5000)/256;TL0 = (65536-5000)%256;EA = 1;ET0 = 1;TR0 = 1;write_com(0x0c);}//------------毫秒延时--------------- void delayms(uint x){uchar i;while(x--){for(i=0;i<120;i++);}}/*//--------------判忙程序--------------- void check_busy(){// LCDdata = 0xff;RS = 0;RW = 1;// E = 0;E = 1;LCDdata = 0xff;while(LCDdata&0x80);E = 0;}*///------------写命令----------------- void write_com(uchar com){// check_busy();RS = 0;RW = 0;E = 0;LCDdata = com;// delayms(5);E = 1;delayms(5);E = 0;}//-------------写数据------------------ void write_data(uchar date){// check_busy();RS = 1;RW = 0;E = 0;LCDdata = date;// delayms(5);E = 1;delayms(5);E = 0;}//-----------定时中断0------------- void timer0() interrupt 1{TH0 = (65536-5000)/256;TL0 = (65536-5000)%256;count++;}void t_bcd(){time[0] = sec%10;time[1] = sec/10;time[2] = min%10;time[3] = min/10;time[4] = hour%10;time[5] = hour/10;}//--------------时钟时间显示----------------- void disp_time(){write_com(0x85);write_data(0x30+time[1]);write_data(0x30+time[0]);write_com(0x83);write_data(0x30+time[3]);write_data(0x30+time[2]);write_com(0x81);write_data(0x30+time[5]);write_data(0x30+time[4]);}//------------调整时间程序--------------- void t_time(){static uchar num;if(key1 == 0){delayms(5);while(!key1);TR0 = 0;num++;}//-----------------调时-----------------if(num == 1){write_com(0x81);write_com(0x0f);if(key2 == 0){delayms(5);if(key2 == 0){while(!key2);hour++;if(hour == 24){hour = 0;}t_bcd();write_data(0x30+time[5]);write_data(0x30+time[4]);}}if(key3 == 0){delayms(5);if(key3 == 0){while(!key3);hour--;if(hour == -1){hour = 23;}t_bcd();write_data(0x30+time[5]);write_data(0x30+time[4]);}}}//-----------------调分----------------------if(num == 2){write_com(0x83);if(key2 == 0){delayms(5);if(key2 == 0){while(!key2);min++;if(min == 60){min = 0;}t_bcd();write_data(0x30+time[3]);write_data(0x30+time[2]);}}if(key3 == 0){delayms(5);if(key3 == 0){while(!key3);min--;if(min == -1){min = 59;}t_bcd();write_data(0x30+time[3]);write_data(0x30+time[2]);}}}//---------------调秒------------------if(num == 3){write_com(0x85);if(key2 == 0){delayms(5);if(key2 == 0){while(!key2);sec++;if(sec == 60){sec = 0;}t_bcd();write_data(0x30+time[1]);write_data(0x30+time[0]);}}if(key3 == 0){delayms(5);if(key3 == 0){while(!key3);sec--;if(sec == -1){sec = 59;}t_bcd();write_data(0x30+time[1]);write_data(0x30+time[0]);}}}//---------------退出调整时间----------------- if(num == 4){num = 0;write_com(0x0c);TR0 = 1;}}。

12864中文字库液晶模块使用说明书

12864中文字库液晶模块使用说明书

12864中文字库液晶模块使用说明书第 1 页共16 页一、12864液晶显示模块概述1. 12864液晶显示模块是128×64点阵的汉字图形型液晶显示模块,可显示汉字及图形,内置国标GB2312码简体中文字库(16X16点阵)、128个字符(8X16点阵)及64X256点阵显示RAM(GDRAM)。

可与CPU 直接接口,提供两种界面来连接微处理机:8-位并行及串行两种连接方式。

具有多种功能:光标显示、画面移位、睡眠模式等。

2. 外观尺寸:93×70mm(4X8C), 84×44mm(2X8C),110×65mm(2x8 C _2), 116×39mm(2X10),180×65mm(4X16A)3. 视域尺寸:73×39mm(4X8C), 78×25mm(2x8 C _2), 70×20mm(2X8C),85×20mm(2X10), 132×39mm(4X16A),补充说明:外观尺寸可根据用户的要求进行适度调整。

二、模块引脚说明1)表—1:(128X32)、(160X32)模块引脚说明引脚名称 方向 说明 引脚名称方向 说明1 VSS - GND(0V) 11 DB4 I/O 数据42 VDD - Supply Voltage For Logic (+5v) 12 DB5 I/O 数据53 VO - Supply Voltage For LCD (悬空)13 DB6 I/O 数据64 RS(CS) H/L H: Data L: Instruction Code 14 DB7 I/O 数据75 R/W(STD) H/L H: Read L: Write15 PSB H/L 16032此脚为:RESET脚 6 E(SCLK) H,H/L Enable Signal7 DB0 I/O 数据0 16 /RST H/L 16032此脚为空8 DB1 I/O 数据1 17 LEDK - 16032此脚为A9 DB2 I/O 数据2 18 LEDA - 16032此脚为K10 DB3 I/O 数据3 注:以上K为负,A为正4)表—4:(256X64)引脚说明引脚名称 方向 说明引脚名称 方向 说明 1 FG - FRAME GROUND 11 DB0 I/O 数据0 2 VSS - GND(0V)12 DB1 I/O 数据1 3 VDD - Supply Voltage For Logic (+5v) 13 DB2 I/O 数据2 4 NC - 空脚14 DB3 I/O 数据3 5 R/W H/L H: Read L: Write 15 DB4 I/O 数据4 6 E1 H,H/L Enable Signal1 16 DB5 I/O 数据5 7 E2 H,H/L Enable Signal217 DB6 I/O 数据6 8 RS H/L H: Data L: Instruction Code 18 DB7 I/O 数据7 9 NC - 空脚19 NC - 空脚 10 /RST H/L Reset Signal 低电平有效 20 NC - 空脚注 K背光源负极(LED-OV)A背光源正极(LED+5V)三、12864液晶硬件接口1、逻辑工作电压(VDD):4.5~5.5V2、电源地(GND):0V3、LCD 驱动电压(V0):0~-10V4、工作温度(Ta):0~55℃(常温) / -20~70℃(宽温) 保存温度(Tstg):-10~65℃(常温)5、电气特性见附图1 外部连接图(参考附图2)模块有并行和串行两种连接方法(时序如下): 1、8位并行连接时序图MPU 写资料到模块RSR/WEMPU从模块读出资料RSR/WE2、串行连接时序图CS C LS T3、AC电气特性(TA=25℃ VCC=5V)condition Min. Typ. Max. UnitSYMBOL Characteristics Testfrequency Rf=39KΩ480 540 600 KHz Fosc OSCTIME UNIT PARAMETER SYMBOL MESUREFOR WRITE MODE(WRITING DATA FROM MPU TO ST7920)System cycle time TC 13,000 nsAddress setup time TAS 1,500 nsAddress hold time TAH 1,500 nsData setup time TDSW 1,000 nsData hold time TH 20 nsEnable pulsewidth TPW 1,500 nsEnable rise/fall time TR,TF 25 nsFOR READ MODE(READING DATA FROM ST7920 TO MPU)System cycle time TC 13,000 nsAddress setup time TAS 1,500 nsAddress hold time TAH 1,500 nsData setup time TDDR 1,000 nsData hold time TH 20 ns Enable pulsewidth TPW 1,500 ns Enable rise/fall time TR,TF 25 ns四、用户指令集指令表—2:(RE=1:扩充指令集)指令码指令RS RW DB7 DB6 DB5DB4 DB3 DB2DB1DB0说明执行时间(540KHZ )待命模式 0 0 0 0 0 0 0 0 0 1将DDRAM 填满“20H ”,并且设定DDRAM 的地址计数器(AC )到“00H ” 72us卷动地址或IRAM 地址选择 0 0 0 0 0 0 0 0 1 SR SR=1:允许输入垂直卷动地址 SR=0:允许输入IRAM 地址72us反白选择 0 0 0 0 0 0 0 1 R1 R0选择4行中的任一行作反白显示,并可决定反白与否 72us 睡眠模式0 0 0 0 0 0 1 SL X XSL=1:脱离睡眠模式 SL=0:进入睡眠模式72us扩充功能设定0 0 0 0 1 1 X1REG 0RE=1:扩充指令集动作RE=0:基本指令集动作G=1 :绘图显示ONG=0 :绘图显示OFF72us设定IRAM地址或卷动地址0 0 0 1 AC5AC4 AC3 AC2AC1AC0SR=1:AC5—AC0为垂直卷动地址SR=0:AC3—AC0为ICON IRAM地址72us设定绘图RAM地址0 0 1 AC6 AC5AC4 AC3 AC2AC1AC0设定CGRAM地址到地址计数器(AC)72us备注:1、当模块在接受指令前,微处理顺必须先确认模块内部处于非忙碌状态,即读取BF标志时BF需为0,方可接受新的指令;如果在送出一个指令前并不检查BF标志,那么在前一个指令和这个指令中间必须延迟一段较长的时间,即是等待前一个指令确实执行完成,指令执行的时间请参考指令表中的个别指令说明。

LCD12864显示中文及图片C程序

LCD12864显示中文及图片C程序

/****************************************屏幕显示驱动*****************************************/#include "GT23L24T3Y.h"#include "print.h"#include <stdio.h>#include <string.h>#include "bmp_picture.h"#include "lcd_12864.h"#include "..\user\rtc.h"u8 comTable[]={4,5,6,7,3,2,1,0};extern void Setlcd_Addr ( u8 row,u8 column );//外部函数调用声明extern u8 Num_Code[];//字库获得函数extern u8 Big_Num_Code[];//字库获得函数extern u8 Picture_Code[];//字库获得函数extern u8 arrow1[];extern u8 arrow2[];u8 testlcd[]="测试数据";/************************************************************************//显示中文输出//函数名:print_16//功能:显示16x16点阵字符串。

// 函数名:print_16// 功能:显示16点阵字符串// 形参:// row:x轴// column:y轴// *lcd:显示字符串// logic:显示取反// wei.显示位值// len长度*************************************************************************/void _print_15 ( u8 row,u8 column,const char *lcd,u8 logic ,u8 wei,u8 len){u8 w=0,x=0,y=0,l=0,read_data=0;u8 Length=0;GT_cs1;//字库片选至高for ( l=len; l>0; l=l-2 ) //总字节{w=*lcd;if ( w&0x80 ) //为1则为汉字,为0则为ASCII码{GT_cs0; //字库片选选定GT23_Write ( GT23_write_15 ( lcd ) ); //写入字库指令以及文字地址for ( x=0; x<2; x++ ){Setlcd_Addr (row,column);for(y=0;y<16;y++){read_data=GT23_Read();if(logic == true){// read_data = ~read_data;}WriteData(read_data );}row++;}GT_cs1;//字库片选至高row-=2;column+=16;if(column>=128){row+=2;column=0;}lcd=lcd+2;}}}/************************************************************************//描述:显示中文输出//使用:顶层函数调用参数:row 行column 列*lcd 字符串logic 反白*************************************************************************/ void print_15 ( u8 row,u8 column,const char *lcd,u8 logic ){u8 c=strlen ( lcd );_print_15(row,column,lcd,logic,0,c);}/************************************************************************ //描述:显示图片输出//使用:顶层函数调用参数:row 行column 列*lcd 字符串logic 反白*************************************************************************/ void print_array(u16 row,u16 column,u16 size_x,u16 size_y,const u8 *ptr, u8 logic){u8 w=0,x=0,y=0,l=0,read_data=0;u8 Length=0;for( x=0;x<size_x/8;x++){Setlcd_Addr (row,column);for(y=0;y<size_y;y++){read_data=*( ptr + (y+x*size_y) );if(logic == true){read_data = ~read_data;}WriteData1(read_data);// WriteData1(0XFF);}row++;}}u8 OpMgsCode[][10] ={"病人信息","循环播放","房号与床号","从机音量","对比度","广播""恢复","音乐","主机音量","时间"};u8 DayCode[][7]={"星期天","星期一","星期二","星期三","星期四","星期五","星期六"};void PrintMainFace(time mytime,u8 PeopleNum){//待机界面函数u8 Hrd,Ten,One;Lcd_Clr();//清屏print_15 ( 0,16, "月",false );print_15 ( 0,48, "日",false );print_15 ( 0,70, &DayCode[mytime.day][0],false );//显示星期//日期显示Ten=mytime.month/10;One=mytime.month%10;print_array(0 , 0, 16 , 7 , &Num_Code[Ten*14], false);print_array(0 , 8, 16 , 7 , &Num_Code[One*14], false);Ten=mytime.date/10;One=mytime.date%10;print_array(0 , 32, 16 , 7 , &Num_Code[Ten*14], false);print_array(0 , 40, 16 , 7 , &Num_Code[One*14], false);//时间显示Ten=mytime.hour/10;One=mytime.hour%10;print_array(2 , 20, 32 , 21 , &Big_Num_Code[Ten*84], false);print_array(2 , 42, 32 , 21 , &Big_Num_Code[One*84], false);Ten=mytime.minute/10;One=mytime.minute%10;print_array(2 , 68, 32 , 21 , &Big_Num_Code[Ten*84], false);print_array(2 , 90, 32 , 21 , &Big_Num_Code[One*84], false);//住院人数显示print_15 ( 6,32, "住院人数",false );Hrd=PeopleNum/100;PeopleNum=PeopleNum%100;Ten=PeopleNum/10;One=PeopleNum%10;if(Hrd ){print_array(6 , 96, 16 , 7 , &Num_Code[Hrd*14], false);}print_array(6 , 102, 16 , 7 , &Num_Code[Ten*14], false);print_array(6 , 110, 16 , 7 , &Num_Code[One*14], false);}void PrintPictureFace(u8 Index){time mytime;Lcd_Clr();//清屏mytime.month = 10;mytime.date = 16;mytime.hour = 12;mytime.minute = 15;mytime.day =3;PrintMainFace(mytime,96);//print_array(0 , 10, 48 , 8 , arrow1, false);//左箭头显示// print_array(0,38 ,48 ,48 , &Picture_Code[288*Index], false);//图片显示// print_array(0,108, 48 , 8 , arrow2, false); //右箭头显示//print_15 ( 6,33, &OpMgsCode[0][Index],false );//提示信息显示}。

12864汉字液晶显示--按键电子时钟程序(具有闪烁,移位,加一,减一功能)

12864汉字液晶显示--按键电子时钟程序(具有闪烁,移位,加一,减一功能)

//12864汉字液晶显示--按键电子时钟程序(具有闪烁,移位,加一,减一功能)#include &lt;reg52.h&gt;#include &lt;intrins.h&gt;#define uchar unsigned charvoid lcd_ini();void ascii_change(void);void delay();void wri_add(uchar com);void wri_dat(uchar com1);void shan(void);void disp();void tkey(void);sbit cs=P1^7;sbit sid=P1^6;sbit sclk=P1^5;bit flag=1;uchar dat,count,f=1;//f测试哪个单元为当前闪烁状态uchar data clock[3]={23,45,12};uchar code clockname[10]={&quot;北京时间:&quot;};uchar data num[6];/*******主程序*************/void main(){lcd_ini();count=10;//机器周期为1us,每次定时50ms,此变量用来控制循环次数,在下面赋值为20,共定时1秒TMOD=0x01;TL0=0XB0;TH0=0X3C;EA=1;ET0=1;IT0=1;EX0=1;TR0=1;while(1){back:ascii_change();disp();delay();if(flag==1)goto back;tkey();shan();delay();}}/****lcd初始化*******/void lcd_ini(){wri_add(0x30);delay();wri_add(0x0c);delay();wri_add(0x01);delay();wri_add(0x06);delay();}/********定时程序*************/ void timer1() interrupt 1 using 2 {TL0=0XB0;TH0=0X3C;count--;if(count==0){count=10;clock[2]++;//秒//}elsegoto out;if(clock[2]==60){clock[2]=0;clock[1]++;//分//}if(clock[1]==60){clock[1]=0;clock[0]++;}if(clock[0]==24)//时//clock[0]=0;out:_nop_();}/*******十位个位转换成ASCII码************/ void ascii_change(void){num[5]=clock[2]-(clock[2]/10)*10+0x30;num[4]=clock[2]/10+0x30;num[3]=clock[1]-(clock[1]/10)*10+0x30;num[2]=clock[1]/10+0x30;num[1]=clock[0]-(clock[0]/10)*10+0x30;num[0]=clock[0]/10+0x30;}/********廷时程序*************/void delay(){uchar i,j;for (i=250;i&gt;0;i--)for (j=250;j&gt;0;j--);}/*****Write address*********/void wri_add(uchar com){uchar i,j,k;cs=0;cs=1;dat=0xf8;for(i=1;i&lt;=8;i++){sid=(bit)(dat&amp;0x80);sclk=0;sclk=1;sclk=0;dat=dat&lt;&lt;1;}dat=com;dat=dat&amp;0xf0;for(j=1;j&lt;=8;j++){sid=(bit)(dat&amp;0x80);sclk=0;sclk=1;sclk=0;dat=dat&lt;&lt;1;}dat=com;dat=_cror_(dat,4);// 此为高低四位交换dat=dat&amp;0xf0;for(k=1;k&lt;=8;k++){sid=(bit)(dat&amp;0x80);sclk=0;sclk=1;sclk=0;dat=dat&lt;&lt;1;}}/*********Write data*************/ void wri_dat(uchar com1){uchar i,j,k;cs=0;cs=1;dat=0xfa;for(i=1;i&lt;=8;i++){sid=(bit)(dat&amp;0x80);sclk=0;sclk=1;sclk=0;dat=dat&lt;&lt;1;}dat=com1;dat=dat&amp;0xf0;for(j=1;j&lt;=8;j++){sid=(bit)(dat&amp;0x80);sclk=0;sclk=1;sclk=0;dat=dat&lt;&lt;1;}dat=com1;dat=_cror_(dat,4);// 此为高低四位交换dat=dat&amp;0xf0;for(k=1;k&lt;=8;k++){sid=(bit)(dat&amp;0x80);sclk=0;sclk=1;sclk=0;dat=dat&lt;&lt;1;}}/******display program***********/ void disp(){uchar i,k=0;wri_add(0x80);for (i=1;i&lt;=9;i++)wri_dat(clockname[i-1]);wri_add(0x90);for (i=1;i&lt;=6;i++) {k++;if(k==3||k==5)wri_dat(clockname[8]);//时间之间的冒号。

12864点阵LCD液晶屏带中文字库

12864点阵LCD液晶屏带中文字库

功能
令 RS R/W D7 D6 D5 D4 D3 D2 D1 D0
待命
进入待命模式,执行其他指令都棵终止
0 0 0 0000001
模式
待命模式
卷动地 SR=1:允许输入垂直卷动地址
址开关 0 0 0 0 0 0 0 0 1 SR SR=0:允许输入 IRAM 和 CGRAM 地址
开启
反白
选择 2 行中的任一行作反白显示,并可决定反白与否。初始值 R1R
0 0 0 0 0 0 0 1 R1 R0
选择
0=00,第一次设定为反白显示,再次设定变回正常
睡眠
SL=0:进入睡眠模式
0 0 0 0 0 0 1 SL X X
模式
SL=1:脱离睡眠模式
CL=0/1:4/8 位数据 扩充
RE=1: 扩充指令操作 功能 0 0 0 0 1 CL X RE G 0
RE=0: 基本指令操作 设定
示移位控 0 0 0 0 0 1 S/C R/L X X RAM 的内容

DL=0/1:4/8 位数据 功能
0 0 0 0 1 DL X RE X X RE=1: 扩充指令操作 设定
RE=0: 基本指令操作
设定 CG
RAM
0 0 0 1 AC5 AC4 AC3 AC2 AC1 AC0 设定 CGRAM 地址
G=1/0:绘图开关
设定
设定绘图 RAM
绘图 RA
0 0 0 AC3 AC2 AC1 AC0 先设定垂直(列)地址 AC6AC5…AC0
001
M
AC6 AC5 AC4 AC3 AC2 AC1 AC0 再设定水平(行)地址 AC3AC2AC1AC0
地址
将以上 16 位地址连续写入即可

LCD12864液晶显示器中文说明

LCD12864液晶显示器中文说明

一、液晶显示模块概述12864A-1汉字图形点阵液晶显示模块,可显示汉字及图形,内置8192个中文汉字(16X16点阵)、128个字符(8X16点阵)及64X256点阵显示RAM(GDRAM)。

主要技术参数和显示特性:电源:VDD 3.3V~+5V(内置升压电路,无需负压);显示内容:128列× 64行显示颜色:黄绿显示角度:6:00钟直视LCD类型:STN与MCU接口:8位或4位并行/3位串行配置LED背光多种软件功能:光标显示、画面移位、自定义字符、睡眠模式等二、外形尺寸1.外形尺寸图2.主要外形尺寸项目标准尺寸单位模块体积113.0×65.0×12.8mm定位尺寸105.0×55.0mm视域73.4×38.8 mm行列点阵数128×64dots点距离0.52×0.52 mm点大小0.48×0.48 mm二、模块引脚说明128X64 引脚说明引脚号引脚名称方向功能说明1 VSS - 模块的电源地2 VDD - 模块的电源正端3 V0 - LCD驱动电压输入端4 RS(CS) H/L 并行的指令/数据选择信号;串行的片选信号5 R/W(SID) H/L 并行的读写选择信号;串行的数据口6 E(CLK) H/L 并行的使能信号;串行的同步时钟7 DB0 H/L 数据08 DB1 H/L 数据19 DB2 H/L 数据210 DB3 H/L 数据311 DB4 H/L 数据412 DB5 H/L 数据513 DB6 H/L 数据614 DB7 H/L 数据715 PSB H/L 并/串行接口选择:H-并行;L-串行16 NC 空脚17 /RET H/L 复位低电平有效18 NC 空脚19 LED_A - 背光源正极(LED+5V)20 LED_K - 背光源负极(LED-OV)逻辑工作电压(VDD):4.5~5.5V电源地(GND):0V工作温度(Ta):0~60℃(常温) / -20~75℃(宽温)三、接口时序模块有并行和串行两种连接方法(时序如下):8位并行连接时序图MPU写资料到模块MPU从模块读出资料2、串行连接时序图串行数据传送共分三个字节完成:第一字节:串口控制—格式11111ABCA为数据传送方向控制:H表示数据从LCD到MCU,L表示数据从MCU到LCDB为数据类型选择:H表示数据是显示数据,L表示数据是控制指令C固定为0第二字节:(并行)8位数据的高4位—格式DDDD0000第三字节:(并行)8位数据的低4位—格式0000DDDD串行接口时序参数:(测试条件:T=25℃VDD=4.5V)四、用户指令集指令指令码说明执行时间(540KHZ)RSRWDB7DB6DB5DB4DB3DB2DB1DB清除显示0 0 0 0 0 0 0 0 0 1将DDRAM填满“20H”,并且设定DDRAM的地址计数器(AC)到“00H”4.6ms地址归位0 0 0 0 0 0 0 0 1 X设定DDRAM的地址计数器(AC)到“00H”,并且将游标移到开头原点位置;这个指令并不改变DDRAM的内容4.6ms进入点设定0 0 0 0 0 0 0 1 I/D S指定在资料的读取与写入时,设定游标移动方向及指定显示的移位72us显示状态开/关0 0 0 0 0 0 1 D C BD=1:整体显示ONC=1:游标ONB=1:游标位置ON72us游标或显示移位控制0 0 0 0 0 1S/CR/LX X设定游标的移动与显示的移位控制位元;这个指令并不改变DDRAM的内容72us功能设定0 0 0 0 1 DL XREX XDL=1 (必须设为1)RE=1:扩充指令集动作72us备注:1、当模块在接受指令前,微处理顺必须先确认模块内部处于非忙碌状态,即读取BF标志时BF需为0,方可接受新的指令;如果在送出一个指令前并不检查BF标志,那么在前一个指令和这个指令中间必须延迟一段较长的时间,即是等待前一个指令确实执行完成,指令执行的时间请参考指令表中的个别指令说明。

12864点阵液晶显示测试程序(带字库)

12864点阵液晶显示测试程序(带字库)

12864点阵液晶显示测试程序(带字库)接口说明1 12864-1测试程序:#include <reg52.h>#define uint unsigned int#define uchar unsigned char#define x1 0x80#define x2 0x88#define y 0x80#define comm 0#define dat 1sbit rs = P1^1; //H=data; L=command;sbit rw = P1^2; //H=read; L=write;sbit e = P1^3; //input enable;sbit psb= P1^4; //H=并口; L=串口;sbit rst= P1^5; //Reset Signal 低电平有效sbit busy=P2^7; //lcd busy bitvoid wr_lcd (uchar dat_comm,uchar content);void chk_busy (void);void delay (uint us);uchar code tab1[]={" 床前明月光, "" 疑是地上霜, ""举头望明月, ""低头思故乡。

"};uchar code tab31[]={"你的选择""没有错"};uchar code tab32[]={/*-- 调入了一幅图像:D:\Backup\桌面\未命名1.bmp --*//*-- 宽度x高度=128x32 --*/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,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF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F,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,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, 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,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,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,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,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 };/*------------------初始化-----------------*/void init_lcd (void){rst=1;psb=1;wr_lcd (comm,0x30); /*30---基本指令动作*/wr_lcd (comm,0x01); /*清屏,地址指针指向00H*/wr_lcd (comm,0x06); /*光标的移动方向*/wr_lcd (comm,0x0c); /*开显示,关游标*/}/*---------------显示汉字或字符----------------*/ void chn_disp (uchar code *chn){uchar i,j;wr_lcd (comm,0x30);wr_lcd (comm,0x80);for (j=0;j<4;j++){for (i=0;i<16;i++)wr_lcd (dat,chn[j*16+i]);}}/*-----------上半屏显示汉字或字符------------*/ void chn_disp1 (uchar code *chn){uchar i,j;wr_lcd (comm,0x30);wr_lcd (comm,0x80);j=0;for (i=0;i<16;i++)wr_lcd (dat,chn[j*16+i]);wr_lcd (comm,0x90);j=1;for (i=0;i<16;i++)wr_lcd (dat,chn[j*16+i]);}/*----------------显示图形-----------------*/void img_disp (uchar code *img){uchar i,j;for(j=0;j<32;j++){for(i=0;i<8;i++){wr_lcd (comm,0x34);wr_lcd (comm,y+j);wr_lcd (comm,x1+i);wr_lcd (comm,0x30);wr_lcd (dat,img[j*16+i*2]);wr_lcd (dat,img[j*16+i*2+1]);}}for(j=32;j<64;j++){for(i=0;i<8;i++){wr_lcd (comm,0x34);wr_lcd (comm,y+j-32);wr_lcd (comm,x2+i);wr_lcd (comm,0x30);wr_lcd (dat,img[j*16+i*2]);wr_lcd (dat,img[j*16+i*2+1]);}}wr_lcd (comm,0x36);}/*-------------下半屏显示图形--------------*/ void img_disp1 (uchar code *img){uchar i,j;for(j=0;j<32;j++){for(i=0;i<8;i++){wr_lcd (comm,0x34);wr_lcd (comm,y+j);wr_lcd (comm,x2+i);wr_lcd (comm,0x30);wr_lcd (dat,img[j*16+i*2]);wr_lcd (dat,img[j*16+i*2+1]);}}wr_lcd (comm,0x36);}/*--------------显示点阵----------------*/void lat_disp (uchar data1,uchar data2) {uchar i,j,k,x;x=x1;for(k=0;k<2;k++){for(j=0;j<16;j++){for(i=0;i<8;i++){wr_lcd (comm,0x34);wr_lcd (comm,y+j*2);wr_lcd (comm,x+i);wr_lcd (comm,0x30);wr_lcd (dat,data1);wr_lcd (dat,data1);}for(i=0;i<8;i++){wr_lcd (comm,0x34);wr_lcd (comm,y+j*2+1);wr_lcd (comm,x+i);wr_lcd (comm,0x30);wr_lcd (dat,data2);wr_lcd (dat,data2);}}x=x2;}wr_lcd (comm,0x36);}/*-----------------------------------------------*///当data1=0xff,data2=0xff时,在x0,y0处反白显示16xl*yl.void con_disp (uchar data1,uchar data2,uchar x0,uchar y0,uchar xl,uchar yl) {uchar i,j;for(j=0;j<yl;j++){for(i=0;i<xl;i++){wr_lcd (comm,0x34);wr_lcd (comm,y0+j);wr_lcd (comm,x0+i);wr_lcd (comm,0x30);wr_lcd (dat,data1);wr_lcd (dat,data2);}}wr_lcd (comm,0x36);}/*--------------清DDRAM------------------*/void clrram (void){wr_lcd (comm,0x30);wr_lcd (comm,0x01);}/*---------------------------------------*/void wr_lcd (uchar dat_comm,uchar content) {chk_busy ();if(dat_comm){rs=1; //datarw=0; //write}else{rs=0; //commandrw=0; //write}P2=content; //output data or comme=1;;e=0;}void chk_busy (void){P2=0xff;rs=0;rw=1;e =1;while(busy==1);e =0;}void delay (uint us) //delay time{while(us--);}void delay1 (uint ms){uint i,j;for(i=0;i<ms;i++)for(j=0;j<15;j++)delay(1);}/*------------------主程序--------------------*/void main (){SP=0x5f;init_lcd ();while (1){lat_disp (0x00,0x00);chn_disp (tab1);con_disp (0xff,0xff,0x8c,0x80,2,16);delay1 (28000);clrram();lat_disp (0xcc,0xcc);delay1 (28000);lat_disp (0x00,0x00);chn_disp1 (tab31);img_disp1 (tab32);delay1 (28000);clrram();lat_disp (0xff,0x00);delay1 (28000);img_disp (tab5);delay1 (28000);}}。

12864显示文字+图像

12864显示文字+图像

引用12864液晶原理分析3他山之石2010-07-21 20:52:05 阅读7 评论0 字号:大中小小峰的12864液晶原理分析3一、ST7920控制IC的LCD12864实现反白显示从使用手册上可知,扩展指令里的0x03+行号即可实现反白对应行。

但是ST7920 控制器的128×64 点阵液晶其实原理上等同256×32 点阵,第三行对应的DDRAM 地址紧接第一行;第四行对应的DDRAM 地址紧接第二行。

所以128×64 点阵的液晶执行反白功能时实用意义不大,因为用户对第一行执行反白显示操作时,第三行必然也反白显示;第二行反白,第四行也必然反白。

其实还是有办法做到单行反白的,解决方法就是混用图形显示和字符显示。

其理论支持在于:在ST7920中,字符显示的DDRAM和图形的GDRAM是相互独立的,而最后显示到液晶上的结果,是两个RAM中数据的异或。

具体来说:假如某个点上,绘图RAM的没有绘图(数据为0),而字符RAM上有点阵(数据为1),那么异或的结果就是1,也就是说正常显示字符;当字符上RAM没有点阵的时候,异或的结果是0,自然也就不显示了。

假如该点上绘图RAM绘图了(数据为1),当字符RAM上有点阵(数据为1时),异或的结果为0,效果就是反白显示;如果字符RAM没有点阵(数据为0时),异或结果为1,效果就是显示绘图的背景。

所以,如果要在某个地方反白显示,那么就在该点绘图并且写字,如果要取消反白,就重新用全0擦掉那个地方的绘图!这样一来可以实现任何地方、任意大小的反白显示,反而比原指令中的单行反白的功能更好更强大。

二、对于整屏既有图象又有文本,则可以用两种方式实现:1、首先文本DDRAM写入要写的字符,其余全部空格(即0X00),然后再在没有字符的地方(即非点亮的晶格中,0X00)绘入图象。

DDRAM与GDRAM异或后就可以整屏实现图象与文本。

参见程序实例1。

12864液晶经典驱动程序,一看就懂,有详细的注释(C语言编写,不看后悔)

12864液晶经典驱动程序,一看就懂,有详细的注释(C语言编写,不看后悔)

这个程序写得很好,自己也是看的别人写的很好的程序,但是它代码不够完整,注释不详细,经过自己的修改加以完善。

另外我发现很多的测试代码都没有附上测试代码效果图,在本人的代码下面有自己拍的效果图,填补不足之处。

自己在找资料的过程中花掉很多的财富值,如果大家看得起该代码请评五分加以下载,在下感激不尽!/*******************************************程序名称:12864液晶经典驱动程序(带中文字库)功能:12864测试程序修改作者:王程修改时间:2014年2月5日23:22:32********************************************/#include<reg52.h>#define uchar unsigned char#define uint unsigned int// P0 为数据口sbit LCD_RS=P2^0; //数据、命令选择端口sbit LCD_RW=P2^1; //液晶读写控制sbit LCD_EN=P2^2; //液晶使能控制sbit PSB = P2^4; //模式选择1为并行0为串行sbit RES = P2^5;//复位端口低电平复位,上电之前进行复位,为了稳定!unsigned char code DAT[] = "我爱我家"; //测试显示的汉字,下面的A为测试显示的英文/*******************************************函数名称:Delay_1ms (晶振为12M)功能:延时约1ms的时间参数:无返回值:无********************************************/void delay_1ms(uint x){uint i,j;for(j = 0;j < x;j++)for(i=0;i<110;i++);}/*******************************************函数名称:write_cmd功能:向液晶中写控制命令参数:cmd--控制命令返回值:无********************************************/void write_cmd(uchar cmd){uchar lcdtemp = 0;LCD_RS=0;LCD_RW=1;do //经典判忙方式,精简{LCD_EN=1;delay_1ms(2);lcdtemp = P0;LCD_EN=0;}while(lcdtemp & 0x80);LCD_RW=0;P0 = cmd;LCD_EN=1;delay_1ms(5);LCD_EN=0;}/*******************************************函数名称:write_data功能:向液晶中写显示数据参数:dat--显示数据返回值:无********************************************/ void write_data(uchar dat){uchar lcdtemp = 0;LCD_RS=0;LCD_RW=1;do //经典判忙方式{LCD_EN=1;delay_1ms(2);lcdtemp = P0;LCD_EN=0;}while(lcdtemp & 0x80);LCD_RS=1;LCD_RW=0;P0 = dat;LCD_EN=1;delay_1ms(5);LCD_EN=0;}/*******************************************函数名称:lcd_int功能:初始化液晶模块参数:无返回值:无********************************************/void lcd_int(void){delay_1ms(40); //大于40MS的延时程序PSB=1; //设置为8BIT并口工作模式delay_1ms(1); //延时RES=0; //复位delay_1ms(1); //延时RES=1; //复位置高delay_1ms(10);write_cmd(0x30); //基本指令集delay_1ms(5);write_cmd(0x30); //基本指令集delay_1ms(5);write_cmd(0x08); // 地址归位delay_1ms(5);write_cmd(0x10); //光标设置delay_1ms(5);write_cmd(0x0c); //整体显示打开,游标关闭delay_1ms(5);write_cmd(0x01); //清除显示delay_1ms(5);write_cmd(0x06); //游标右移delay_1ms(5);write_cmd(0x80); //设定显示的起始地址delay_1ms(5);}函数名称:main功能:测试1602初始化函数模块参数:无返回值:无********************************************/void main(){uchar i;char *a = DAT;//使用指针,指向字符串地址lcd_int();write_data('A'); //每个显示都是用的两个字节,必须写两次write_data(' ');//再写一次,不然乱显示(如果不加就再显示一个别的字母)for(i=0;i<8;i++){write_data(*a);//将地址当作数据传给12864a++;//一个汉字传送两次,因为一个汉字占用两个字节,两次传完}write_cmd(0x90);//一行显示八个汉字,第一行0x80-87,第二行0x90开始a = DAT;for(i=0;i<8;i++){write_data(*a);a++;}while(1); //停住,不然重复的初始化显示,作为测试用}/*******************************************代码测试效果图片两两张由于曝光度影响,拍了两张********************************************/。

LCD12864液晶显示原理电路图程序

LCD12864液晶显示原理电路图程序

号.脚。

H H D7 D6 D5 D4 D3 D2 D1 D0功能:从DD RAM读数据,读指令执行后Y地址计数器自动加1。

从DD RAM读数据前要先执行“设置页地址”及“设置列地址”命令。

六、接口时序1.写操作时序时序11.读操作时序时序2时序参数表:名称符号最小值典型值最大值单位ns1000 Tcyc E周期时间ns Pweh450 高电平宽度E ns Pwel450 E低电平宽度nsTr 25 上升时间Ens E下降时间 Tf 25#0B8MOV R2, #40H#00H ,MOV R1MOV DPTR,#ADDR LOOP:MOV A, R1A MOVC , @A+DPTRLCALL DATA INC R1LOOPR2, DJNZ带中文字库的128X64是一种具有4位/8位并行、2线或3线串行多种接口方式,内部含有国标一级、二级简体中文字库的点阵图形液晶显示模块;其显示分辨率为128×64, 内置8192个16*16点汉字,和128个16*8点ASCII字符集.利用该模块灵活的接口方式和简单、方便的操作指令,可构成全中文人机交互图形界面。

可以显示8×4行16×16点阵的汉字. 也可完成图形显示.低电压低功耗是其又一显著特点。

由该模块构成的液晶显示方案与同类型的图形点阵液晶显示模块相比,不论硬件电路结构或显示程序都要简洁得多,且该模块的价格也略低于相同点阵的图形液晶模块。

基本特性:l 低电源电压(VDD:++)l 显示分辨率:128×64点l 内置汉字字库,提供8192个16×16点阵汉字(简繁体可选)l 内置 128个16×8点阵字符l 2MHZ时钟频率、半透、正显STN显示方式: ll 驱动方式:1/32DUTY,1/5BIASl 视角方向:6点l 背光方式:侧部高亮白色LED,功耗仅为普通LED的1/5—1/10l 通讯方式:串行、并口可选l 内置DC-DC转换电路,无需外加负压l 无需片选信号,简化软件设计l 工作温度: 0℃ - +55℃ ,存储温度: -20℃ - +60℃模块接口说明*注释1:如在实际应用中仅使用串口通讯模式,可将PSB接固定低电平,也可以将模块上的J8和“GND”用焊锡短接。

LCD12864显示程序

LCD12864显示程序

L C D12864显示程序(总3页) -CAL-FENGHAI.-(YICAI)-Company One1-CAL-本页仅作为文档封面,使用请直接删除本例程为通过用AT89C52芯片操作LCD12864显示的程序,使用的晶振为12M。

/**********************************************************程序说明:LCD12864显示主程序程序调试员:莫剑辉调试时间:2010-6-7**********************************************************/#include<reg52.h>#include"12864.c"void main(){Ini_Lcd(); //液晶初始化子程序Disp(1,0,6,"莫剑辉"); //显示数据到LCD12864子程序while(1);}这里我们通过调用下面的头文件就可以了,这样的做法方便我们以后要用到LCD12864的程序的调用。

/**********************************************************程序说明:LCD12864显示头文件程序调试员:莫剑辉调试时间:2010-6-7**********************************************************///#include<reg52.h>#define uchar unsigned char#define uint unsigned int#define DATA P2 //数据输出端0~7sbit RS=P0^0; //LCD12864 RS端sbit RW=P0^1; //LCD12864 RW端sbit E =P0^2; //LCD12864 E 端sbit PSB =P0^3;/*********************************************延时子程序*********************************************/void Delay_1ms(uint x){uint j,i;for(j=0;j<x;j++){for(i=0;i<120;i++); //延时X乘以120}}/*********************************************LCD12864液晶测忙子程序(读状态)*********************************************/void Busy(){uchar busy;do{E = 0; //0为关闭使能端,1为打开使能端RS = 0; //1为指令,0为数据RW = 1; //1为读,0为写Delay_1ms(20); //延时20乘以120时间E = 1; //0为关闭使能端,1为打开使能端busy=P1; //读取P2状态Delay_1ms(20); //延时20乘以120时间E = 0; //0为关闭使能端,1为打开使能端}while(busy&0x80); //判断BUSY位是否工作:1为内部在工作,0为正常状态}/*********************************************LCD12864液晶数据写入子程序*********************************************/void Write_Data(uchar k){Busy(); //测忙E =1; //0为关闭使能端,1为打开使能端RS=1; //1为指令,0为数据RW=0; //1为读,0为写DATA=k; //输入数据K到DATADelay_1ms(20); //延时20乘以120时间E =0; //0为关闭使能端,1为打开使能端Delay_1ms(20); //延时20乘以120时间}/*********************************************LCD12864液晶命令写入子程序*********************************************/void Write_Cmd(uchar cmd){Busy(); //测忙E=1; //0为关闭使能端,1为打开使能端RS=0; //1为指令,0为数据RW=0; //1为读,0为写DATA=cmd; //输入命令cmd到DATADelay_1ms(20); //延时20乘以120时间E=0; //0为关闭使能端,1为打开使能端Delay_1ms(20); //延时20乘以120时间}/*********************************************LCD12864液晶数据显示子程序*********************************************/void Disp(uchar y,uchar x,uchar i,uchar *z){uchar Address;if(y==1){Address=0x80+x;} //Y判断第几行,X判断第几列,0x80为液晶行初始地址if(y==2){Address=0x90+x;}if(y==3){Address=0x88+x;}if(y==4){Address=0x98+x;}Write_Cmd(Address); //写入地址命令到LCD12864while(i) //写入显示数据的大小{Write_Data(*(z++)); //写入显示数据到LCD12864i--;}}/*********************************************LCD12864液晶初始化子程序*********************************************/void Ini_Lcd(void){PSB=1;Delay_1ms(20);Write_Cmd(0x30); //基本指令集Delay_1ms(20);Write_Cmd(0x02); // 地址归位Delay_1ms(20);Write_Cmd(0x0c); //整体显示打开,游标关闭Delay_1ms(20);Write_Cmd(0x06); //游标右移Delay_1ms(20);Write_Cmd(0x80); //设定显示的起始地址Delay_1ms(20);Write_Cmd(0x01); //清除显示}。

LCD 12864液晶显示汉字程序

LCD 12864液晶显示汉字程序
0x02,0x01,0x00,0xFF,0x00,0x82,0x41,0x22,0x14,0x09,0x14,0x23,0x40,0xC0,0x40,0x00,
/*--文字: --*/
/*--宋体12;此字体下对应的点阵为:宽x高=16x16 --*/
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,
/*--文字: --*/
/*--宋体12;此字体下对应的点阵为:宽x高=16x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x04,0x04,0x04,0x04,0x44,0x84,0x7E,0x05,0x04,0x04,0x04,0x04,0x04,0x04,0x00,
/*--文字: --*/
/*--宋体12;此字体下对应的点阵为:宽x高=16x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x40,0x20,0x10,0x0E,0x10,0x20,0x3F,0x44,0x44,0x44,0x44,0x44,0x40,0x40,0x00,
/*--文字:地--*/
/*--宋体12;此字体下对应的点阵为:宽x高=16x16 --*/

多种12864液晶屏显示程序

多种12864液晶屏显示程序

多种12864液晶屏显示程序(1)#include#define uchar unsigned char#define uint unsigned int#define lcddata P0sbit RS=P2^0;sbit RW=P2^1;sbit E=P2^2;sbit PSB=P2^3;void delayms(uint n)//1T单片机毫秒延时函数{ unsigned int x;while(n--){x=627;while(x--);}}void delayus(uint t)//1T单片机微秒延时函数{ unsigned int a,b;for(b=t;b>0;b--)for(a=3;a>0;a--);}bit lcdbusy() //忙检查{bit result;RS=0;RW=1;E=1;delayus(5);result=(bit)(P0&0x80);E=0;return(result) ;}void writecmd(uchar cmd) //写命令{while(lcdbusy()) ;RS=0;RW=0;E=0;delayus(5);P0=cmd;delayus(10);E=1;delayus(5);E=0;}void writedat(uchar dat) //写数据{while(lcdbusy()) ;RS=1;RW=0;E=0;delayus(5);P0=dat;delayus(10);E=1;delayus(5);E=0;}void print(uchar place,uchar num,uchar *point)//液晶屏显示数组{uchar i,progdata;writecmd(place);for(i=0;i<="">{progdata=*(point+i);writedat(progdata);}}void lcdclear(){unsigned char i;writecmd(0x30);writecmd(0x80);writecmd(0x01);delayus(20);for(i=0;i<64;i++)writedat(' ');}void lcdinit()//液晶屏初始化{PSB=1;//并口方式writecmd(0x30);//基本指令操作delayms(5);writecmd(0x06);//写一个字符后地址指针自动加1 delayms(5);writecmd(0x0c);//开显示,关光标delayms(5);writecmd(0x01);//清屏指令delayms(5);}void main(){lcdinit();print(0x80,3,"战斗机");//起始位,显示汉字数print(0x85,3,"巡洋舰");print(0x8a,4,"航空母舰");while(1);}(2)#include#define uchar unsigned char#define uint unsigned int#define lcddata P0sbit RS=P2^0;sbit RW=P2^1;sbit E=P2^2;sbit PSB=P2^3;void delayms(uint n)//1T单片机毫秒延时函数{ unsigned int x;while(n--){x=627;while(x--);}}void delayus(uint t)//1T单片机微秒延时函数{ unsigned int a,b;for(b=t;b>0;b--)for(a=3;a>0;a--);}bit lcdbusy() //忙检查{bit result;RS=0;RW=1;E=1;delayus(5);result=(bit)(P0&0x80);E=0;return(result) ;}void writecmd(uchar cmd) //写命令{while(lcdbusy()) ;RS=0;RW=0;E=0;delayus(5);P0=cmd;delayus(10);E=1;delayus(5);E=0;}void writedat(uchar dat) //写数据{while(lcdbusy()) ;RS=1;RW=0;E=0;delayus(5);P0=dat;delayus(10);E=1;delayus(5);E=0;}void lcdpos(uchar x,uchar y)//液晶屏显示位置,x轴0~7,y轴0~7 {uchar pos;if(x==0){x=0x80;}else if(x==1){x=0x90;}else if(x==2){x=0x88;}else if(x==3){x=0x98;}pos=x+y;writecmd(pos);}void print(uchar *str) //液晶屏显示数组{while(*str!='\0'){writedat(*str);str++;}}void lcdclear()//液晶屏清屏函数{unsigned char i;writecmd(0x30);writecmd(0x80);writecmd(0x01);delayus(20);for(i=0;i<64;i++)writedat(' ');}void lcdinit()//液晶屏初始化{PSB=1;//并口方式writecmd(0x30);//基本指令操作delayms(5);writecmd(0x06);//写一个字符后地址指针自动加1 delayms(5); writecmd(0x0c);//开显示,关光标delayms(5);writecmd(0x01);//清屏指令delayms(5);}void main(){lcdinit();lcdpos(0,0);//起始位(行数,列数)print("战斗机");lcdpos(0,5);print("巡洋舰");lcdpos(2,2);print("航空母舰");while(1);}(3)#include#define uchar unsigned char#define uint unsigned int#define lcddata P0sbit RS=P2^0;sbit RW=P2^1;sbit E=P2^2;sbit PSB=P2^3;uchar code dis1[]="战斗机"; //液晶屏一行显示8个汉字,16个字节(i=0;i<16;i++)uchar code dis2[]="巡洋舰";uchar code dis3[]="航空母舰";void delayms(uint n)//1T单片机毫秒延时函数{unsigned int x;while(n--){x=627;while(x--);}}void delayus(uint t)//1T单片机微秒延时函数{unsigned int a,b;for(b=t;b>0;b--)for(a=3;a>0;a--);}bit lcdbusy() //忙检查{bit result;RW=1;E=1;delayus(5);result=(bit)(P0&0x80);E=0;return(result) ;}void writecmd(uchar cmd) //写命令{while(lcdbusy()) ;RS=0;RW=0;E=0;delayus(5);P0=cmd;delayus(10);E=1;delayus(5);E=0;}void writedat(uchar dat) //写数据{while(lcdbusy()) ;RS=1;RW=0;E=0;delayus(5);P0=dat;delayus(10);delayus(5);E=0;}void lcdpos(uchar x,uchar y)//液晶屏显示位置,x轴0~7,y轴0~7 {uchar pos;if(x==0){x=0x80;}else if(x==1){x=0x90;}else if(x==2){x=0x88;}else if(x==3){x=0x98;}pos=x+y;writecmd(pos);}void lcdclear()//液晶屏清屏函数{unsigned char i;writecmd(0x30);writecmd(0x80);writecmd(0x01);delayus(20);for(i=0;i<64;i++)writedat(' ');}void lcdinit()//液晶屏初始化{PSB=1;//并口方式writecmd(0x30);//基本指令操作delayms(5);writecmd(0x06);//写一个字符后地址指针自动加1delayms(5);writecmd(0x0c);//开显示,关光标delayms(5);writecmd(0x01);//清屏指令delayms(5);}void main(){uint i;lcdinit();lcdpos(0,0);//起始位(行数,列数)for(i=0;i<6;i++)//占用字节数(一个汉字占两个字节,一个字母、数字、符号占一个字节)writedat(dis1[i]);lcdpos(0,5);for(i=0;i<6;i++)writedat(dis2[i]);lcdpos(2,2);for(i=0;i<8;i++)writedat(dis3[i]);while(1);}(4)#include#define uchar unsigned char#define uint unsigned int#define lcddata P0sbit RS=P2^0;sbit RW=P2^1;sbit E=P2^2;sbit PSB=P2^3;uchar code dis1[]="战斗机"; //液晶屏一行显示8个汉字,16个字节(i=0;i<16;i++)uchar code dis2[]="巡洋舰";uchar code dis3[]="航空母舰";void delayms(uint n)//1T单片机毫秒延时函数{unsigned int x;while(n--){x=627;while(x--);}}void delayus(uint t)//1T单片机微秒延时函数{unsigned int a,b;for(b=t;b>0;b--)for(a=3;a>0;a--);}bit lcdbusy() //忙检查{bit result;RS=0;RW=1;E=1;delayus(5);result=(bit)(P0&0x80);E=0;return(result) ;}void writecmd(uchar cmd) //写命令{while(lcdbusy()) ;RS=0;RW=0;E=0;delayus(5);P0=cmd;delayus(10);E=1;delayus(5);E=0;}void writedat(uchar dat) //写数据{while(lcdbusy()) ;RS=1;RW=0;E=0;delayus(5);P0=dat;delayus(10);E=1;delayus(5);E=0;}void lcdpos(uchar x,uchar y)//液晶屏显示位置,x轴0~7,y轴0~7 {uchar pos;if(x==0){x=0x80;}else if(x==1){x=0x90;}else if(x==2){x=0x88;}else if(x==3){x=0x98;}pos=x+y;writecmd(pos);}void lcdclear()//液晶屏清屏函数{unsigned char i;writecmd(0x30);writecmd(0x80);writecmd(0x01);delayus(20);for(i=0;i<64;i++)writedat(' ');}void lcdinit()//液晶屏初始化{PSB=1;//并口方式writecmd(0x30);//基本指令操作delayms(5);writecmd(0x06);//写一个字符后地址指针自动加1 delayms(5); writecmd(0x0c);//开显示,关光标delayms(5);writecmd(0x01);//清屏指令delayms(5);}void main(){uint i;lcdinit();lcdpos(0,0);//起始位(行数,列数)i=0;while(dis1[i]!='\0'){writedat(dis1[i]);//显示字符i++;}lcdpos(0,5);i=0;while(dis2[i]!='\0'){writedat(dis2[i]);i++;}lcdpos(2,2);i=0;while(dis3[i]!='\0'){writedat(dis3[i]);i++;}while(1); }(5)#include#define uchar unsigned char#define uint unsigned intsbit CS=P2^0; //片选信号sbit SID=P2^1; //数据信号sbit SCLK=P2^2; //时钟信号sbit PSB=P2^3; //串并行选择,H并行,L串行sbit key=P3^0;unsigned char code temp1[]={"战斗机"}; unsigned char code temp2[]={"航空母舰"};void delayms(uint n)//毫秒延时{unsigned int x;while(n--){x=627;while(x--);}}void delay(uint m)//100us延时{unsigned int da,db;for(da=0;da<m;da++)< bdsfid="537" p=""></m;da++)<> for(db=0;db<100;db++);}void sendbyte(uchar bbyte) //发送一个字节{unsigned char i;for(i=0;i<8;i++){SID=bbyte&0x80;SCLK=1;SCLK=0;bbyte<<=1;}}void writechar(bit start,uchar ddata) //写指令或数据{unsigned char start_data,Hdata,Ldata;if(start==0)start_data=0xf8;elsestart_data=0xfa;Hdata=ddata&0xf0;Ldata=(ddata<<4)&0xf0;sendbyte(start_data);delay(5);sendbyte(Hdata);delay(1);sendbyte(Ldata);delay(1);}void lcdsetxy(uchar x,uchar y)//设置LCD显示的起始位置,X 为行,Y为列{uchar address;switch(x){case 0: address = 0x80 + y; break;case 1: address = 0x80 + y; break;case 2: address = 0x90 + y; break;case 3: address = 0x88 + y; break;case 4: address = 0x98 + y; break;default:address = 0x80 + y; break;}writechar(0, address);}void print(uchar X,uchar Y,uchar *s)//中英文字符串显示函数{lcdsetxy( X, Y );while (*s){writechar( 1, *s );s ++;delay(1);}}void lcdclear() //清屏函数{writechar(0,0x01);}void lcdinit(){delay(10);PSB=0;CS=1;writechar(0,0x30); writechar(0,0x0c); writechar(0,0x01); } void main(){lcdinit();print(1,2,temp1);print(3,2,temp2);while(1);}。

12864液晶屏驱动程序

12864液晶屏驱动程序
unsigned char BMPheight;
BMPwith=*PicData;
PicData++;
BMPheight=(*PicData)/8;
PicData++;
//BMPLen=BMPheight/8*BMPwith
for(BMPheightLen=0;BMPheightLen<BMPheight;BMPheightLen++)
Series = Series << 1;
}
}
/***********************************
** 函数名称: Write_Data
** 功能描述: 传送数据
** 输 入: dat
** 输 出 : 无
** 全局变量:无
** 调用模块: Busy,
******************************************/
//图像反色显示 0 否 1是
bit LCD_DisplayReserve_Driver;
//定义LCD显示的全局变量
#define CS_Port P3_0
#define A0_Port P3_1
#define SI_Port P3_2
{
switch (PIN)
{
case CS :
CS_Port=1;
break;
case A0 :
A0_Port=1;
break;
case SI :
SI_Port=1;
break;
case SCL :
SCL_Port=1;

12864液晶显示汉字程序

12864液晶显示汉字程序

/*=============================程序说明=============================== 项目名称: 显示汉字作者:创建日期:修改说明:程序说明:(1)CPU 型号:(2)时钟频率:(3)实现功能:(4)程序概述:===================================================================*/ //==========================头文件加载=============================== #include <mega16.h>#include <delay.h>#include "music.h"//===========================端口声明================================ #define LcdRS PORTB.0 //#define LcdRSDDR DDRB.0 //#define LcdRW PORTB.1 //#define LcdRWDDR DDRB.1 //#define LcdEN PORTB.4 //#define LcdENDDR DDRB.4 //#define LcdRST PORTB.6 //#define LcdRSTDDR DDRB.6 //#define LcdIoIn PORTA //#define LcdIoOut PINA //#define LcdIoDDR DDRA //#define LcdIn() LcdIoDDR = 0xff //调整输入输出#define LcdOut() LcdIoDDR = 0x00//=========================全局常量声明============================== //=========================全局变量声明==============================//===========================函数声明================================ void Lcd_init(void);void Lcd_CheckBusy(void);void Lcd_WriteCommand(uint8 com);void Lcd_WriteDat(uint8 Dat);void Lcd_writeStringRom(uint8 Add, uint8 flash String[]);//============================主函数================================= void main()//主函数{//---------------------------系统初始化--------------------------Lcd_init();music_init();Lcd_writeStringRom(0x80, "梁成颂");while(1){}}//===========================功能子函数================================ void Lcd_init(void){LcdRS = 1;LcdRSDDR = 1;LcdRW = 1;LcdRWDDR = 1;LcdEN = 1;LcdENDDR = 1;LcdRST = 1; //LcdRSTDDR = 1;LcdIoIn = 1; //LcdIoDDR = 1;LcdIoIn = 0xff; //LcdIn(); //LcdRST = 0;delay_ms(20);LcdRST = 1;delay_ms(50);Lcd_WriteCommand(0x38); //系统设置delay_ms(1);Lcd_WriteCommand(0x38); //系统设置Lcd_WriteCommand(0x08); //开显示Lcd_WriteCommand(0x01); //清屏Lcd_WriteCommand(0x06); //光标设置Lcd_WriteCommand(0x0c); //开显示Lcd_WriteCommand(0x01); //清屏}void Lcd_CheckBusy(void) //怕忙检测{LcdOut();LcdRS = 0;LcdRW = 1;LcdEN = 1;while((LcdIoOut & 0x80) == 0x80);LcdEN = 0;}void Lcd_WriteCommand(uint8 com) //写指令{Lcd_CheckBusy();LcdIn();LcdRS = 0;LcdRW = 0;LcdEN = 1;LcdIoIn = com;LcdEN = 0;}void Lcd_WriteDat(uint8 Dat) //写指令{Lcd_CheckBusy();LcdIn();LcdRS = 1;LcdRW = 0;LcdEN = 1;LcdIoIn = Dat;LcdEN = 0;}void Lcd_writeStringRom(uint8 Add, uint8 flash String[]) {uint16 i = 0;Lcd_WriteCommand(Add);while(String[i] != '\0'){Lcd_WriteDat(String[i]);i++;}}。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

#include <REG52.H>sbit LCD12864_RS = P2^0; //RS控制引脚sbit LCD12864_RW = P2^1; //RW控制引脚sbit LCD12864_EN = P2^2; //EN控制引脚sbit LCD12864_PSB = P2^3; //模式选择引脚,ST7920控制器,1为8位并行接口,0为串行接口#define LCDPORT P0//数据引脚void LCD12864_Init(void); //LCD12864初始化函数void LCD12864_WriteInfomation(unsigned char ucData,bit bComOrData); //向LCD12864写入数据,bComOrData为1时写入的是数据,0时写入的是命令void LCD12864_CheckBusy(void);//忙检测函数void LCD12864_DisplayImage(unsigned char code *ucImage);void Delay(unsigned int uiCount);unsigned char code ucPic1[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x30,0x01,0xE0,0x00,0x00,0x2A,0x00,0x00,0xD8,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x7B,0x63,0xE0,0x00,0x00,0x22,0x00,0x01,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFB,0x63,0x07,0x34,0x00,0x14,0x00,0x01,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0xDB,0x63,0x01,0xBC,0x00,0x08,0x00,0x00,0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x1B,0x63,0x07,0xB0,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x1B,0x63,0xED,0xB0,0xDB,0x00,0x01,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x19,0xE1,0xE7,0xB0,0xDB,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x19,0xE1,0xE7,0xB0,0xDB,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x0A,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x00,0x00,0xFF,0xF8,0xE0,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0xC0,0x15,0x00,0x1F,0xFF,0xFF,0xC0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x20,0x11,0x00,0xFB,0xFF,0xE1,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x20,0x0A,0x03,0x9F,0x00,0x9E,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x40,0x04,0x0E,0x70,0x00,0x81,0xC7,0x80,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x02,0x80,0x00,0x1D,0x80,0x00,0xE0,0x61,0xE0,0x02,0xA0,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x77,0x9F,0xFC,0xF0,0x18,0xF8,0x02,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xDF,0x00,0x00,0xF3,0x0C,0x3C,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x9E,0x00,0x00,0xF8,0x06,0x1E,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0E,0x30,0x01,0xFC,0x7F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0E,0x30,0x01,0xFC,0x7F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0xFF,0xFF,0xFF,0xFF,0xFF,0x83,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFD,0xFF,0xFF,0xFF,0xFF,0xFC,0x01,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x81,0xFF,0x00,0x00,0x00,0x00,0x1F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xF0,0x00,0x00,0x01,0x00,0x00,0xC0,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x07,0x80,0x00,0x03,0xE0,0x07,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x03,0x40,0x00,0x03,0xE0,0x0C,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0xC0,0x00,0x00,0x20,0x18,0x00,0x07,0x00,0x00,0x00,0x00,0x00, 0x00,0x09,0x01,0x80,0x60,0x00,0x00,0x20,0x73,0x9F,0x03,0x80,0x00,0x00,0x00,0x00, 0x00,0x1E,0x0F,0xF2,0x20,0x00,0x00,0x20,0x67,0xFF,0xC1,0xC0,0x00,0x00,0x00,0x00, 0x00,0x1E,0x1F,0xF9,0x30,0x00,0x00,0x20,0xEF,0xFF,0xE0,0xE0,0x00,0x00,0x00,0x00, 0x00,0x38,0x3F,0xFC,0x90,0x00,0x00,0x20,0xCB,0xFF,0xF9,0xF0,0x00,0x00,0x00,0x00, 0x00,0x7F,0x7F,0xFE,0x10,0x00,0x00,0x20,0xDB,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00, 0x00,0x6E,0xF9,0xBF,0x10,0x00,0x00,0x20,0xF7,0xED,0xFF,0xF0,0x00,0x00,0x00,0x00, 0x00,0x7C,0xFC,0x3F,0x10,0x00,0x00,0x20,0x67,0xE1,0xFD,0xE0,0x00,0x00,0x00,0x00, 0x00,0x7C,0xFC,0x3F,0x10,0x00,0x00,0x20,0x67,0xE1,0xFD,0xE0,0x00,0x00,0x00,0x00, 0x00,0x38,0xFC,0x3F,0x18,0x00,0x00,0x20,0x87,0xE0,0xFD,0xC0,0x00,0x00,0x00,0x00, 0x00,0x38,0xF1,0x8F,0x18,0x00,0x1F,0xE7,0x87,0x9C,0x7D,0xC0,0x00,0x00,0x00,0x00, 0x00,0x1C,0xFE,0x1F,0x81,0xFF,0xFF,0xC0,0x0F,0xE0,0xFF,0x80,0x00,0x00,0x00,0x00, 0x00,0x0C,0xFC,0x3F,0x80,0x00,0x00,0x00,0x0F,0xE1,0xF8,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0xF9,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEC,0xFE,0x00,0x00,0x00,0x00,0x00, 0x00,0x03,0xF9,0xBF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00, 0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,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,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,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,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,0x00,0x00,0x00,0x00 };unsigned char code ucPic[]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xF0,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x18,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xFF,0xDC,0x00,0x01, 0x80,0x00,0x1F,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xFF,0xBC,0x00,0x01, 0x80,0x00,0x30,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x01,0x7F,0xFF,0xB8,0x00,0x01, 0x80,0x00,0x30,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x01,0x7F,0xFF,0x78,0x00,0x01,0x80,0x00,0x19,0xFF,0xFE,0xC0,0x00,0x00,0x00,0x00,0x02,0xFF,0xFF,0x70,0x00,0x01, 0x80,0x00,0x18,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x02,0xFF,0xFE,0xF0,0x00,0x01, 0x80,0x00,0x0C,0x01,0xFF,0x60,0x00,0x00,0x00,0x00,0x05,0xFF,0xFE,0xE0,0x00,0x01, 0x80,0x00,0x0C,0x7F,0xD0,0x20,0x00,0x00,0x00,0x00,0x05,0xFF,0xFD,0xE0,0x00,0x01, 0x80,0x00,0x06,0x00,0x0F,0xB0,0x00,0x00,0x00,0x00,0x0B,0xFF,0xFD,0xC0,0x00,0x01, 0x80,0x00,0x06,0x03,0xFC,0x10,0x00,0x00,0x00,0x00,0x0B,0xFF,0xFB,0xC0,0x00,0x01, 0x80,0x00,0x03,0x1F,0x00,0x18,0x00,0x00,0x00,0x00,0x17,0xFF,0xFB,0x80,0x00,0x01, 0x80,0x00,0x03,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x17,0xFF,0xF7,0x80,0x00,0x01,0x80,0x00,0x01,0x80,0x00,0x0C,0x00,0x00,0x00,0x00,0x17,0xFF,0xF7,0x00,0x00,0x01, 0x80,0x00,0x01,0x80,0x00,0x04,0x00,0x00,0x00,0x00,0x09,0xFF,0xEF,0x00,0x00,0x01, 0x80,0x00,0x00,0xC0,0x00,0xF6,0x00,0x00,0x00,0x00,0x06,0x7F,0xEE,0x00,0x00,0x01, 0x80,0x00,0x00,0xC0,0x03,0xC2,0x00,0x00,0x00,0x00,0x01,0x9F,0xDE,0x00,0x00,0x01, 0x80,0x00,0x00,0x60,0x00,0x3B,0x00,0x00,0x00,0x00,0x00,0x67,0xDF,0x00,0x00,0x01, 0x80,0x00,0x00,0x60,0x00,0xE3,0x00,0x00,0x00,0x00,0x00,0x19,0xBF,0x00,0x00,0x01, 0x80,0x00,0x00,0x30,0x03,0x8E,0x00,0x00,0x00,0x00,0x00,0x06,0x3F,0x00,0x00,0x01,0x80,0x00,0x00,0x30,0x06,0x3C,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0x00,0x00,0x01, 0x80,0x00,0x00,0x18,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x01,0x80,0x00,0x00,0x18,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x0F,0x7F,0x80,0x00,0x01, 0x80,0x00,0x00,0x0C,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x1F,0xC0,0x00,0x01, 0x80,0x00,0x00,0x0C,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x07,0xE0,0x00,0x01, 0x80,0x00,0x00,0x06,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x1F,0xE0,0x00,0x01, 0x80,0x00,0x00,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x3F,0xC0,0x00,0x01, 0x80,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0xFF,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFC,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF0,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x01, 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x05,0x40,0x88,0x04,0x01,0x08,0x00,0x00,0x0A,0x81,0x10,0x04,0x00,0x20,0x01, 0x80,0x79,0x21,0x08,0x02,0x21,0x49,0x00,0x00,0xF2,0x42,0x10,0x04,0x47,0x10,0x01,0x80,0x09,0x07,0xDF,0x7F,0xF7,0xAA,0x00,0x00,0x12,0x0F,0xBE,0x7F,0xE5,0xFE,0x01, 0x80,0x7F,0xF4,0x51,0x08,0x81,0x2C,0x00,0x00,0xFF,0xE8,0xA2,0x44,0x47,0x00,0x01, 0x80,0x09,0x04,0x61,0x08,0x81,0x7F,0x00,0x00,0x12,0x08,0xC2,0x7F,0xC5,0x4A,0x01, 0x80,0x0B,0x24,0x51,0x08,0x83,0x81,0x00,0x00,0x16,0x48,0xA2,0x44,0x45,0x6A,0x01, 0x80,0x1D,0x47,0xC9,0x05,0x05,0x01,0x00,0x00,0x3A,0x8F,0x92,0x44,0x47,0x52,0x01, 0x80,0x68,0x84,0x49,0x05,0x05,0x7F,0x00,0x00,0xD1,0x08,0x92,0x7F,0xC5,0x6A,0x01, 0x80,0x09,0x94,0x41,0x02,0x01,0x01,0x00,0x00,0x13,0x28,0x82,0x44,0x05,0x4A,0x01, 0x80,0x0E,0x57,0xC1,0x0D,0x81,0x01,0x00,0x00,0x1C,0xAF,0x82,0x04,0x29,0x42,0x01,0x80,0x38,0x34,0x4E,0x70,0x71,0x7F,0x00,0x00,0x70,0x68,0x9C,0x03,0xEB,0x7E,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,};//图像数据unsigned char code ucPic2[]={/*-- 调入了一幅图像:C:\Users\Administrator\Desktop\光盘内容\13.工具软件\8X8点阵取字模软件\BMP图片\位图(1bit)\01.bmp --*//*-- 宽度x高度=128x64 --*/0x00,0x00,0x00,0x01,0x85,0xFD,0x7D,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x0B,0xD0,0x1B,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0B,0xE0,0x06,0xBF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1A,0x1F,0x80,0x01,0x5F,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x26,0x0F,0x00,0x00,0x15,0xFF,0xFF,0xFF,0xD0,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x14,0x5C,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xE0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1E,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xA8,0xB8,0x00,0x00,0x01,0x7F,0xFF,0xFF,0xE8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x38,0x00,0x00,0x00,0x9F,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA0,0x60,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0x70,0x00,0x00,0x00,0x1F,0xDF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x40,0xC0,0x00,0x00,0x00,0x3F,0xDF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC1,0xE0,0x00,0x00,0x00,0x27,0xEF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x81,0xE0,0x00,0x00,0x00,0x0F,0xF7,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x89,0x70,0x00,0x00,0x00,0x05,0xF7,0xFF,0xFE,0x00,0x08,0xC0,0x00,0x00,0x00,0x05,0x13,0x18,0x00,0x00,0x00,0x03,0xFB,0xFF,0xFE,0x00,0x14,0x80,0x00,0x00,0x00,0x03,0x0B,0x04,0x00,0x00,0x00,0x05,0xFB,0xFF,0xFF,0x00,0x3F,0xE0,0x00,0x00,0x00,0x0A,0xA6,0x00,0x00,0x00,0x00,0x0B,0xFD,0xFF,0xFE,0x00,0x2E,0xC0,0x00,0x00,0x00,0x06,0x17,0x80,0x00,0x00,0x00,0x02,0xFD,0xFF,0xFF,0x80,0x17,0x40,0x00,0x00,0x10,0x15,0x27,0xE0,0x00,0x00,0x00,0x0F,0xFC,0xFF,0xFF,0x00,0x0D,0x80,0x00,0x00,0x04,0x0E,0xAE,0x70,0x00,0x00,0x00,0x01,0xFE,0xFF,0xFF,0x80,0x05,0x00,0x00,0x00,0x08,0x18,0x8E,0x78,0x00,0x00,0x00,0x0F,0xFE,0xFF,0xEF,0x80,0x02,0x00,0x00,0x00,0x00,0x0D,0x4F,0x5C,0x00,0x03,0xF0,0x01,0xFF,0x7F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x16,0x91,0xB8,0x00,0x05,0xFE,0x07,0xFE,0x7F,0xF7,0xC0,0x00,0x04,0x00,0x00,0x00,0x15,0x98,0x1C,0x00,0x00,0x0F,0x80,0xFF,0xBF,0xFF,0xE0,0x00,0x14,0x00,0x00,0x00,0x2A,0xA0,0x00,0x00,0x00,0x01,0xC7,0xFF,0x7F,0xFB,0xE0,0x00,0x08,0x00,0x00,0x00,0x25,0xA0,0x00,0x00,0x00,0x00,0xC0,0xFF,0xBF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x2F,0x40,0x00,0x00,0x06,0x80,0x42,0xFF,0xBF,0xFB,0xF0,0x00,0x00,0x00,0x00,0x00,0x2B,0x80,0x00,0x00,0x0B,0xE0,0x2A,0xFF,0xDF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x33,0xF0,0x07,0xFF,0xBF,0xFC,0xF0,0x00,0x00,0x00,0x00,0x00,0x2E,0x80,0x00,0x00,0x32,0xF8,0x00,0xFF,0xEF,0xFE,0xF8,0x00,0x00,0x00,0x00,0x00,0x7D,0x00,0x00,0x00,0x03,0xD8,0x07,0xFF,0xBF,0xFF,0x38,0x00,0x68,0x00,0x00,0x00,0x3D,0x00,0x00,0x00,0x03,0xBC,0x01,0xFF,0xDF,0xFF,0xB8,0x00,0x56,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x2C,0x0B,0xFF,0xFF,0xFF,0x98,0x00,0xFC,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x05,0xFF,0xDB,0xFF,0xDC,0x00,0x34,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xDF,0xFF,0xCC,0x00,0x28,0x00,0x1B,0x00,0xDE,0x00,0x00,0x00,0x00,0x00,0x0B,0xFF,0xDF,0xFF,0xCC,0x00,0x10,0x00,0x2A,0x81,0xFE,0x00,0x00,0x00,0x00,0x00,0x17,0xFF,0xED,0xFF,0x4C,0x00,0x00,0x00,0x1F,0x80,0xFE,0x00,0x00,0x00,0x00,0x00,0x0B,0xFF,0xFF,0xFF,0xCE,0x00,0x00,0x00,0x16,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x57,0xFF,0xFD,0xFF,0xCC,0x00,0x00,0x00,0x0A,0x01,0x7E,0x00,0x00,0x00,0x00,0x00,0x17,0xFF,0xBF,0xFF,0xC6,0x00,0x00,0x00,0x04,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x5F,0xFF,0xBE,0xFF,0x8E,0x08,0x00,0x00,0x00,0x01,0x7E,0x00,0x00,0x00,0x00,0x00,0x2F,0xEF,0xFF,0xFF,0xEE,0x02,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xEF,0x7F,0xCC,0x04,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x5F,0xFF,0xF7,0xFF,0xEE,0x00,0x00,0x00,0x00,0x00,0x3B,0x00,0x00,0x00,0x00,0x00,0x7C,0xFF,0xEE,0xBF,0xCE,0x00,0x00,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x00,0x00,0xBF,0x3F,0xF7,0xFF,0xEE,0x00,0x00,0x00,0x00,0x00,0x37,0x80,0x80,0x00,0x00,0x01,0x7F,0xFF,0xFF,0xDF,0xFC,0x00,0x00,0x00,0x00,0x00,0x1B,0x80,0x60,0x00,0x00,0x00,0x7F,0xFF,0xF7,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x1A,0x80,0x15,0x40,0x00,0x02,0xFF,0xFF,0xF7,0xBF,0xFC,0x00,0x00,0x00,0x00,0x00,0x0A,0x40,0x0F,0xFC,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x0A,0x00,0x00,0x00,0x08,0xC0,0x00,0xFC,0x00,0x02,0xFF,0xFF,0xFB,0xDF,0xF4,0x00,0x04,0x00,0x00,0x00,0x04,0x40,0x01,0xE0,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x07,0xFF,0xFF,0xFB,0xDF,0xF8,0x00,0x00,0x00,0x00,0x00,0x01,0x60,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xEF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xDF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFD,0xFF,0xD0,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xBF,0xFF,0xFF,0xFF,0xEF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xC0,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xF7,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xF8,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFB,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFC,0x00,0x00,0x3F,0xFF,0xFF,0xFF,0xF7,0xF4,0x00,0x00,0x00,};unsigned char code ucPic3[]={/*-- 调入了一幅图像:C:\Users\Administrator\Desktop\光盘内容\13.工具软件\8X8点阵取字模软件\BMP图片\位图(1bit)\01.bmp --*//*-- 宽度x高度=128x64 --*/0x00,0x00,0x00,0x01,0x85,0xFD,0x7D,0xFF,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x0B,0xD0,0x1B,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0B,0xE0,0x06,0xBF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x1A,0x1F,0x80,0x01,0x5F,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x26,0x0F,0x00,0x00,0x15,0xFF,0xFF,0xFF,0xD0,0x00,0x80,0x00,0x00, 0x00,0x00,0x00,0x14,0x5C,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xE0,0x02,0x00,0x00,0x00, 0x00,0x00,0x00,0x18,0x1E,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xF0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xA8,0xB8,0x00,0x00,0x01,0x7F,0xFF,0xFF,0xE8,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x31,0x38,0x00,0x00,0x00,0x9F,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA0,0x60,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x62,0x70,0x00,0x00,0x00,0x1F,0xDF,0xFF,0xFC,0x00,0x00,0x00,0x00, 0x00,0x00,0x01,0x40,0xC0,0x00,0x00,0x00,0x3F,0xDF,0xFF,0xF8,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0xC1,0xE0,0x00,0x00,0x00,0x27,0xEF,0xFF,0xFC,0x00,0x00,0x00,0x00, 0x00,0x00,0x02,0x81,0xE0,0x00,0x00,0x00,0x0F,0xF7,0xFF,0xFC,0x00,0x00,0x00,0x00, 0x00,0x00,0x05,0x89,0x70,0x00,0x00,0x00,0x05,0xF7,0xFF,0xFE,0x00,0x08,0xC0,0x00, 0x00,0x00,0x05,0x13,0x18,0x00,0x00,0x00,0x03,0xFB,0xFF,0xFE,0x00,0x14,0x80,0x00, 0x00,0x00,0x03,0x0B,0x04,0x00,0x00,0x00,0x05,0xFB,0xFF,0xFF,0x00,0x3F,0xE0,0x00, 0x00,0x00,0x0A,0xA6,0x00,0x00,0x00,0x00,0x0B,0xFD,0xFF,0xFE,0x00,0x2E,0xC0,0x00, 0x00,0x00,0x06,0x17,0x80,0x00,0x00,0x00,0x02,0xFD,0xFF,0xFF,0x80,0x17,0x40,0x00, 0x00,0x10,0x15,0x27,0xE0,0x00,0x00,0x00,0x0F,0xFC,0xFF,0xFF,0x00,0x0D,0x80,0x00, 0x00,0x04,0x0E,0xAE,0x70,0x00,0x00,0x00,0x01,0xFE,0xFF,0xFF,0x80,0x05,0x00,0x00, 0x00,0x08,0x18,0x8E,0x78,0x00,0x00,0x00,0x0F,0xFE,0xFF,0xEF,0x80,0x02,0x00,0x00, 0x00,0x00,0x0D,0x4F,0x5C,0x00,0x03,0xF0,0x01,0xFF,0x7F,0xFF,0xC0,0x00,0x00,0x00, 0x00,0x00,0x16,0x91,0xB8,0x00,0x05,0xFE,0x07,0xFE,0x7F,0xF7,0xC0,0x00,0x04,0x00, 0x00,0x00,0x15,0x98,0x1C,0x00,0x00,0x0F,0x80,0xFF,0xBF,0xFF,0xE0,0x00,0x14,0x00, 0x00,0x00,0x2A,0xA0,0x00,0x00,0x00,0x01,0xC7,0xFF,0x7F,0xFB,0xE0,0x00,0x08,0x00, 0x00,0x00,0x25,0xA0,0x00,0x00,0x00,0x00,0xC0,0xFF,0xBF,0xFF,0xE0,0x00,0x00,0x00, 0x00,0x00,0x2F,0x40,0x00,0x00,0x06,0x80,0x42,0xFF,0xBF,0xFB,0xF0,0x00,0x00,0x00, 0x00,0x00,0x2B,0x80,0x00,0x00,0x0B,0xE0,0x2A,0xFF,0xDF,0xFF,0xF0,0x00,0x00,0x00, 0x00,0x00,0x37,0x00,0x00,0x00,0x33,0xF0,0x07,0xFF,0xBF,0xFC,0xF0,0x00,0x00,0x00, 0x00,0x00,0x2E,0x80,0x00,0x00,0x32,0xF8,0x00,0xFF,0xEF,0xFE,0xF8,0x00,0x00,0x00, 0x00,0x00,0x7D,0x00,0x00,0x00,0x03,0xD8,0x07,0xFF,0xBF,0xFF,0x38,0x00,0x68,0x00, 0x00,0x00,0x3D,0x00,0x00,0x00,0x03,0xBC,0x01,0xFF,0xDF,0xFF,0xB8,0x00,0x56,0x00, 0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x2C,0x0B,0xFF,0xFF,0xFF,0x98,0x00,0xFC,0x00, 0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x05,0xFF,0xDB,0xFF,0xDC,0x00,0x34,0x00, 0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xDF,0xFF,0xCC,0x00,0x28,0x00, 0x1B,0x00,0xDE,0x00,0x00,0x00,0x00,0x00,0x0B,0xFF,0xDF,0xFF,0xCC,0x00,0x10,0x00, 0x2A,0x81,0xFE,0x00,0x00,0x00,0x00,0x00,0x17,0xFF,0xED,0xFF,0x4C,0x00,0x00,0x00, 0x1F,0x80,0xFE,0x00,0x00,0x00,0x00,0x00,0x0B,0xFF,0xFF,0xFF,0xCE,0x00,0x00,0x00, 0x16,0x01,0xFE,0x00,0x00,0x00,0x00,0x00,0x57,0xFF,0xFD,0xFF,0xCC,0x00,0x00,0x00, 0x0A,0x01,0x7E,0x00,0x00,0x00,0x00,0x00,0x17,0xFF,0xBF,0xFF,0xC6,0x00,0x00,0x00, 0x04,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x5F,0xFF,0xBE,0xFF,0x8E,0x08,0x00,0x00, 0x00,0x01,0x7E,0x00,0x00,0x00,0x00,0x00,0x2F,0xEF,0xFF,0xFF,0xEE,0x02,0x00,0x00, 0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xEF,0x7F,0xCC,0x04,0x00,0x00, 0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x5F,0xFF,0xF7,0xFF,0xEE,0x00,0x00,0x00, 0x00,0x00,0x3B,0x00,0x00,0x00,0x00,0x00,0x7C,0xFF,0xEE,0xBF,0xCE,0x00,0x00,0x00,0x00,0x00,0x1D,0x00,0x00,0x00,0x00,0x00,0xBF,0x3F,0xF7,0xFF,0xEE,0x00,0x00,0x00, 0x00,0x00,0x37,0x80,0x80,0x00,0x00,0x01,0x7F,0xFF,0xFF,0xDF,0xFC,0x00,0x00,0x00, 0x00,0x00,0x1B,0x80,0x60,0x00,0x80,0x00,0x7F,0xFF,0xF7,0xFF,0xFE,0x00,0x00,0x00, 0x00,0x00,0x1A,0x80,0x15,0x43,0x00,0x02,0xFF,0xFF,0xF7,0xBF,0xFC,0x00,0x00,0x00, 0x00,0x00,0x0A,0x40,0x0F,0xFE,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x0A,0x00, 0x00,0x00,0x08,0xC0,0x00,0xFC,0x00,0x02,0xFF,0xFF,0xFB,0xDF,0xF4,0x00,0x04,0x00, 0x00,0x00,0x04,0x40,0x01,0xE0,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00, 0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x07,0xFF,0xFF,0xFB,0xDF,0xF8,0x00,0x00,0x00, 0x00,0x00,0x01,0x60,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xEF,0xF8,0x00,0x00,0x00, 0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xDF,0xF0,0x00,0x00,0x00, 0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xFD,0xFF,0xD0,0x00,0x00,0x00, 0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xBF,0xFF,0xFF,0xFF,0xEF,0xE0,0x00,0x00,0x00, 0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xC0,0x00,0x00,0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,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,0xFF,0xFF, };/****************************************************************************** 函数名称:main函数功能:主函数,程序如路口入口参数:无返回值:无备注:无******************************************************************************* /void main(void){LCD12864_Init(); //初始化液晶//LCD12864_DisplayImage(ucPic);while(1){LCD12864_DisplayImage(ucPic);Delay(80000);LCD12864_DisplayImage(ucPic1);Delay(80000);LCD12864_DisplayImage(ucPic2);Delay(80000);LCD12864_DisplayImage(ucPic3);Delay(80000);// LCD12864_DisplayImage(ucPic4);};}/****************************************************************************** 函数名称:LCD12864_WriteInfomation函数功能:向LCD12864写入命令或者数据入口参数:ucData-要写入液晶的数据或者命令的内容bComOrData-命令或者数据的标志位选择,0或者1,其中1:写入的是数据0:写入的是命令返回值:无备注:无******************************************************************************* /void LCD12864_WriteInfomation(unsigned char ucData,bit bComOrData){LCD12864_CheckBusy();//忙检测LCD12864_RW = 0;//拉低RWLCD12864_RS = bComOrData;//根据标志位判断写入的是命令还是数据Delay(10); //延时,等待操作LCDPORT = ucData; //将数据送至数据端口LCD12864_EN = 1; //使能信号。

相关文档
最新文档