- 1、本文档共30页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
LCD字符中文显示程序(国外英文资料)
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
文档评论(0)