首页 > 其他分享 >JLX12864G液晶显示屏驱动

JLX12864G液晶显示屏驱动

时间:2024-08-09 23:17:25浏览次数:13  
标签:液晶 0x3F 0x08 显示屏 0x20 0x00 LCD 0x80 JLX12864G

晶联迅液晶显示屏驱动
型号:JLX12864G-109 Ver2.0
单片机:STM32F103C8T6(72MHz)
开发平台:STM32CubeMX+Keil
硬件连接:
LCD_CS --> PB3
LCD_RES --> PB4
LCD_RS --> PB5
LCD_CLK(D6) --> PB6
LCD_SDA(D7) --> PB7
其余电源引脚连接到5V系统电压。
此款液晶屏的驱动芯片实际为ST7565R。

注1:本显示屏为带字库屏,其使用方法为通过一组串口读取屏幕字库芯片的内容,然后再用另外一组串口去写入到屏幕,因为要连接的导线比较多,所以本程序没有去引用它。
注2:本显示屏默认为并口驱动,需要调整PCB上的电阻切换到串口模式。即PCB上原来的R6电阻,调整到R7位置。如下图:

 

头文件:



#ifndef __JL12864G_109_H
#define __JL12864G_109_H


#include "main.h"



void LCD_Init(void);
void LCD_Clear(void);

void LCD_DispStr8x16(uint8_t _ucPage,uint8_t _ucColumn,char *str);
void LCD_DispNum(uint8_t _ucPage,uint8_t _ucColumn,uint16_t num,uint8_t _ucLenth);

#endif

程序文件,相比官方文件,增加了数字显示:

#include "jxl12864g-109.h"
#include "font.h"



#define LCD_CS_H()	HAL_GPIO_WritePin(LCD_CS_GPIO_Port,LCD_CS_Pin,GPIO_PIN_SET)
#define LCD_CS_L()	HAL_GPIO_WritePin(LCD_CS_GPIO_Port,LCD_CS_Pin,GPIO_PIN_RESET)
#define LCD_RS_H()	HAL_GPIO_WritePin(LCD_RS_GPIO_Port,LCD_RS_Pin,GPIO_PIN_SET)
#define LCD_RS_L()	HAL_GPIO_WritePin(LCD_RS_GPIO_Port,LCD_RS_Pin,GPIO_PIN_RESET)
#define LCD_RES_H()	HAL_GPIO_WritePin(LCD_RES_GPIO_Port,LCD_RES_Pin,GPIO_PIN_SET)
#define LCD_RES_L()	HAL_GPIO_WritePin(LCD_RES_GPIO_Port,LCD_RES_Pin,GPIO_PIN_RESET)

#define LCD_CLK_L()	HAL_GPIO_WritePin(LCD_CLK_GPIO_Port,LCD_CLK_Pin,GPIO_PIN_RESET)
#define LCD_CLK_H()	HAL_GPIO_WritePin(LCD_CLK_GPIO_Port,LCD_CLK_Pin,GPIO_PIN_SET)
#define	LCD_SDA_L()	HAL_GPIO_WritePin(LCD_SDA_GPIO_Port,LCD_SDA_Pin,GPIO_PIN_RESET)
#define	LCD_SDA_H()	HAL_GPIO_WritePin(LCD_SDA_GPIO_Port,LCD_SDA_Pin,GPIO_PIN_SET)

#define LCD_Delayms(x)	HAL_Delay(x)

#define REG_DATA	1
#define REG_CMD		0

/****
*	功能:写数据到液晶屏
*	输入:_ucCmd=数据寄存器或者命令寄存器,_ucData=数据
*	输出:无
****/
static void LCD_Write(uint8_t _ucReg,uint8_t _ucData)
{
	uint8_t i;
	if(_ucReg)	LCD_RS_H();
	else		LCD_RS_L();
	for(i=0;i<8;i++)
	{
		LCD_CLK_L();
		if(_ucData & 0x80)	LCD_SDA_H();
		else				LCD_SDA_L();
		LCD_CLK_H();
		_ucData <<= 1;
	}
	
}

