驱动LCD12864显示器

2023-10-11 17:20
文章标签 驱动 显示器 lcd12864

本文主要是介绍驱动LCD12864显示器,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目录

        1、创建lcd12864.h文件

        2、创建lcd12864.c文件

        3、创建bmp.h文件

        4、创建font.h文件

        5、创建main.c文件

        6、完整代码


        LCD12864是一种128x64像素分辨率的液晶显示器,通常用于嵌入式系统和电子设备中,以显示字符、图像和其他信息。它的驱动IC型号是ST7567A,这个IC是一款常用于控制12864型LCD的驱动芯片。以下是关于LCD12864和ST7567A驱动IC的详细介绍:

LCD12864液晶显示器: LCD12864的名称中包含了一些关键信息:

  1. "LCD" 表示它是一种液晶显示器(Liquid Crystal Display),通过控制液晶分子来显示图像。
  2. "12864" 表示它的分辨率为128x64像素,即水平有128个像素,垂直有64个像素,总共有8192个像素点。

        LCD12864通常采用背光显示,因此可以在低光或暗环境中清晰可见。它还具有低功耗的特性,使其在电池供电设备中非常有用。

        我所使用的LCD12864为ST7567A驱动IC: ST7567A是一款专门设计用于驱动LCD12864的集成电路芯片。

        ST7567A的像素点是按照列行的方式点亮的,也就是说先点亮列,再点亮行。通俗一点就是:先点亮第1列第1行的一个像素点,继续点亮第1列第2行的一个像素点,依次点亮到第1列的第8行,然后再继续第2列第1行到第8行的方式点亮全部像素点。

        总之,LCD12864与ST7567A驱动IC的组合提供了一个功能强大且灵活的显示解决方案,适用于多种应用,从消费电子产品到工业自动化系统。它的高分辨率、低功耗和多功能性使其成为许多项目中的理想选择。

1、创建lcd12864.h文件

#include "main.h"void Initial(void);void LCD_Clear(void);
void LCD_Refresh(void);
void LCD_DrawPoint(uint8_t x,uint8_t y,uint8_t t);
void LCD_DrawLine(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2,uint8_t mode);
void LCD_DrawCarre(uint8_t x1,uint8_t y1,uint8_t w,uint8_t h,uint8_t mode);
void LCD_DrawCircle(uint8_t x,uint8_t y,uint8_t r);
void LCD_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t size1,uint8_t mode);
void LCD_ShowString(uint8_t x,uint8_t y,uint8_t *chr,uint8_t size1,uint8_t mode);
void LCD_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size1,uint8_t mode);
void LCD_ShowChinese(uint8_t x,uint8_t y,uint8_t num,uint8_t size1,uint8_t mode);
void LCD_ShowPicture(uint8_t x,uint8_t y,uint8_t sizex,uint8_t sizey,uint8_t BMP[],uint8_t mode);void LCD_ShowCharPro(uint8_t x_start, uint8_t y_start, uint8_t fonts, uint8_t string);
void LCD_ShowStringPro(uint8_t x_start, uint8_t y_start, uint8_t fonts, uint8_t *string, uint8_t show);

2、创建lcd12864.c文件

