液晶显示
具体的显示函数代码如下:
void Lcd_Display_Executive(void)
{
unsigned value;
unsigned char *mem_offset,page,column,counter=0;
extern unsigned char gui_disp_buf[8][128];
Lcd_Write_Com_Left(0xc0);
Lcd_Write_Com_Right(0xc0);
Lcd_Write_Com_Left(0x3f);
Lcd_Write_Com_Right(0x3f);/* 初始化液晶,开启显示设置起始行*/
for(page=0;page<8;page++)
{
Lcd_Write_Com_Left(page|0xb8);
Lcd_Write_Com_Right(page|0xb8);/* 设置起始页*/
Lcd_Write_Com_Left(0x40);
Lcd_Write_Com_Right(0x40);/* 设置起始列*/
for(column=0;column<128;column++)
{
mem_offset = (unsigned char*)gui_disp_buf + page*128 + column;
value = *(mem_offset);/*利用指针读取二维数组中的值*/
if(column>=64)
{
Lcd_Write_Data_Right(value);
}
else
{
Lcd_Write_Data_Left(value);
}
}
counter++;
}
}
|
———————————————— 版权声明:本文为CSDN博主「DemandStorm」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/qq_44703307/article/details/103852442