/****
*	功能:初始化液晶屏
*	输入:无
*	输出:无
****/
void LCD_Init(void)
{
	LCD_CS_L();
	LCD_RES_L();				/*低电平复位*/
	LCD_Delayms(20);
	LCD_RES_H();				/*复位完成*/
	LCD_Delayms(20);
	LCD_Write(REG_CMD,0XE2);	/*软复位*/
	LCD_Delayms(5);
	LCD_Write(REG_CMD,0x2c);	/*升压1*/
	LCD_Delayms(5);
	LCD_Write(REG_CMD,0x2e);	/*升压2*/
	LCD_Delayms(5);
	LCD_Write(REG_CMD,0x2f);	/*升压3*/
	LCD_Delayms(5);	
	LCD_Write(REG_CMD,0x24);	/*粗调对比度,0x20-0x27*/
	LCD_Write(REG_CMD,0x81);	/*微调对比度*/
	LCD_Write(REG_CMD,0x1b);	/*微调对比度值,0x00-0x3f*/
	LCD_Write(REG_CMD,0xa2);	/*1/9偏压比*/
	LCD_Write(REG_CMD,0xc8);	/*行扫描顺序:从上到下*/
	LCD_Write(REG_CMD,0xa0);	/*列扫描顺序:从左到右*/
	LCD_Write(REG_CMD,0x60);	/*起始行:第一行开始*/	
//	LCD_Write(REG_CMD,0xA7);	/*反显*/	
	LCD_Write(REG_CMD,0xaf);	/*开显示*/
	LCD_CS_H();
}
//
/****
*	功能:设置屏幕的位置
*	输入:无
*	输出:无
****/
static void LCD_SetPos(uint8_t _ucPage,uint8_t _ucColumn)
{
	LCD_CS_L();
	_ucPage -= 1;
	LCD_Write(REG_CMD,0xb0+_ucPage);
	LCD_Write(REG_CMD,((_ucColumn>>4) & 0x0f) + 0x10);
	LCD_Write(REG_CMD,(_ucColumn & 0x0f));
}
/****
*	功能:清屏
*	输入:无
*	输出:无
****/
void LCD_Clear(void)
{
	uint8_t i,j;
	LCD_CS_L();
	for(i=0; i<9; i++)
	{
		LCD_SetPos(1+i,1);
		for(j=0; j<132; j++)
		{
			LCD_Write(REG_DATA,0x00);
		}
	}
	LCD_CS_H();
}
/****
*	功能:显示单个8*16字符
*	输入:无
*	输出:无
****/
static void LCD_DispChar8x16(uint8_t _ucPage,uint8_t _ucColumn,uint8_t *p)
{
	uint8_t i,j;
	LCD_CS_L();
	for(j=0; j<2; j++)
	{
		LCD_SetPos(_ucPage+j,_ucColumn);
		for(i=0; i<8; i++)
		{
			LCD_Write(REG_DATA,*p);
			p++;
		}
		
	}
	LCD_CS_H();
}
//
//m^n函数
//返回值:m^n次方.
uint32_t LCD_Pow(uint8_t m,uint8_t n)
{
	uint32_t result=1;	 
	while(n--)result*=m;    
	return result;
}		
/****
*	功能:显示8*16字符串
*	输入:无
*	输出:无
****/
void LCD_DispStr8x16(uint8_t _ucPage,uint8_t _ucColumn,char *str)
{
	uint8_t num,i;
	uint8_t  buff[16];
	while(*str != '\0')
	{
		num = *str - ' ';/*定位字符在二维数组中的位置*/
		for(i=0; i<16; i++)/*获取字符的取模数据*/
		{
			buff[i] = ASCII_8X16[num][i];
		}
		LCD_DispChar8x16(_ucPage,_ucColumn,buff);
		_ucColumn += 8;
		str++;
	}
}