//Modle :GM12864,128*64
//Driver IC:ST7567A
//Interfaces:SPI-4#include "gpio.h"
#include "font.h"//字体选择
#define		font_0806		8
#define		font_1206		12
#define		font_1608		16
#define		font_2412		24static	uint8_t LCD_GRAM[144][8];#define		SCL_0		HAL_GPIO_WritePin(SCL_GPIO_Port,SCL_Pin,GPIO_PIN_RESET)
#define		SCL_1		HAL_GPIO_WritePin(SCL_GPIO_Port,SCL_Pin,GPIO_PIN_SET)#define		SDA_0		HAL_GPIO_WritePin(SDA_GPIO_Port,SDA_Pin,GPIO_PIN_RESET)
#define		SDA_1		HAL_GPIO_WritePin(SDA_GPIO_Port,SDA_Pin,GPIO_PIN_SET)#define		RSTB_0		HAL_GPIO_WritePin(RST_GPIO_Port,RST_Pin,GPIO_PIN_RESET)
#define		RSTB_1		HAL_GPIO_WritePin(RST_GPIO_Port,RST_Pin,GPIO_PIN_SET)#define		DC_0		HAL_GPIO_WritePin(DC_GPIO_Port,DC_Pin,GPIO_PIN_RESET)
#define		DC_1		HAL_GPIO_WritePin(DC_GPIO_Port,DC_Pin,GPIO_PIN_SET)#define		CS_0		HAL_GPIO_WritePin(CS_GPIO_Port,CS_Pin,GPIO_PIN_RESET)
#define		CS_1		HAL_GPIO_WritePin(CS_GPIO_Port,CS_Pin,GPIO_PIN_SET)// #define LCD_DIS_ROT  180	//选择屏幕旋转参数:旋转180度
#define LCD_DIS_ROT  0	//选择屏幕旋转参数:不旋转0#if (LCD_DIS_ROT == 180) 
#define LCD_COLUMN_OFFSET 4					//旋转180度需要加4个偏移量
#else 
#define LCD_COLUMN_OFFSET 0
#endifvoid Ins_trans(unsigned char command){ unsigned char counter;CS_0;DC_0;for(counter=0;counter<8;counter++){if((command&0x80)==0x80){SDA_1;}else{SDA_0;}SCL_0;SCL_1;SCL_0;command<<=1;}CS_1;
}void Data_trans(unsigned char command){ unsigned char counter;CS_0;DC_1;for(counter=0;counter<8;counter++){if((command&0x80)==0x80){SDA_1;}else{SDA_0;}SCL_0;SCL_1;SCL_0;command<<=1;}CS_1;
}void Column_set(unsigned char column){column+=LCD_COLUMN_OFFSET;Ins_trans(0x10|(column>>4));Ins_trans(0x00|(column&0x0f));	 
}void Page_set(unsigned char page){Ins_trans(0xb0+page);
}void Initial(){//	RSTB_0;HAL_Delay(50);RSTB_1;Ins_trans(0xe2); //软复位Ins_trans(0xF8);//booster ratio setIns_trans(0x00);//booster ratio:4xIns_trans(0xA2);//偏压比(bias) set:1/9	Ins_trans(0x2c); //升压步聚1Ins_trans(0x2e); //升压步聚2Ins_trans(0x2f); //升压步聚3Ins_trans(0x24);//set (Rb/Ra).粗调对比度,可设置范围(range:20h~27h)Ins_trans(0x81);//set EV.微调对比度Ins_trans(0x22);//微调对比度的值,可设置范围(range:0~3f)	#if (LCD_DIS_ROT == 180) Ins_trans(0xA1); //列扫描顺序:从左到右Ins_trans(0xc0); //行扫描顺序:反序#else         Ins_trans(0xA0); //列扫描顺序:从左到右Ins_trans(0xc8); //行扫描顺序:反序#endifIns_trans(0xA6);//normal(0xA6)/reverse(0xA7)  displayIns_trans(0X40);//set start lineIns_trans(0xAF);//display on(0xAF);off(0xAE)
}//更新显存到LCD	
void LCD_Refresh(void){for(uint8_t page=0;page<8;page++){        //page loopPage_set(page);Column_set(0);for(uint8_t column=0;column<128;column++){	//column loopData_trans(LCD_GRAM[column][page]);}}
}//清屏函数
void LCD_Clear(void){uint8_t i,n;for(i=0;i<8;i++){for(n=0;n<128;n++){LCD_GRAM[n][i]=0;//清除所有数据}}LCD_Refresh();//更新显示
}//画点 
//x:0~127
//y:0~63
//t:1 填充 0,清空	void LCD_DrawPoint(uint8_t x,uint8_t y,uint8_t t){uint8_t i,m,n;i=y/8;m=y%8;n=1<<m;if(t){LCD_GRAM[x][i]|=n;}else{LCD_GRAM[x][i]=~LCD_GRAM[x][i];LCD_GRAM[x][i]|=n;LCD_GRAM[x][i]=~LCD_GRAM[x][i];}
}//画线
//x1,y1:起点坐标
//x2,y2:结束坐标
void LCD_DrawLine(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2,uint8_t mode){uint16_t t; int xerr=0,yerr=0,delta_x,delta_y,distance;int incx,incy,uRow,uCol;delta_x=x2-x1; //计算坐标增量 delta_y=y2-y1;uRow=x1;//画线起点坐标uCol=y1;if(delta_x>0)incx=1; //设置单步方向 else if (delta_x==0)incx=0;//垂直线 else {incx=-1;delta_x=-delta_x;}if(delta_y>0)incy=1;else if (delta_y==0)incy=0;//水平线 else {incy=-1;delta_y=-delta_x;}if(delta_x>delta_y)distance=delta_x; //选取基本增量坐标轴 else distance=delta_y;for(t=0;t<distance+1;t++){LCD_DrawPoint(uRow,uCol,mode);//画点xerr+=delta_x;yerr+=delta_y;if(xerr>distance){xerr-=distance;uRow+=incx;}if(yerr>distance){yerr-=distance;uCol+=incy;}}
}//画矩形
//x1,y1:起点坐标
//w		:宽
//h		:高
void LCD_DrawCarre(uint8_t x1,uint8_t y1,uint8_t w,uint8_t h,uint8_t mode){for(uint8_t y=y1;y<y1+h;y++){LCD_DrawLine(x1,y,x1+w,y,mode);}
}//画圆(空心)
//x,y:圆心坐标
//r:圆的半径
void LCD_DrawCircle(uint8_t x,uint8_t y,uint8_t r){int a, b,num;a = 0;b = r;while(2 * b * b >= r * r){LCD_DrawPoint(x + a, y - b,1);LCD_DrawPoint(x - a, y - b,1);LCD_DrawPoint(x - a, y + b,1);LCD_DrawPoint(x + a, y + b,1);LCD_DrawPoint(x + b, y + a,1);LCD_DrawPoint(x + b, y - a,1);LCD_DrawPoint(x - b, y - a,1);LCD_DrawPoint(x - b, y + a,1);a++;num = (a * a + b * b) - r*r;//计算画的点离圆心的距离if(num > 0){b--;a--;}}
}//在指定位置显示一个字符,包括部分字符
//x:0~127
//y:0~63
//size1:选择字体 (font_0806、font_1206、font_1608、font_2412)
//mode:0,反色显示;1,正常显示
void LCD_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t size1,uint8_t mode){uint8_t i,m,temp,size2,chr1;uint8_t x0=x,y0=y;if(size1==font_0806)size2=6;else size2=(size1/8+((size1%8)?1:0))*(size1/2);  //得到字体一个字符对应点阵集所占的字节数chr1=chr-' ';  //计算偏移后的值for(i=0;i<size2;i++){if(size1==font_0806){temp=asc2_0806[chr1][i];} //调用0806字体else if(size1==font_1206){temp=asc2_1206[chr1][i];} //调用1206字体else if(size1==font_1608){temp=asc2_1608[chr1][i];} //调用1608字体else if(size1==font_2412){temp=asc2_2412[chr1][i];} //调用2412字体else return;for(m=0;m<8;m++){if(temp&0x01)LCD_DrawPoint(x,y,mode);else LCD_DrawPoint(x,y,!mode);temp>>=1;y++;}x++;if((size1!=8)&&((x-x0)==size1/2)){x=x0;y0=y0+8;}y=y0;}
}//显示字符串
//x,y:起点坐标  
//size1:字体大小 
//*chr:字符串起始地址 
//mode:0,反色显示;1,正常显示
void LCD_ShowString(uint8_t x,uint8_t y,uint8_t *chr,uint8_t size1,uint8_t mode){while((*chr>=' ')&&(*chr<='~')){	//判断是不是非法字符!LCD_ShowChar(x,y,*chr,size1,mode);if(size1==8)x+=6;else x+=size1/2;chr++;}
}//m^n
uint32_t LCD_Pow(uint8_t m,uint8_t n){uint32_t result=1;while(n--){result*=m;}return result;
}//显示数字(居中对齐)
//x,y :起点坐标
//num :要显示的数字
//len :数字的位数(设置位数大于实际位数会在数值前添"0补齐",设置位数小于实际位数会根据实际位数显示)
//size:字体大小
//mode:0,反色显示;1,正常显示
void LCD_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size1,uint8_t mode){uint8_t t,temp,m=0;if(size1==8)m=2;uint8_t i=1;uint32_t j=0;j=num;while(1){j=j/10;if(j)i++;else break;}if(i>len)len=i;for(t=0;t<len;t++){temp=(num/LCD_Pow(10,len-t-1))%10;if(temp==0){LCD_ShowChar(x+(size1/2+m)*t-((len/2)*(size1/2)),y,'0',size1,mode);}else {LCD_ShowChar(x+(size1/2+m)*t-((len/2)*(size1/2)),y,temp+'0',size1,mode);}}
}//显示汉字
//x,y:起点坐标
//num:汉字对应的序号
//mode:0,反色显示;1,正常显示
void LCD_ShowChinese(uint8_t x,uint8_t y,uint8_t num,uint8_t size1,uint8_t mode){uint8_t m,temp;uint8_t x0=x,y0=y;uint16_t i,size3=(size1/8+((size1%8)?1:0))*size1;  //得到字体一个字符对应点阵集所占的字节数for(i=0;i<size3;i++){if(size1==16){temp=Hzk1[num][i];}//调用16*16字体else if(size1==24){temp=Hzk2[num][i];}//调用24*24字体else if(size1==32)       {temp=Hzk3[num][i];}//调用32*32字体else if(size1==64){temp=Hzk4[num][i];}//调用64*64字体else return;for(m=0;m<8;m++){if(temp&0x01)LCD_DrawPoint(x,y,mode);else LCD_DrawPoint(x,y,!mode);temp>>=1;y++;}x++;if((x-x0)==size1){x=x0;y0=y0+8;}y=y0;}
}//num 显示汉字的个数
//space 每一遍显示的间隔
//mode:0,反色显示;1,正常显示
void LCD_ScrollDisplay(uint8_t num,uint8_t space,uint8_t mode)
{uint8_t i,n,t=0,m=0,r;while(1){if(m==0){LCD_ShowChinese(128,24,t,16,mode); //写入一个汉字保存在OLED_GRAM[][]数组中t++;}if(t==num){for(r=0;r<16*space;r++)      //显示间隔{for(i=1;i<144;i++){for(n=0;n<8;n++){LCD_GRAM[i-1][n]=LCD_GRAM[i][n];}}LCD_Refresh();}t=0;}m++;if(m==16){m=0;}for(i=1;i<144;i++)   //实现左移{for(n=0;n<8;n++){LCD_GRAM[i-1][n]=LCD_GRAM[i][n];}}LCD_Refresh();}
}//显示图片
//x,y:起点坐标
//sizex,sizey,图片长宽
//BMP[]:要写入的图片数组
//mode:0,反色显示;1,正常显示
void LCD_ShowPicture(uint8_t x,uint8_t y,uint8_t sizex,uint8_t sizey,uint8_t BMP[],uint8_t mode){uint16_t j=0;uint8_t i,n,temp,m;uint8_t x0=x,y0=y;sizey=sizey/8+((sizey%8)?1:0);for(n=0;n<sizey;n++){for(i=0;i<sizex;i++){temp=BMP[j];j++;for(m=0;m<8;m++){if(temp&0x01)LCD_DrawPoint(x,y,mode);else LCD_DrawPoint(x,y,!mode);temp>>=1;y++;}x++;if((x-x0)==sizex){x=x0;y0=y0+8;}y=y0;}}
}

3、创建bmp.h文件

unsigned char picture_tab[]={
/*--  调入了一幅图像:C:\Documents and Settings\Administrator\桌面\12864.bmp  --*/
/*--  宽度x高度=128x64  --*///WBcell
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
};
unsigned char picture_tab1[]={
/*--  调入了一幅图像:  --*/
/*--  宽度x高度=128x64  --*///rec++
0xFF,0x01,0x01,0xF9,0x09,0x09,0xC9,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0xC9,0x09,0x09,0xF9,0x01,0x01,0xFF,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFE,0x02,0x02,0xF2,0x12,0x12,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x12,0x12,0xF2,0x02,0x02,0xFE,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0x00,0x00,0xFC,0x04,0x04,0xE4,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0xE4,0x04,0x04,0xFC,0x00,0x00,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x01,0x01,0xF9,0x09,0x09,0xC9,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0xC9,0x09,0x09,0xF9,0x01,0x01,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x80,0x80,0x9F,0x90,0x90,0x93,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x93,0x90,0x90,0x9F,0x80,0x80,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0x00,0x00,0x3F,0x20,0x20,0x27,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x27,0x20,0x20,0x3F,0x00,0x00,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0x7F,0x40,0x40,0x4F,0x48,0x48,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
0x49,0x48,0x48,0x4F,0x40,0x40,0x7F,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,
0xFF,0x80,0x80,0x9F,0x90,0x90,0x93,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
0x92,0x92,0x92,0x92,

这篇关于驱动LCD12864显示器的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/189640

相关文章

Linux_kernel驱动开发11

一、改回nfs方式挂载根文件系统         在产品将要上线之前,需要制作不同类型格式的根文件系统         在产品研发阶段,我们还是需要使用nfs的方式挂载根文件系统         优点:可以直接在上位机中修改文件系统内容,延长EMMC的寿命         【1】重启上位机nfs服务         sudo service nfs-kernel-server resta

驱动(RK3588S)第七课时:单节点设备树

目录 需求一、设备树的概念1、设备树的后缀名:2、设备树的语法格式3、设备树的属性(重要)4、设备树格式举例 二、设备树所用函数1、如何在内核层种获取设备树节点:2、从设备树上获取 gpio 口的属性3、获取节点上的属性只针对于字符串属性的4、函数读取 np 结点中的 propname 属性的值,并将读取到的 u32 类型的值保存在 out_value 指向的内存中,函数的返回值表示读取到的

驱动安装注册表指令

HKCR: HKEY_CLASSES_ROOT HKCU: HKEY_CURRENT_USER HKLM: HKEY_LOCAL_MACHINE HKU: HEKY_USER HER: 相对根键

UMDF驱动安装

VS2013 + WDF8.1,UMDF驱动选择User Mode Driver,不要选User Mode Driver 2.0,否则Win7安装有问题,如图 另外,在驱动安装时不要忘记WUDFUpdate_<主版本号><次版本号>.dll文件,具体文件名在INF中查找。此文件可在WDF的安装目录中找到。注意:在WDF的安装目录中会有3个WUDFUpdate_xxx.dll文件,x86,x6

电脑驱动分类

电脑驱动程序(驱动程序)是操作系统与硬件设备之间的桥梁,用于使操作系统能够识别并与硬件设备进行通信。以下是常见的驱动分类: 1. 设备驱动程序 显示驱动程序:控制显卡和显示器的显示功能,负责图形渲染和屏幕显示。 示例:NVIDIA、AMD 显示驱动程序。打印机驱动程序:允许操作系统与打印机通信,控制打印任务。 示例:HP、Canon 打印机驱动程序。声卡驱动程序:管理音频输入和输出,与声卡硬件

麒麟系统安装GPU驱动

1.nvidia 1.1显卡驱动 本机显卡型号:nvidia rtx 3090 1.1.1下载驱动 打开 https://www.nvidia.cn/geforce/drivers/ 也可以直接使用下面这个地址下载 https://www.nvidia.com/download/driverResults.aspx/205464/en-us/ 1.1.3安装驱动 右击,

windows10 卸载网络驱动以及重新安装

右键桌面此电脑的图标,点击管理,设备管理器—网络适配器,找到下图中的驱动(不同的系统或者显卡会导致网卡驱动名称与下图不一样,多为Realtek开头),右键选择卸载设备,然后重启电脑,系统会自动重新安装驱动 新电脑首次安装驱动: 根据主板厂家,比如华硕,进入华硕官网,点击服务支持,点击下载中心,选择型号,点击右侧驱动程序和工具软件,选择windows版本,下载相应的驱动,下载完之后在对应文件中找

笔记整理—内核!启动!—kernel部分(1)驱动与内核的关系

首先,恭喜完成了uboot部分的内容整理,其次补充一点,uboot第一部分和第二部分的工作不是一定的,在不同的版本中,可能这个初始化早一点,那个的又放在了第二部分,版本不同,造成的工作顺序不同,但终归是要完成基本内容初始化并传参给kernel的。         那么至于驱动与内核的关系,用一张图来说明最适合不过:         驱动位于OS层的中下层与硬件相接。驱动是内

读源码笔记--文件过滤驱动FileSpy第1篇 -- DriverEntry

今天只读FileSpy的DriverEntry,位于源文件:filespy.c。 // // 全局变量. // ULONG gFileSpyDebugLevel = DEFAULT_FILESPY_DEBUG_LEVEL; #if WINVER >= 0x0501 ULONG gFileSpyAttachMode = FILESPY_ATTACH_ALL_VOLUMES; #else ULON

Circuit Design 三极管驱动蜂鸣器电路 及 蜂鸣器两端电压正确但是不响的解决方案

利用三极管进行电流放大的蜂鸣器驱动电路图: (百度图片找的) 我用有源蜂鸣器实现的这个电路,但是蜂鸣器不响。 details: 1. VCC =5V 蜂鸣器两端的直接电压约为4.5V, 但是蜂鸣器不响。 2. 将蜂鸣器直接接在4.5V的电源两端,蜂鸣器响。(说明蜂鸣器是好的) 3. 测了三极管各个管脚的电压, 和理论上的是一致的。 情况很奇怪,换了好几个三极管结果都是一样的,