微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > ACM-12864汉字液晶显示驱动程序

ACM-12864汉字液晶显示驱动程序

时间:04-01 来源:互联网 点击:

unsigned char code hz[]={
/*解:0*/
0x20,0x10,0xec,0x27,0xf4,0x2c,0xe4,0x40,
0x22,0x9e,0x2,0xd2,0x22,0x1f,0x2,0x0,
0x80,0x40,0x3f,0x9,0x3f,0x89,0xff,0x8,
0xa,0x9,0x9,0xff,0x9,0x9,0x8,0x0
};

显示汉字,fb==1:反白显示
void dh(unsigned char x,unsigned char y,unsigned char n,unsigned char fb) {
unsigned char i,dd;
for (i=0;i16;i++) {
dd=hz[i+n*32];
if (fb) if (n!=kongbai) dd=255-dd;
lw(x*8+i,y,dd);
dd=hz[i+n*32+16];
if (fb) if (n!=kongbai) dd=255-dd;
lw(x*8+i,y+1,dd);
}
}

显示字符,fb==1:反白显示
void da(unsigned char x,unsigned char y,unsigned char n,unsigned char fb) {
unsigned char i,dd;
n-=32;
if (n>128) n=0;
if (fb) dd=255; else dd=0;
lw(x*8,y,dd);
lw(x*8,y+1,dd);
for (i=0;i7;i++) {
dd=asc[i+n*16];
if (fb) dd=255-dd;
lw(x*8+i+1,y,dd);
dd=asc[i+n*16+8];
if (fb) dd=255-dd;
lw(x*8+i+1,y+1,dd);
}
}

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top