/****
*	功能:显示8*16字符数字
*	输入:
*	输出:无
****/
void LCD_DispNum(uint8_t _ucPage,uint8_t _ucColumn,uint16_t num,uint8_t _ucLenth)
{    	
	uint8_t i,t,temp;
	uint8_t enshow=0;	
	uint8_t buff[16];
	for(t=0;t<_ucLenth;t++)
	{
		temp=(num/LCD_Pow(10,_ucLenth-t-1))%10;
		if(enshow==0&&t<(_ucLenth-1))
		{
			if(temp==0)
			{
				LCD_DispStr8x16(_ucPage,_ucColumn+8*t," ");
				continue;
			}else enshow=1; 
		}
		temp += 16 ;
		for(i=0; i<16; i++)/*获取字符的取模数据*/
		{
			buff[i] = ASCII_8X16[temp][i];
		}
	 	LCD_DispChar8x16(_ucPage,_ucColumn+8*t,buff); 
	}
}
//

使用的是自定义的字库,文件如下,注意取模方式:

#ifndef __FONT_H
#define __FONT_H

#include "main.h"

/**
自定义取模方式:
*	列行式
*	逆向(低位在前)
**/
const uint8_t ASCII_8X16[95][16]={
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/

{0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x00,0x00,0x00,0x00},/*"!",1*/

{0x00,0x10,0x0C,0x02,0x10,0x0C,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*""",2*/

{0x00,0x40,0xC0,0x78,0x40,0xC0,0x78,0x00,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x00},/*"#",3*/

{0x00,0x70,0x88,0x88,0xFC,0x08,0x30,0x00,0x00,0x18,0x20,0x20,0xFF,0x21,0x1E,0x00},/*"$",4*/

{0xF0,0x08,0xF0,0x80,0x60,0x18,0x00,0x00,0x00,0x31,0x0C,0x03,0x1E,0x21,0x1E,0x00},/*"%",5*/

{0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x2C,0x19,0x27,0x21,0x10},/*"&",6*/

{0x00,0x12,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/

{0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00},/*"(",8*/

{0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00},/*")",9*/

{0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00},/*"*",10*/

{0x00,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x0F,0x01,0x01,0x01},/*"+",11*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x70,0x00,0x00,0x00,0x00,0x00},/*",",12*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x00},/*"-",13*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00},/*".",14*/

{0x00,0x00,0x00,0x00,0xC0,0x38,0x04,0x00,0x00,0x60,0x18,0x07,0x00,0x00,0x00,0x00},/*"/",15*/

{0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00},/*"0",16*/

{0x00,0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00},/*"1",17*/

{0x00,0x70,0x08,0x08,0x08,0x08,0xF0,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00},/*"2",18*/

{0x00,0x30,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x18,0x20,0x21,0x21,0x22,0x1C,0x00},/*"3",19*/

{0x00,0x00,0x80,0x40,0x30,0xF8,0x00,0x00,0x00,0x06,0x05,0x24,0x24,0x3F,0x24,0x24},/*"4",20*/

{0x00,0xF8,0x88,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x20,0x20,0x20,0x11,0x0E,0x00},/*"5",21*/

{0x00,0xE0,0x10,0x88,0x88,0x90,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x20,0x1F,0x00},/*"6",22*/

{0x00,0x18,0x08,0x08,0x88,0x68,0x18,0x00,0x00,0x00,0x00,0x3E,0x01,0x00,0x00,0x00},/*"7",23*/

{0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00},/*"8",24*/

{0x00,0xF0,0x08,0x08,0x08,0x10,0xE0,0x00,0x00,0x01,0x12,0x22,0x22,0x11,0x0F,0x00},/*"9",25*/

{0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00},/*":",26*/

{0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x00,0x00,0x00},/*";",27*/

{0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00},/*"<",28*/

{0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x00},/*"=",29*/

{0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00},/*">",30*/

{0x00,0x70,0x48,0x08,0x08,0x88,0x70,0x00,0x00,0x00,0x00,0x30,0x37,0x00,0x00,0x00},/*"?",31*/

{0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x28,0x2F,0x28,0x17,0x00},/*"@",32*/

{0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20},/*"A",33*/

{0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00},/*"B",34*/

{0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00},/*"C",35*/

{0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00},/*"D",36*/

{0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00},/*"E",37*/

{0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00},/*"F",38*/

{0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00},/*"G",39*/

{0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20},/*"H",40*/

{0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"I",41*/

{0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00},/*"J",42*/

{0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00},/*"K",43*/

{0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00},/*"L",44*/

{0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x01,0x3E,0x01,0x3F,0x20,0x00},/*"M",45*/

{0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00},/*"N",46*/

{0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00},/*"O",47*/

{0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00},/*"P",48*/

{0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x28,0x28,0x30,0x50,0x4F,0x00},/*"Q",49*/

{0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20},/*"R",50*/

{0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00},/*"S",51*/

{0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00},/*"T",52*/

{0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00},/*"U",53*/

{0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00},/*"V",54*/

{0x08,0xF8,0x00,0xF8,0x00,0xF8,0x08,0x00,0x00,0x03,0x3E,0x01,0x3E,0x03,0x00,0x00},/*"W",55*/

{0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20},/*"X",56*/

{0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00},/*"Y",57*/

{0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00},/*"Z",58*/

{0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00},/*"[",59*/

{0x00,0x04,0x38,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00},/*"\",60*/

{0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00},/*"]",61*/

{0x00,0x00,0x04,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"^",62*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80},/*"_",63*/

{0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/

{0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x19,0x24,0x24,0x12,0x3F,0x20,0x00},/*"a",65*/

{0x10,0xF0,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00},/*"b",66*/

{0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00},/*"c",67*/

{0x00,0x00,0x80,0x80,0x80,0x90,0xF0,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20},/*"d",68*/

{0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x24,0x24,0x24,0x24,0x17,0x00},/*"e",69*/

{0x00,0x80,0x80,0xE0,0x90,0x90,0x20,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"f",70*/

{0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00},/*"g",71*/

{0x10,0xF0,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20},/*"h",72*/

{0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"i",73*/

{0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00},/*"j",74*/

{0x10,0xF0,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x06,0x29,0x30,0x20,0x00},/*"k",75*/

{0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00},/*"l",76*/

{0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F},/*"m",77*/

{0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20},/*"n",78*/

{0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00},/*"o",79*/

{0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0x91,0x20,0x20,0x11,0x0E,0x00},/*"p",80*/

{0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0x91,0xFF,0x80},/*"q",81*/

{0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00},/*"r",82*/

{0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00},/*"s",83*/

{0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x10,0x00},/*"t",84*/

{0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20},/*"u",85*/

{0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x03,0x0C,0x30,0x0C,0x03,0x00,0x00},/*"v",86*/

{0x80,0x80,0x00,0x80,0x80,0x00,0x80,0x80,0x01,0x0E,0x30,0x0C,0x07,0x38,0x06,0x01},/*"w",87*/

{0x00,0x80,0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x20,0x31,0x0E,0x2E,0x31,0x20,0x00},/*"x",88*/

{0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x81,0x86,0x78,0x18,0x06,0x01,0x00},/*"y",89*/

{0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00},/*"z",90*/

{0x00,0x00,0x00,0x00,0x00,0xFC,0x02,0x02,0x00,0x00,0x00,0x00,0x01,0x3E,0x40,0x40},/*"{",91*/

{0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00},/*"|",92*/

{0x02,0x02,0xFC,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x3E,0x01,0x00,0x00,0x00,0x00},/*"}",93*/

{0x00,0x02,0x01,0x02,0x02,0x04,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"~",94*/	
};

#endif
//

最终驱动效果如下:

 

 

原文链接:https://blog.csdn.net/qq_39649731/article/details/128643422

标签:液晶,0x3F,0x08,显示屏,0x20,0x00,LCD,0x80,JLX12864G
From: https://www.cnblogs.com/FBsharl/p/18351664

相关文章

  • 没有显示屏也能远程控制?ToDesk的虚拟屏做到了!
    如果你习惯多屏办公,但远程控制时受控电脑却只有一个屏幕,或者连屏幕都没有怎么办?如果你想远控家里电脑打游戏,但不想打开显示屏被发现,或是需要远程打开模拟器和visualstudio等软件,但苦于没有显示器怕远控不成功?小社长今天给你安利ToDesk远程控制的虚拟屏功能!只要开启就能让你摆脱......
  • P1.53和P1.86的LED显示屏什么区别
    我们的夏游记有些客户在采购LED显示屏时,对点间距或其它的参数不是很了解,如P1.53和P1.86之间有什么区别,选择哪一款性价高更高呢?业角度为大家分析,希望能对大家提供到一些帮助。目前,LED显示屏在室内场合的应用中,P1.53和P1.86是应用比较广泛的两款小间距LED系列,它们在分辨率......
  • led显示屏p2和p2.5区别,看完你就知道【深圳播报】
    L2024LPL春季赛led显示屏p2和p2.5区别,LED显示屏作为现代信息显示的重要工具,其规格和性能对于用户体验至关重要。在LED显示屏的规格中,P2和P2.5是两个常见的像素间距标准。虽然它们只有微小的数值差异,但在实际应用中,两者却存在显著的差异。下面跟着迈普光彩小编一起来看看吧......
  • 49.TFT_LCD液晶屏驱动设计与验证(2)
    (1)Visio视图:(2)控制模块Verilog代码:moduletft_ctrl(inputclk_33M,inputreset_n,input[23:0]data_in,output[9:0]hang......
  • DSP技术及应用的综合项目:串口与按键控制直流电机运行及液晶屏显示状态 芯片是TMS320F2
    目录绪论串口与按键控制直流电机运行及液晶屏显示状态一、实验目的及要求二、实验原理三、实验软硬件环境四、实验过程(实验步骤、记录、数据、分析)五、测试/调试及实验结果分析六、实验结论与体会内容说明参考资料绪论随着科技的飞速发展,数字信号处理器(DSP)在现代......
  • BMP图片的复制#显示到显示屏
    复制BMP图片#include<stdio.h>#include<sys/types.h>#include<sys/stat.h>#include<fcntl.h>#include<unistd.h>#include<sys/mman.h>#include<stdlib.h>/**复制bmp图片***/#pragmapack(1)//定义BMP文件头部结构ty......
  • VKL060/076 SSOP24/28 超低功耗LCD液晶段码屏驱动芯片适用水电表/温湿度计,FAE技术支持
    VKL060概述: VKL060是一个点阵式存储映射的LCD驱动器,可支持最大60点(15SEGx4COM)的LCD屏。单片机可通过I2C接口配置显示参数和读写显示数据,可配置4种功耗模式,也可通过关显示和关振荡器进入省电模式。其高抗干扰,低功耗的特性适用于水电气表以及工控仪表类产品。功能特点:•  工......
  • (VKL系列)超低功耗LCD液晶显示驱动IC-VKL76 SSOP28,19*4 76点阵,超低工作电流约7.5微安,
    VKL076概述:VKL076是一个点阵式存储映射的LCD驱动器,可支持最大76点(19SEGx4COM)的LCD屏。单片机可通过I2C接口配置显示参数和读写显示数据,可配置4种功耗模式,也可通过关显示和关振荡器进入省电模式。其高抗干扰,低功耗的特性适用于水电气表以及工控仪表类产品。功能特点:•  工......
  • VKL060 SSOP24仪器仪表超低功耗/超省电LCD液晶段码驱动IC: 分贝仪、测光仪、测厚仪
    VKL060概述: VKL060是一个点阵式存储映射的LCD驱动器,可支持最大60点(15SEGx4COM)的LCD屏。单片机可通过I2C接口配置显示参数和读写显示数据,可配置4种功耗模式,也可通过关显示和关振荡器进入省电模式。其高抗干扰,低功耗的特性适用于水电气表以及工控仪表类产品。功能特点:•  工......
  • 03 OLED显示屏实现
    目录前言一、软件模拟IIC协议1.开启IIC协议2.结束IIC协议3.传输数据二、OLED的操作1.传输数据的准备2.写入命令3.写入数据4.初始化函数5.设置光标6.显示字符7.显示字符串8.清屏9.显示汉字10.显示图片11.显示动图三、完整代码总结前言这一章主要是上一节没有讲完的项目的一个编写......