1、LCD显示模块LM6029ACW介绍
LM6029ACW-4是TOPWAY LCD生产的一款液晶显示屏。以下是其主要特性和规格:
- 类型:液晶,图像,单色。
- 格式:128 x 64。
- 应用:主要用于工业、控制、信息等领域。
- 接口:并行。
- 电压:3.3V。
- 温度范围:-30℃~85℃。
- 外形尺寸:59.6mm x 50.6mm x 8.7mm。
- 可视区域:53.6mm x 31.0mm。
2、各引脚功能
Pin No. | Pin Name | I/O | Descriptions |
1 | VSS | 电源 | 负电源,0V |
2 | VDD | 电源 | 正电源 |
3 | DB7 | 输入/输出 | 8 位数据总线; 用于显示数据或指令数据的三态I/O终端 当 /CS =H; DB0~DB7=高阻抗 |
.. | .. | ||
10 | DB0 | ||
11 | /RD | 输入 | 读取使能输入,低电平有效 |
12 | /WR | 输入 | 写入使能输入,低电平有效 |
13 | RS | 输入 | 注册选择 RS = H,传输显示数据 RS = L,传输控制数据 |
14 | /RES | 输入 | 复位信号 /RES = L,执行初始化 /RES = H,正常运行。 |
15 | /CS1 | 输入 | 芯片选择 /CS1=L,启用对 LCD 模块的访问 /CS1=H,禁用对 LCD 模块的访问 |
16 | BLA | 电源 | LED背光的正功率 |
该模块采用的是8080总线时序进行通讯。
3、8080 模式系统总线时序
4、显示命令
No. | Instructions | Code | Function | ||||||||||
RS | /RD | /WR | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | |||
1 | 显示开/关 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | DON | DON=0,显示关闭 DON=1,显示开启 |
2 | 显示起跑线集 | 0 | 1 | 0 | 0 | 1 | 显示开始地址 | 设置显示RAM显示起始行地址 | |||||
3 | 设置页面地址 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 页面地址 | 设置显示RAM页面地址 | |||
4 | 设置列地址 (上4 位) | 0 | 1 | 0 | 0 | 0 | 0 | 1 | Col. Add.Upper | 设置列地址计数器的上 4 位 | |||
设置列地址 (下4 位) | 0 | 1 | 0 | 0 | 0 | 0 | 0 | Col. Add.Lower | 设置列地址计数器的下 4 位 | ||||
5 | 读取状态 | 0 | 0 | 1 | 状态 | 0 | 0 | 0 | 0 | 读取状态数据 | |||
6 | 写入显示数据 | 1 | 1 | 0 | 写入数据 | 将数据写入显示RAM | |||||||
7 | 读取显示数据 | 1 | 0 | 1 | 读取数据 | 从显示RAM读取数据 | |||||||
8 | ADC选择 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | ADC | 设置显示RAM地址SEG输出通信 ADC=0,正常。ADC=1,反向 |
9 | 正常/反向显示 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | REV | REV=0,正常显示 REV=1,反向显示 |
10 | 整个显示屏开/关 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | EON | EON=0,正常显示 EON=1,整个显示屏开启 |
11 | 设置 LCD 偏置 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | BIAS | 设置LCD驱动电压偏置 偏置=0,1/9 偏置 偏置=1,1/7偏置 |
12 | 设置读-修改-写入 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 进入“读-修改-写”模式,列地址计数器将在每个“写入显示数据”,并且不会在每个“读取显示”中增加数据命令” |
13 | 重置读-修改-写入 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 清除“读-修改-写”模式 |
14 | 复位 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 重置液晶模块 |
15 | SHL选择 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | SHL | * | * | * | 设置 COM 扫描方向 SHL=0,正常显示 SHL=1,沿 y 方向翻转 * = 不在乎条款 |
16 | 电源控制套件 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | VC | VR | VF | 设置电源电路操作模式 VF: LCD电源电压跟随器 VR:LCD电源稳压器 VC:LCD电源电压转换器 (1=开,0=关) |
17 | 稳压器电阻选择 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | Radio setting | 设置内置电阻比 (Rb/Ra) | ||
18 | 电子容量模式设置 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 设置参考电压模式 |
电子容量寄存器设置 | 0 | 1 | 0 | * | * | 电子控制值 | 设置基准电压寄存器 (显示对比度值) | ||||||
19 | 睡眠模式设置 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | S | 休眠模式(2字节命令) S=0,休眠模式 S=1,正常模式 |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||
20 | 增压比组 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 升压比(2字节指令) Ratio=00, 2x, 3x, 4x Ratio=01, 5x Ratio=11, 6x |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Ratio | ||||
21 | NOP | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 无操作命令 |
了解了以上信息就可以开始进行代码编写了
5、代码编写
模块与STM32VC连接原理图
为了方便变成首先对一些结构体进行重命名存放到mytype.h中
mytype.h
#ifndef _TYPE_H
#define _TYPE_H
#include <stddef.h>
#include "stdint.h" // Define standard integers.
typedef short int16;
typedef long int32;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef unsigned char BOOL;
typedef unsigned short WORD;
typedef unsigned char BOOLEAN;
typedef unsigned char uint8; /* Unsigned 8 bit quantity */
typedef signed char int8; /* Signed 8 bit quantity */
typedef float FP32; /* Single precision floating point */
typedef double FP64; /* Double precision floating point */
#define BYTE uint8 /* Define data types for backward compatibility ... */
#define UBYTE uint8 /* ... to uC/OS V1.xx. Not actually needed for ... */
//#define WORD INT16S /* ... uC/OS-II. */
#define UWORD uint16
#define DWORD uint32
#endif
紧接着对IO口进行初始化操作,并且写入相应命令对LCD模块进行初始化操作,并且编写显示字符函数。
lcd.c
#include <stdlib.h>
#include "stm32f10x.h"
#include "lcd.h"
#include "mytype.h"
#include "zk.c"
//static int comp(const hz_struct *dest_hz, const hz_struct *src_hz);
#define MAX_X 8
#define MAX_Y 16
uint8 LcdRAM[MAX_X][MAX_Y*8];
#define E_H() (GPIOD->BSRR = GPIO_Pin_3 )//PD3
#define E_L() (GPIOD->BRR = GPIO_Pin_3 )
#define A0_H() (GPIOD->BSRR = GPIO_Pin_5) //H数据/L指令 PD5
#define A0_L() (GPIOD->BRR = GPIO_Pin_5)
#define RW_H() (GPIOD->BSRR = GPIO_Pin_4 )//PD4
#define RW_L() (GPIOD->BRR = GPIO_Pin_4 )
#define CS_H() (GPIOB->BSRR = GPIO_Pin_5 )//PB5
#define CS_L() (GPIOB->BRR = GPIO_Pin_5 )
#define RST_H() (GPIOD->BSRR = GPIO_Pin_6 )//PD6
#define RST_L() (GPIOD->BRR = GPIO_Pin_6 )
#define BLA_H() (GPIOB->BSRR = GPIO_Pin_6 )//PB6
#define BLA_L() (GPIOB->BRR = GPIO_Pin_6 )
void DBOUT(BYTE data)
{
if(data&0x80)
GPIO_WriteBit(GPIOD, GPIO_Pin_14, Bit_SET);
else
GPIO_WriteBit(GPIOD, GPIO_Pin_14, Bit_RESET);
if(data&0x40)
GPIO_WriteBit(GPIOD, GPIO_Pin_15, Bit_SET);
else
GPIO_WriteBit(GPIOD, GPIO_Pin_15, Bit_RESET);
if(data&0x20)
GPIO_WriteBit(GPIOC, GPIO_Pin_6 , Bit_SET);
else
GPIO_WriteBit(GPIOC, GPIO_Pin_6 , Bit_RESET);
if(data&0x10)
GPIO_WriteBit(GPIOC, GPIO_Pin_7 , Bit_SET);
else
GPIO_WriteBit(GPIOC, GPIO_Pin_7 , Bit_RESET);
if(data&0x08)
GPIO_WriteBit(GPIOC, GPIO_Pin_8 , Bit_SET);
else
GPIO_WriteBit(GPIOC, GPIO_Pin_8 , Bit_RESET);
if(data&0x04)
GPIO_WriteBit(GPIOC, GPIO_Pin_9 , Bit_SET);
else
GPIO_WriteBit(GPIOC, GPIO_Pin_9 , Bit_RESET);
if(data&0x02)
GPIO_WriteBit(GPIOD, GPIO_Pin_1 , Bit_SET);
else
GPIO_WriteBit(GPIOD, GPIO_Pin_1 , Bit_RESET);
if(data&0x01)
GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_SET);
else
GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_RESET);
}
static void delay(int16 n)
{
int8 i;
for(; n>0; n--)
{
for(i=3; i>0; i--);
}
}
static void WriteData(unsigned char DATA)
{
//CheckBusy();
CS_L();
E_H();
A0_H();
DBOUT(DATA);
RW_L();
delay(1);
RW_H();
CS_H();
}
static void WriteCommand(unsigned char command)
{
//CheckBusy();
CS_L();
E_H();
A0_L();
DBOUT(command);
RW_L();
delay(1);
RW_H();
CS_H();
}
void Lcd_Init(void)
{
//uint16 contrast;
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOC|RCC_APB2Periph_GPIOD, ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_14|GPIO_Pin_15;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;//DB1,DB0,RD,WR,RS,RST,DB7,DB6
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOD, &GPIO_InitStructure);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_8|GPIO_Pin_9;
GPIO_Init(GPIOC, &GPIO_InitStructure);//DB5,DB4,DB3,DB2
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5|GPIO_Pin_6;
GPIO_Init(GPIOB, &GPIO_InitStructure);//CSE1,LCD_LED
delay(100);
RST_L();
delay(1000);
RST_H();
delay(100);
BLA_L();
WriteCommand(0xe2); //软件复位
WriteCommand(0xaf); //开显示
WriteCommand(0x40); //显示RAM的行地址 0x40为第0行
WriteCommand(0xa0); //0xa0正向显示 0xa1反向显示
WriteCommand(0xa6); //0xa6正常显示 0xa7反白显示
WriteCommand(0xa4);
WriteCommand(0xa2); //偏压比设定
WriteCommand(0xc8); //第0行在屏幕上方
WriteCommand(0x2f); //开关内部电源
WriteCommand(0x26); //对比度设置
WriteCommand(0x81); //进入对比度细调命令
WriteCommand(0x24);
delay(1000);
}
void Lcd_Init_RST(void)
{
WriteCommand(0xaf); //开显示
WriteCommand(0x40); //显示RAM的行地址 0x40为第0行
WriteCommand(0xa0); //0xa0正向显示 0xa1反向显示
WriteCommand(0xa6); //0xa6正常显示 0xa7反白显示
WriteCommand(0xa4);
WriteCommand(0xa2); //偏压比设定
WriteCommand(0xc8); //第0行在屏幕上方
WriteCommand(0x2f); //开关内部电源
WriteCommand(0x26); //调节对比度
}
static uint8 xImg[]={7,6,5,4,3,2,1,0};
//显示一个字符 坐标以8*8为最小单位
static void DisChar(int x, int y, char c, int fb)
{
int i,k;
char Data;
if( (x >= MAX_X) || (y > MAX_Y) ) return;
x = xImg[x];
y <<= 3;
if(c>=0x20) c = c - 0x20;
else c = 0;
k = c*16;
for(i=0; i<16; i++,k++)
{
if(fb)
Data = 0xFF - charzk[k];
else
Data = charzk[k];
LcdRAM[x][y+i] = Data;
}
}
void Lcd_Clear(void)
{
uint8 page, j;
for(page=0; page<8; page++)
{
for(j=0;j<128;j++)
{
LcdRAM[page][j] = 0;
}
}
}
void Lcd_Update(void)
{
uint8 page, j;
WriteCommand(0xc8); //第0行在屏幕上方
for(page=0; page<8; page++)
{
WriteCommand(0xb0 | page); //select page 0~7
WriteCommand(0x10); //start form column 0
WriteCommand(0x00); //(2byte command)
for(j=0;j<128;j++)
{
WriteData(LcdRAM[page][j]);
}
}
}
void Lcd_DisChar(int x, int y, char c)
{
DisChar(x, y, c, 0);
}
void Lcd_DisChar_Not(int x, int y, char c)
{
DisChar(x, y, c, 1);
}
void Lcd_DisString(int x,int y,const char *pstr)
{
while(*pstr)
{
if(*pstr & 0x80)
{
if(pstr[1])
{
x++;
x++;
pstr++;
pstr++;
}
else
{
Lcd_DisChar(x,y,pstr[0]);
x++;
pstr++;
}
}
else
{
Lcd_DisChar(x,y,pstr[0]);
x++;
pstr++;
}
}
}
void Lcd_DisString_Not(int x,int y,const char *pstr)
{
while(*pstr)
{
if(*pstr & 0x80)
{
if(pstr[1])
{
x++;
x++;
pstr++;
pstr++;
}
else
{
Lcd_DisChar_Not(x,y,pstr[0]);
x++;
pstr++;
}
}
else
{
Lcd_DisChar_Not(x,y,pstr[0]);
x++;
pstr++;
}
}
}
void Lcd_DisMultiString(int x, int y, const char *pstr)
{
while(*pstr)
{
if(*pstr & 0x80)
{
if(pstr[1])
{
if((x+2) > MAX_X)
{
x=0;
y++;
y++;
}
x++;
x++;
pstr++;
pstr++;
}
else
{
if((x+1) > MAX_X)
{
x=0;
y++;
y++;
}
Lcd_DisChar(x,y,pstr[0]);
x++;
pstr++;
}
}
else
{
if((x+1) > MAX_X)
{
x=0;
y++;
y++;
}
Lcd_DisChar(x,y,pstr[0]);
x++;
pstr++;
}
}
}
lcd.h
#ifndef _LCD_H
#define _LCD_H
void Lcd_Init(void);
void Drv_Lcd_Clear(void);
void Lcd_DisString(int x,int y,const char *pstr);
void Lcd_Update(void);
#endif
zk.c
const BYTE charzk[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x18,0x3c,0x3c,0x3c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,0x00,0x00,
0x18,0x18,0x7c,0xc6,0xc2,0xc0,0x7c,0x06,0x06,0x86,0xc6,0x7c,0x18,0x18,0x00,0x00,
0x00,0x00,0x00,0x00,0xc2,0xc6,0x0c,0x18,0x30,0x60,0xc6,0x86,0x00,0x00,0x00,0x00,
0x00,0x00,0x38,0x6c,0x6c,0x38,0x76,0xdc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00,0x00,0x00,0x00,
0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x38,0x6c,0xc6,0xc6,0xd6,0xd6,0xc6,0xc6,0x6c,0x38,0x00,0x00,0x00,0x00,
0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0xc6,0x06,0x0c,0x18,0x30,0x60,0xc0,0xc6,0xfe,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0xc6,0x06,0x06,0x3c,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x0c,0x1e,0x00,0x00,0x00,0x00,
0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xfc,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x38,0x60,0xc0,0xc0,0xfc,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0xfe,0xc6,0x06,0x06,0x0c,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x0c,0x78,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0xc6,0xc6,0x0c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7c,0xc6,0xc6,0xde,0xde,0xde,0xdc,0xc0,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00,
0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00,0x00,0x00,
0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00,0x00,0x00,
0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00,
0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,
0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xde,0xc6,0xc6,0x66,0x3a,0x00,0x00,0x00,0x00,
0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
0x00,0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00,
0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6,0x00,0x00,0x00,0x00,
0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00,
0x00,0x00,0xc6,0xee,0xfe,0xfe,0xd6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
0x00,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xde,0x7c,0x0c,0x0e,0x00,0x00,
0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00,
0x00,0x00,0x7c,0xc6,0xc6,0x60,0x38,0x0c,0x06,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x7e,0x7e,0x5a,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x10,0x00,0x00,0x00,0x00,
0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xd6,0xd6,0xd6,0xfe,0xee,0x6c,0x00,0x00,0x00,0x00,
0x00,0x00,0xc6,0xc6,0x6c,0x7c,0x38,0x38,0x7c,0x6c,0xc6,0xc6,0x00,0x00,0x00,0x00,
0x00,0x00,0x66,0x66,0x66,0x66,0x3c,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
0x00,0x00,0xfe,0xc6,0x86,0x0c,0x18,0x30,0x60,0xc2,0xc6,0xfe,0x00,0x00,0x00,0x00,
0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x1c,0x0e,0x06,0x02,0x00,0x00,0x00,0x00,
0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00,0x00,0x00,
0x10,0x38,0x6c,0xc6,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,0x00,0x00,
0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
0x00,0x00,0xe0,0x60,0x60,0x78,0x6c,0x66,0x66,0x66,0x66,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x1c,0x0c,0x0c,0x3c,0x6c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0xcc,0x78,0x00,
0x00,0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00,
0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
0x00,0x00,0x06,0x06,0x00,0x0e,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3c,0x00,
0x00,0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x78,0x6c,0x66,0xe6,0x00,0x00,0x00,0x00,
0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xec,0xfe,0xd6,0xd6,0xd6,0xd6,0xc6,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xf0,0x00,
0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x0c,0x1e,0x00,
0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x66,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x60,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00,0x00,
0x00,0x00,0x10,0x30,0x30,0xfc,0x30,0x30,0x30,0x30,0x36,0x1c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3c,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xd6,0xd6,0xd6,0xfe,0x6c,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x38,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0xf8,0x00,
0x00,0x00,0x00,0x00,0x00,0xfe,0xcc,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00,
0x00,0x00,0x0e,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0e,0x00,0x00,0x00,0x00,
0x00,0x00,0x10,0x20,0x42,0x4E,0x82,0x82,0x82,0x82,0x82,0x42,0x42,0x2F,0x10,0x00,
0x00,0x00,0x00,0x00,0x03,0x02,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
0x00,0x00,0x08,0x04,0xF2,0x22,0x21,0x41,0x41,0x81,0x81,0x82,0x82,0x84,0x08,0x00,
0x00,0x00,0x08,0x04,0xF2,0x22,0x21,0x41,0x41,0x81,0x81,0x82,0x82,0x84,0x08,0x00,
};
main.c
/* Includes ------------------------------------------------------------------*/
#include "mytype.h"
#include "usart.h"
#include "lcd.h"
// #include "lcd_display.h"
#define BLA_H() (GPIOB->BSRR = GPIO_Pin_6 )//PB6
#define BLA_L() (GPIOB->BRR = GPIO_Pin_6 )
/**
* @brief Main program.
* @param None
* @retval None
*/
int main(void)
{
/* Configure RCC */
Lcd_Init();
BLA_L();
Lcd_DisString(0, 0, "hello");
Lcd_DisString(0, 2, "hi");
Lcd_Update();
while (1)
{}
}