资源描述:
《12864A 图形LCD显示函数模块》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、12864A图形LCD显示函数模块/********************************************************************/GLCD.C: 12864A 128X64 dots Graphic Type STN dot matrix LCD Module Subroutine /********************************************************************/#define LcdDataPort PioPort
2、B#define LcdCtrlPort PioPortC/* Bit Address Assignment*/#define LcdRegPin 0x01 /* bit 0 of the port */#define LcdRWPin 0x02 /* bit 1 of the port */#define LcdEnablePin 0x04 /* bit 2 of the port */#define LcdCS1Pin 0x08 /* bit 3 of the port */#define LcdCS2Pin 0x
3、10 /* bit 4 of the port */#define LcdELPin 0x20 /* bit 5 of the port *//* for Lcd System */unsigned char lcd_row, lcd_column;unsigned char lcd_hrow,lcd_hcolumn,lcd_ascii;unsigned char lcd_x;bit lcd_color;char TranDec[4];code char Bit_table[]={0x01,0x02,0x04,0x08
4、,0x10,0x20,0x40,0x80};code char Hex_table[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};code char Char_Bit[][6]={{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* */{ 0x00, 0x00, 0x4F, 0x00, 0x00, 0x00}, /* ! */{ 0x00, 0x04, 0x03, 0x04, 0x03, 0x00}
5、, /* " */{ 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00}, /* # */{ 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00}, /* $ */{ 0x23, 0x13, 0x08, 0x64, 0x62, 0x00}, /* % */{ 0x36, 0x49, 0x56, 0x20, 0x58, 0x00}, /* & */{ 0x00, 0x00, 0x05, 0x03, 0x00, 0x00}, /* ' */{ 0x00, 0x1C, 0x22, 0x4
6、1, 0x00, 0x00}, /* ( */{ 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00}, /* ) */{ 0x22, 0x14, 0x7F, 0x14, 0x22, 0x00}, /* * */{ 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00}, /* + */{ 0x00, 0x00, 0x28, 0x18, 0x00, 0x00}, /* , */{ 0x08, 0x08, 0x08, 0x08, 0x08, 0x00}, /* - */{ 0x00, 0
7、x00, 0x60, 0x60, 0x00, 0x00}, /* . */{ 0x20, 0x10, 0x08, 0x04, 0x02, 0x00}, /* / */{ 0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00}, /* 0 */{ 0x00, 0x42, 0x7f, 0x40, 0x00, 0x00}, /* 1 */{ 0x42, 0x61, 0x51, 0x49, 0x46, 0x00}, /* 2 */{ 0x21, 0x41, 0x45, 0x4B, 0x31, 0x00}, /*
8、 3 */{ 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00}, /* 4 */{ 0x27, 0x45, 0x45, 0x45, 0x39, 0x00}, /* 5 */{ 0x3C, 0x4A, 0x49, 0x49, 0x30, 0x00}, /* 6 */{ 0x01, 0x01, 0x71, 0x0