12864-ks0108--C语言

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

/***********************************************************************无字库12864测试程序(纵向取模。字节倒序)crasyboye***********************************************************************/#includereg52.h#includectype.h#includestring.h#includestdlib.h#includestdio.h#includemath.h/*Definetheregistercommandcode*/#defineDisp_On0x3f#defineDisp_Off0x3e#defineCol_Add0x40#definePage_Add0xb8#defineStart_Line0xc0#defineLcd_BusP1//MCUP1------LCMsbitBf=P0^7;//CheckflagsbitMcs=P2^6;//MasterchipenablesbitScs=P2^5;//Slavechipenablesbitbusy_cs=P3^4;//坚鸿万能测试架增加的指令,控制P0.7输入输出。sbitEnable=P2^1;//6800modeEnablesinglesbitDi=P2^0;//DataorInstrumentSelectsbitRW=P2^7;//WriteorReadsbitLcd_Rst=P2^4;//Lcmresetvoidint_zhongduan();voiddelay(unsignedintt);voidchk_busy();voidwrite_com(unsignedcharcmdcode);voidwrite_data(unsignedcharDispdata);voidframe();voidClr_Scr();voidDisp_Img(unsignedcharcode*img);voidDisp_H_Line();voidDisp_V_Line();voidDisp_dots();voidhz_disp16(unsignedcharpag,unsignedcharcol,unsignedcharcode*hzk);voidinit_lcd();voidMsg(intflg);unsignedcharbusy_flag=1;charcodece[]={/*--文字:测--*//*--宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x08,0x31,0x86,0x60,0x00,0xFE,0x02,0xF2,0x02,0xFE,0x00,0xF8,0x00,0x00,0xFF,0x00,0x04,0xFC,0x03,0x00,0x80,0x47,0x30,0x0F,0x10,0x67,0x00,0x07,0x40,0x80,0x7F,0x00};charcodeshi[]={/*--文字:试--*//*--宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x40,0x42,0xDC,0x08,0x00,0x90,0x90,0x90,0x90,0x90,0xFF,0x10,0x12,0x1C,0x10,0x00,0x00,0x00,0x7F,0x20,0x10,0x20,0x20,0x1F,0x10,0x10,0x01,0x06,0x18,0x20,0x78,0x00};charcodekai[]={/*--文字:开--*//*--宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x40,0x42,0x42,0x42,0x42,0xFE,0x42,0x42,0x42,0x42,0xFE,0x42,0x42,0x42,0x42,0x00,0x00,0x40,0x20,0x10,0x0C,0x03,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00};charcodeshi3[]={/*--文字:始--*//*--宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x10,0x90,0x70,0x1F,0x12,0xF0,0x00,0x20,0x70,0x28,0x27,0x22,0x28,0x70,0x20,0x00,0x40,0x21,0x12,0x0C,0x06,0x09,0x30,0x00,0x7F,0x21,0x21,0x21,0x21,0x7F,0x00,0x00};charcodewan[]={/*--文字:完--*//*--宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x00,0x90,0x8C,0xA4,0xA4,0xA4,0xA5,0xA6,0xA4,0xA4,0xA4,0xA4,0x94,0x8C,0x04,0x00,0x00,0x80,0x40,0x20,0x18,0x07,0x00,0x00,0x00,0x3F,0x40,0x40,0x40,0x70,0x00,0x00};charcodebi[]={/*--文字:毕--*//*--宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x00,0x00,0xFF,0x88,0x48,0x28,0x08,0x80,0x7F,0x88,0x88,0x88,0x84,0x84,0xE0,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0xFF,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00};unsignedcharcodeFirstPage[]={/*--宽度x高度=128x64--*/0x00,0x00,0x00,0x00,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,0x20,0x20,0x60,0xE0,0xE0,0xE0,0xE0,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0xE0,0xE0,0x60,0x20,0x20,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0F,0x3F,0xFE,0xF8,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x38,0x0E,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x40,0x44,0x4C,0x48,0x50,0x7F,0x7F,0x40,0x40,0x7F,0x7F,0x50,0x48,0x4E,0xC4,0xC0,0xC0,0xC0,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x1F,0x7E,0xF8,0xE0,0xC0,0xC0,0x60,0x18,0x06,0x03,0x00,0x08,0x18,0x38,0x78,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x10,0x30,0xF0,0xE0,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x40,0x40,0x40,0x80,0xE0,0xE0,0x00,0x40,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x73,0x1F,0x07,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFF,0xFE,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x18,0x38,0x3C,0x6F,0xE7,0xC3,0x81,0x00,0x00,0x00,0x00,0xC0,0xE0,0xF0,0xF0,0xF8,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x21,0x33,0x17,0x0C,0x0F,0x1B,0x51,0x7F,0x79,0x21,0x3F,0x29,0x29,0x2F,0x3D,0x71,0x61,0x61,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0

1 / 15
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功