《LCD12864显示程序(成功版).docx》由会员分享,可在线阅读,更多相关《LCD12864显示程序(成功版).docx(14页珍藏版)》请在第壹文秘上搜索。
1、WicludeWincludedefineuitunsignedit#defineucharunsignedchar一定时运用的IO口WdefineDATA_P0RTPOSbit1.CD1286CS=P32;sbit1.CD1286RSET=P33;Sbit1.CD12864.RS=P26;SbitICD12864.RW=P27;sbit1.CD1286RD-P25;定义全同函数void1.CdSt7565_WriteCmd(Cmd);void1.cdSt7565.WriteData(dat);void1.cdl2864JnrM);void1.cdl2864-ClearScreen(void)
2、;void1.cdl2864_Writel6CnCHAR(ucharx,uchary.uchark);voidDelay10ms(unsignedintc);unsignedcharcodetable401132-文字:-V-宋体12;此字体下对应的点阵为:窕X高=16x16-/0x00,0x00,0x00,0x00,0x00,0x00z0x00z0x00z0x00,0x00,0x00,0x00,000i000,0x00f000,0x00,0x00,0x00,0x,0x,0xz0x00z0x00z0x00,0x00,0xl8,0x24.0x24,0xl8,0x,0x,八一文字:椰-7/一宋体1
3、2;此字体下对应的点阵为:宽X高=16x16-/0x00,0x06,0xDA,0x22,0x02r0xFEz0x20z0x26,0x28,0x34,0x24,0x7Fz0xA4,0x24z0x24z0x20z0xO0,Ox07.0x08.0xl0,0xO8,0xFFr0xr0xr0xFFz0x49z0x49z0x49,0x49,OFF,OxO2,OxO4,/一文字:第一/宋体12;此字体下对应的点阵为:宽Xr=16xl6T0x00,0x00,0x00,OxOOrOx7QOxS4,Ox54,Ox54,Ox54,0x55,0x56,Ox54rOx7CzOxOOzOxOO,OxOO,0x00,0x4
4、0,041,049r0x49r0x49z0x49z0x49z07F,049f049r0x49r0x49z0x49z0x40x40,文字;满-7F-宋体12;此字体下时应的点阵为:宽X高=16x16-*/0x00,024,024,02F,0E4z0x24z0x24,0E4z0x2F,0x24,0x24,0x,0x8Cz0x02,0x60,0x10,OxOO,Ox7F,Ox91zOx49zOxOOx09,Oxl9,Ox07,Ox09,0ll,0FROxOO,Ox01,07EfO04,Ox04,/-文字:柳T/*-宋体12;此字体下对应的点阵为:窕xl=16xl6-/OO0,0FC,0xO4,0O4
5、,OxFC,0xO0,0xF8,0x02,0x04,0xFC,OxlO,0x9O,0xFF,0xD0,Oxl0,Oxl0,0x00,0x07,0x08,0x04,OxFF,OxOO,OxOF,Ox32,Ox44,Ox8EOx01zOxOOzOxFxOO,Ox03,Ox04,/*-文字:烟T/-宋体12;此字体下对应的点阵为:,Xi=16xl6-/0xO0,0xFE,0x42,0x42z0x42z0xFA,0x42z0x42z0x42z0xFE,Ox08,Oxl0,0xFF,Ox,0x70,0x80z0x00,0xFF,0x40,0x4C,0x42,0x41,0x46,0x48,0x50,0xF
6、F,0xl0,0x08,0x07,0xl8,0x60,0x80,/-文字:胜T/*-宋体12;此字体下对应的点阵为:宽X高=16x16-/OxOO,Ox,OxlO.OxlO,OxlO,OxFF,OxlO,OxlO,Ox3C,Ox40,OxOO,OxFE,Ox22,Ox22,OxFE,OxOO,000,0x40,0x42,0x42,0x42,0x7F,042,0x42,0x42,0x40,0x,0xFF,0x82,0x02,0x7F.0x80,/*-文字:绝-Y/-宋体12;此字体下对应的点阵为:宽X高*16x16-/OxOO,OxOO,OxEO,Ox2C,Ox34,OxE4,Ox24,Ox27
7、,OxE8,OxlO,Ox20,OxlO,Ox63,OxAC,Ox30,Ox2D,0x00,0x70,0x43,0x42,0x42,0x43,0x42,0x42,0x3F,0x,0x00,0x12,0x12,0x22,0x67,0x22,/*-文字:,-T/-宋体12;此字体下对应的点阵为:xl=16xl6-/OxoOQXOo,0x00,0x00,0x00,0x00,0x00,0x00,0x0OQxoO,000,OxoO,0x00,0x00QXOO,0x00,0x00,0x,0x,0x00,0x,0x,0x,0x00,0x00,0x00,0x00,0x,0x38,0x58,0x,0x,/*-文
8、字:处-*/-宋体12;此字体下对应的点阵为:宽xi=16xl6-/0x00,0x,0x80,0x40,0x20,0xl0z0xFF,0x,0x,0xF8,0x08,0x08,0x9F,0x60,0x80,0x,0x00,0x40,0x41,0x40,0x4O,0x4Oz0x5F,0x40,Ox2O,Ox2O,Oxl3,0xOC,0xl3z0x20,0x40,0x81,/-文字:好T/-宋体12;此字体下时应的点阵为:宽X高=16x16-/OxOO,Ox80,Ox86.0x8A.Ox92,OxE2.0x82,Ox82,Ox80,Ox,OxFO,OxlO,OxlF,OxFO,OxlO,OxlOr
9、OxOO,Ox,Ox,OxOO,Ox,Ox7F,080,Ox40,OxOO,OxOO,Ox61,Oxl6,Ox08,0x15,0x22,0x40,/-文字:存-7/-宋体12;此字体下对应的点阵为:Xll三16xl6-/000,0x40,0x44,0x54,0x54,0xD4,0xS4,054,05F,0x74,0x54,0xD4,0x54,0x54,0x44,0x40,0x00,0x04,0x04,Ox02,0x01,0xF,0x92,092,092,Ox92,Ox92,OxFE,0x01,0x02,0O4,0O4,/-文字:年T/-宋体12;此字体下对应的点阵为:窕xl=16xl6-/0x
10、00,0x00,0x04,0x44,044,044,0x44,0xFC,0x44,044,044z0x44,0xC7,0xl8.0x20.0x00,0x00,0x04,0x(M,0x04,0xO4,0xO4,0xO4z0xFFz0xO4,0xO4,0xO4,0xO4,0xO7,Ox04,0x04,0x04,/*-文字:-一*/-宋体12;此字体下对应的点阵为:宽xi=16xl6-70x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x,0x,0x00,0x,0x,0x,0x0
11、0z0x00,0x00,0x00,0x00,0x,0x,0x,0x,/*-文字:是-/*-宋体12;此字体卜对应的点阵为:宽X高=16x16-/0x00,Ox,Ox,OxOO,Ox7F,Ox49,Ox49,Ox49,0x49,0x49,0x49,0x49,0x7F,0x,0x,0x,0x00,0x81,0x81,0x89,0x89,0x89z0x89z0x89,0xFF,0x81,0x41,0x21,0xlD,0x21,0x41,0x81,/*-文字:最-7/*-末体12;此字体下对应的点阵为:宽xSm16x16-V000,0x40,0x40,0x40,0x5F,0xS5,055,0x55,0
12、x55,0xD5,0x55,0x55,0x5F,0xC0,0x40,0x40,0O0,0x8O,0x8O,0x43,0x2D,0x11,0x29,0x47,0x90,0xFF,0x15,0x15,0x25,Ox3F,0x6O,0x20,/-文字:._*/-宋体12;此字体下对应的点阵为:窕xl=16xl6-/OXoOQXoO,0x00,0x00,0x00,0x00,0x00,0x00,0x00QXOoQXOoQXOO,0x00,0x00,0x00,0x00,0x00,0x,0x,0x,0x,0,0x00,0x00,0x00,0x00,0xl8.0x24,0x24,0xl8,0x,0x,/*-文
13、字:无T/*-宋体12;此字体下对应的点阵为:宽1=16xl6-/0xO0,0x,Ox40.Ox40,0x42,0x42,0x42z0xC2,0x42.Ox7E,0xC2,0x42,0x42,0x42z0x40,0xO0,OXOOQXoo,0x70,0x40,0x40,0x40,0x40,0x3FQXOOQXOo,0x03,0x0CQXlo,0x20,0x40,0x80./-文字:却T/-宋体12;此字体下对应的点阵为:宽xl=16xl6-/0x00,0x,0xFC,0x04,0x04,0x04.0xFC,0x80,0x88,0x88,0x88.0xFF,0x88,0x88,0x88,0x80
14、,OxOO,OxOO,OxOFzOxlO,Ox08,OxOO,OxFF,OxOO,Ox30.0xl8,Oxl4,OxlO,013,Oxl4,Ox38zOxlO,/*-文字:近-7/-末体12;此字体下对应的点阵为:宽x1=16xl6-/0x00,0x20,0x22,0x23,0xE2,0x24,0x24,0x24,0xFC,0x,0x,0x,0xCC,0x42,0x40,0x40,0x00,0x40,0x40,0x40,0x5F,0x40,040,0x40,043,0x4C,050,020,0x1F,0x20,0x40,0x00,/*-文字:#-7/*-宋体12;此字体下对应的点阵为:窕xl=
15、16xl6-/0x00,0x20,0x20,0x29,0x29,Ox29,Ox29,O29,Ox2E,O3A,Ox6A,OxAA,Ox2A,Ox2A,0x22,0x20,OxOO,Ox,Ox,OxOO,OxFF,Ox55,Ox55,Ox55zOx55,Ox55,Ox55,OxFF,Ox01,Ox02,Ox04,Ox08,/-文字:遥T/-宋体12;此字体下对应的点阵为:宽xi=16xl6-/0x00,0x.0x2D,0x31,0x21,0xFl,0x2A,0x22,0x32,0x4A,0x00,0x00.0xCCz0x42,0x40,0x40,0x00,0x81,0xBDz0xAl,0xAlz0xBF,0xAl,0xAl,0xBD,0x81,0x80,0x40,0x3F,0x40,0x80,0x,/-文字: