lcd12864 LCD12864 驱动 ,采用串行方式( 二 )
草稿
*****************************/
void PutBMP(无符号char *puts)
{
无符号int x = 0;
无符号字符I,j;
SendCMD(0x 34);//8位扩展指令集,即使是36H,也要写两遍。
SendCMD(0x 36);//绘图开启,基本指令集36H无法打开绘图
for(I = 0;i<。32;i++//实际值256x32
{
SendCMD(0x 80 | I);//行位置
SendCMD(0x 80);//列位置
for(j = 0;j<。32;j++) //256/8=32字节
{//列位置自动增加每一行
send DATa(puts[x]);
x++;
}
}
}
void ClearScreen()
{ uchar i,j,x,y;
LCDInit();
SendCMD(0x3e);// RE=1扩展指令选择G=1开启图形显示
x = 0x80
y = 0x80
for(j = 0;j<。64;j++)
{
y = 0x80
SendCMD(x);
SendCMD(y);
for(I = 0;i<。32;i++)
{
send DATa(0x 00);
}
x = x+1;
}
}
void Sendint(uint dd)
{
发送数据(dd & gt>。8);
send DATa(DD);
}
/*****************************
点x = 0:128;y = 0:64;
*****************************/
void Gra(uchar x,uchar y)
{
uchar xx,YY;
SendCMD(0x 34);
SendCMD(0x 36);
xx = x/16;
YY = 63-y;
if(yy >;= 32){ xx = xx+8;YY-= 32;}
SendCMD(0x 80+YY);
SendCMD(0x 80+xx);
send int(0x 8000 & gt;>。(x % 16));
}
uchar代码IBM[]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x7F,0xFF,0xFF,0x87,0xFF,0xFF,0xF0,0x00,0xFF,0xE0,0x00,0x07,0xFF,0xFE,
0x7F,0xFF,0xFF,0x87,0xFF,0xFF,0xF0,0x00,0xFF,0xE0,0x00,0xF,0xFF,0xFE,
0x7F,0xFF,0xFF,0x87,0xFF,0xFF,0xF8,0x00,0xFF,0xE0,0x00,0xF,0xFF,0xFE,
0x7F,0xFF,0xFF,0x87,0xFF,0xFF,0xFF,0xFC,0x00,0xFF,0xF0,0x00,0x1F,0xFF,0xFE,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x7F、0xFF、0xFF、0x87、0xFF、0xFF、0xFF、0xFF、0x00、0xFF、0xF8、0x00、0x3F、0xFF、0xFE、
0x7F,0xFF,0xFF,0x87,0xFF,0xFF,0xFF,0xFF,0x80,0xFF,0xFC,0x00,0x7F,0xFF,0xFE,
0x7F,0xFF,0xFF,0x87,0xFF,0xFF,0xFF,0xFF,0x80,0xFF,0xFC,0x00,0x7F,0xFF,0xFE,
0x7F,0xFF,0xFF,0x87,0xFF,0xFF,0xFF,0xFF,0x80,0xFF,0xFC,0x00,0x7F,0xFF,0xFE,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xFF,0xC0,0x00,0x0F,0xF8,0x00,0xFF,0xC0,0x03,0xFF,0xFE,0x01,0xFF,0xFF,0x00,
0x00,0xFF,0xC0,0x00,0x0F,0xF8,0x00,0xFF,0xC0,0x03,0xFF,0xFF,0x01,0xFF,0xFF,0x00,
0x00,0xFF,0xC0,0x00,0x0F,0xF8,0x00,0xFF,0xC0,0x03,0xFF,0xFF,0x03,0xFF,0xFF,0x00,
0x00,0xFF,0xC0,0x00,0x0F,0xF8,0x00,0xFF,0x80,0x03,0xFF,0xFF,0x83,0xFF,0xFF,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
推荐阅读
- 旅游生态文化“三轮驱动” 打造乡村振兴永泰样板——专访永泰县委书记雷连鸣
- 婚外感情的发生是有驱动力的
- 罗莱迪思 罗莱迪思 | 拥抱数字化改革 创新驱动绿色低碳
- 江苏金湖:“三大工程”驱动 现代农业“酿”丰收
- 如何唤醒孩子的学习内在驱动力
- 品质提升品牌保护双轮驱动——兴化大闸蟹荣获江苏十强农产品区域公用品牌
- 科技支撑、品牌打造 双轮驱动海南热带特色高效农业发展
- AMD 肾上腺素 21.12.1 驱动发布:《光环:无限》性能大幅提升
- 12G版本RTX 2060要来!NV更新驱动支持
- 博格步 以“红色力量”驱动“发展之轮” 知名童车从这里驶向世界