📄 图片生成.c
字号:
//读取EEPROM中的数据,并在128*64显示屏上显示。
#include <iom16v.h>
#include <macros.h>
char r_y[];//读取数取缓存
void LCMDisplayPicture(int n)//显示一幅图片
{
char *r;
int b;
int c;
char CurrentCol=0x80;
char CurrentRow=0x80;
char i,j;
r=r_y;
LCMWriteCommand(0x34);
for (i=0;i<64;i++)
{
CurrentRow=0x80+i;
if(CurrentRow>0x9F)
CurrentRow=0x80+CurrentRow-0xa0;
twi_init();
rd24c(r,i*16+n,16);
r=r_y;
for (j=0;j<8;j++)
{
if (i<=31)
CurrentCol=0x80;
if (i>31)
CurrentCol=0x88;
CurrentCol=CurrentCol+j;
LCMWriteCommand(CurrentRow);
LCMWriteCommand(CurrentCol);
LCMWriteData(r_y[2*j]); //低八位
LCMWriteData(r_y[2*j+1]); //高八位
}
LCMWriteCommand(0x36); //扩充指令集 绘图开
}
LCMWriteCommand(0x30); //基本指令集 绘图关
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -