文档详情

LCD字符中文显示程序(国外英文资料).doc

发布:2017-06-08约1.14万字共30页下载文档
文本预览下载声明
LCD字符中文显示程序(国外英文资料) # define PD1, 6/12/2/2 is divided into two halves (122x32). Unsigned char Column; Unsigned char Page_; / / page address register D1, DO: page address Unsigned char Code_; / / character code registers Unsigned char Command; / / instruction register Unsigned char LCDData; / / data register Unsigned char TMP. Sbit e1 = P3 ^ 3; Sbit e2 = P3 ^ 4; Sbit rw = P3 ^ 1; Sbit a0 = P3 ^ 0; SFR conr = 0 xb0; / * p3 / SFR din = 0 x90; / * thats p1. Unsigned char CWADD1; / / write the code address (E1) Xdata unsigned char DWADD1 _at_ 0x8001 / / write display data address (E1) Xdata unsigned char CRADD1 _at_ 0x8002 / / read status (E1) address (E1) Xdata unsigned char DRADD1 _at_ 0x8003; / / read the data address (E1) Xdata unsigned char CWADD2 _at_ 0x8004 / / write the code address (E2) Xdata unsigned char DWADD2 _at_ 0x8005; / / write the number of addresses (E2) Xdata unsigned char CRADD2 _at_ 0x8006; / / read status (E2) Xdata unsigned char DRADD2 _at_ 0x8007; / / read the data address (E2) / / the English font is wide by 8x16 Code unsigned char EETAB [] [8] = { {0x00, 0x07, 0x08, 0x10, 0x10, 0x08, 0x07, 0x00, 0x00, 0x0, 0x08, 0x04, 0x04, 0x08, 0xF0, 0x00}, 0x00}, / / 0 {0x00, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00}, / / 1 {0x00, 0x0E, 0x10, 0x10, 0x10, 0x11, 0x0E, 0x00, 0x00, 0x00, 0x0C, 0x14, 0x24, 0x44, 0x84, 0x0C, 0x0C, 0x00}, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C {0x00, 0x0C, 0x10, 0x11, 0x11, 0x12, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x88, 0x70, 0x00} / / 3 {0x00, 0x00, 0x03, 0x04, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00} / / 4 {0x00, 0x1F, 0x10, 0x11, 0x11, 0x10, 0x10, 0x00, 0x00, 0x98, 0x98, 0x04, 0x04, 0x04, 0x88, 0x70, 0x00}; / / 5 {0x00, 0x07, 0x08, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0, 0x88, 0x04, 0x04, 0x88, 0x70, 0x00}; / / 6 {0x00, 0x1C, 0x10, 0x1
显示全部
相似文档