资源描述:
《无字库LCD12864(无时钟芯片显示时间).doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、/**************************************************************************在无字库的12864LCD上显示时、分、秒;没有用时钟芯片MCU:STC89C52晶振:11.0592MHz作者:罗元俊时间:2014.06.25**************************************************************************/#includetypedefunsignedcharuchar;typedefunsigne
2、dintuint;#definePortP0//数据端口#defineDisp_On0x3f//开显示#defineDisp_Off0x3e//关显示#defineCol_Add0x40//列地址#definePage_Add0xb8//页地址#defineStart_Line0xc0//起始页sbitRS=P2^6;sbitRW=P2^5;sbitEN=P2^7;sbitCS1=P3^2;sbitCS2=P3^3;uintt=0;//全局变量:秒表(用于计数时间的增量)ucharsec,min,hour;//全局变量:秒、分、时uchara,b,c,
3、d,e,f;//秒、分、时的个位和十位ucharcodeHZ_tab[][32]={{/*--文字:潜--*//*--新宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x20,0xC2,0x0C,0x80,0x10,0x94,0x54,0x3F,0x54,0x90,0x54,0x3F,0x54,0x94,0x10,0x00,0x04,0x04,0x7E,0x01,0x00,0x00,0xFF,0x49,0x49,0x49,0x49,0x49,0xFF,0x00,0x01,0x00},{/*--文字:龙--*//*--新宋体12;此字体下对应
4、的点阵为:宽x高=16x16--*/0x10,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0xF0,0x10,0x11,0x16,0xD0,0x10,0x10,0x00,0x80,0x40,0x20,0x18,0x06,0x41,0x20,0x10,0x3F,0x44,0x42,0x41,0x40,0x40,0x78,0x00},{/*--文字:花--*//*--新宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x04,0x04,0x04,0x84,0x6F,0x04,0x04,0x04,0xE4,0x04,0x8
5、F,0x44,0x24,0x04,0x04,0x00,0x04,0x02,0x01,0xFF,0x00,0x10,0x08,0x04,0x3F,0x41,0x40,0x40,0x40,0x40,0x78,0x00},{/*--文字:园--*//*--新宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x00,0xFE,0x02,0x42,0x4A,0xCA,0x4A,0x4A,0xCA,0x4A,0x4A,0x42,0x02,0xFE,0x00,0x00,0x00,0xFF,0x40,0x50,0x4C,0x43,0x40,0x40,0x4F
6、,0x50,0x50,0x5C,0x40,0xFF,0x00,0x00},{/*--文字:输--*//*--新宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x88,0x68,0x1F,0xC8,0x08,0x10,0xC8,0x54,0x52,0xD1,0x12,0x94,0x08,0xD0,0x10,0x00,0x09,0x19,0x09,0xFF,0x05,0x00,0xFF,0x12,0x92,0xFF,0x00,0x5F,0x80,0x7F,0x00,0x00},{/*--文字:入--*//*--新宋体12;此字体下对应的点阵为:
7、宽x高=16x16--*/0x00,0x00,0x00,0x00,0x00,0x01,0xE2,0x1C,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x0C,0x03,0x00,0x00,0x00,0x03,0x0C,0x30,0x40,0x80,0x80,0x00},{/*--文字:密--*//*--新宋体12;此字体下对应的点阵为:宽x高=16x16--*/0x10,0x8C,0x44,0x04,0xE4,0x04,0x95,0xA6,0x44,0x24,0x14,0x8
8、4,0x44,0x94,0x0C,0x00,0x02,0x02,0x7A,0x41,0x41,