STM32F103模拟SPI控制6针/7针0.96寸OLED显示屏

这篇具有很好参考价值的文章主要介绍了STM32F103模拟SPI控制6针/7针0.96寸OLED显示屏。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

OLED介绍

OLED主要参数
1、高分辨率:12864(和12864LCD相同分辨率,但该OLED屏的单位面积像素点多)。
2、广可视角度:大于160°。
3、低功耗:正常显示时0.04W。
4、宽供电范围:直流3.3V-5V。
5、工业级:工作温度范围-30°℃~70°℃。
6、体积小:28.8mm
28.5mm。
7、通信方式:lIC、SPI。
8、亮度、对比度可以通过程序指令控制。
9、OLED屏幕内部驱动芯片:SSD1306。

6针OLED如下图所示
stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm
引脚定义分别为

引脚 定义
GND 电源负
VCC 电源正3.3V-5V
SCL 时钟信号线
SDA 双向数据线
RES 复位
D/C 数据或命令切换

7针OLED如下图所示
stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm
引脚定义分别为

引脚 定义
GND 电源负
VCC 电源正3.3V-5V
D0 SPI接口为SPI时钟线
D1 SPI接口为SPI数据线
RES 复位
DC 数据或命令切换
CS 片选信号

本质上6针与7针都可以使用SPI控制,6针使用SPI通信时,默认片选引脚为选中状态,SCL为SPI时钟线,SDA为SPI数据线。

SPI相对于4针IIC通讯有着无可替代的优势,就是在显示中文字符时不需要通过输入数字的方式引导去查表,先将要显示的中文字符编码存放到一个数组当中,需要显示中文时直接打入要显示的中文即可,省去了IIC查表的麻烦。

取字模

一、使用OLED之前先对所需要显示的内容取字模,取字模使用三贝计算器

选项类型 选择内容
输出格式 C51
数据排列 从左到右从上到下
取模方式 横向8点左高位
黑白取反 正常
字体种类 自选
强制全角 ASCII自动转全角

stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm
二、PCtoLCD2002
stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm

程序

main.c



#include	"system.h"
#include	"delay.h"
#include	"oled.h"


int main(void)
{
	delay_init();
	OLED_Init();//初始化OLED
	OLED_Clear(0);//清屏(全黑)
	
	while(1)
	{
		OLED_Test_MainPage();         //主界面显示测试
		OLED_Clear(0); 
		OLED_Test_Color();            //刷屏测试
		OLED_Clear(0); 
		OLED_Test_Rectangular();      //矩形绘制测试
		OLED_Clear(0); 
		OLED_Test_Circle();           //圆形绘制测试
		OLED_Clear(0); 
		OLED_Test_Triangle();         //三角形绘制测试
		OLED_Clear(0);  
		
		OLED_TEST_English();          //英文显示测试
		OLED_Clear(0);
		OLED_TEST_Number_Character(); //数字和符号显示测试
		OLED_Clear(0); 
		
		OLED_Test_Chinese();          //中文显示测试
		OLED_Clear(0); 
		OLED_Test_BMP();              //BMP单色图片显示测试
		OLED_Clear(0); 
		OLED_Test_Menu1();            //菜单1显示测试
		OLED_Clear(0); 
		OLED_Test_Menu2();            //菜单2显示测试
		OLED_Clear(0);
	}
}


oled.c



#include "oled.h"
#include "oledfont.h"


//OLED显存总共分为8页
//每页8行,一行128个像素点
//OLED的显存
//存放格式如下.
//[0]0 1 2 3 ... 127 (0~7)行
//[1]0 1 2 3 ... 127 (8~15)行
//[2]0 1 2 3 ... 127 (16~23)行
//[3]0 1 2 3 ... 127 (24~31)行
//[4]0 1 2 3 ... 127 (32~39)行
//[5]0 1 2 3 ... 127 (40~47)行
//[6]0 1 2 3 ... 127 (48~55)行
//[7]0 1 2 3 ... 127 (56~63)行


//数组每个bit存储OLED每个像素点的颜色值(1-亮(白色),0-灭(黑色))
//每个数组元素表示1列8个像素点,一共128列
static unsigned char OLED_buffer[1024] = 
{
	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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,
	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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,
	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,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,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,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,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,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,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,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};


/*******************************************************************
 * @name       :void OLED_Write_Byte(unsigned dat,unsigned cmd)
 * @date       :2022-06-22
 * @function   :将一个字节的内容写入OLED屏幕
 * @parameters :dat:要编写的内容
                cmd:0-写入命令
								    1-写入数据
 * @retvalue   :无
********************************************************************/
void OLED_Write_Byte(unsigned dat,unsigned cmd)
{
	if(cmd)
	{
		OLED_DC_PIN_Set();
	}
	else
	{
		OLED_DC_PIN_Clr();
	}
	OLED_CS_PIN_Clr();
	SPI_WriteByte(dat);
	OLED_CS_PIN_Set();
}


/*******************************************************************
 * @name       :void OLED_Display_On(void)
 * @date       :2022-06-22
 * @function   :打开OLED显示
 * @parameters :无
 * @retvalue   :无
********************************************************************/ 	  
void OLED_Display_On(void)
{
	OLED_Write_Byte(0X8D,OLED_CMD);		//SET DCDC命令
	OLED_Write_Byte(0X14,OLED_CMD);		//DCDC ON
	OLED_Write_Byte(0XAF,OLED_CMD);		//DISPLAY ON
}


/*******************************************************************
 * @name       :void OLED_Display_Off(void)
 * @date       :2022-06-22
 * @function   :关闭OLED显示
 * @parameters :无
 * @retvalue   :无
********************************************************************/    
void OLED_Display_Off(void)
{
	OLED_Write_Byte(0X8D,OLED_CMD);		//SET DCDC命令
	OLED_Write_Byte(0X10,OLED_CMD);		//DCDC OFF
	OLED_Write_Byte(0XAE,OLED_CMD);		//DISPLAY OFF
}


/*******************************************************************
 * @name       :void OLED_Set_Pos(unsigned char x, unsigned char y)
 * @date       :2022-06-22
 * @function   :在OLED屏幕中设置坐标
 * @parameters :x:x坐标
                y:y坐标
 * @retvalue   :无
********************************************************************/
void OLED_Set_Pos(unsigned char x, unsigned char y)
{
 	OLED_Write_Byte(YLevel+y/PAGE_SIZE,OLED_CMD);
	OLED_Write_Byte((((x+2)&0xf0)>>4)|0x10,OLED_CMD);
	OLED_Write_Byte(((x+2)&0x0f),OLED_CMD);
}


/*******************************************************************
 * @name       :void OLED_Reset(void)
 * @date       :2022-06-22
 * @function   :重置OLED屏幕显示
 * @parameters :dat:0-显示全黑
                    1-显示全白
 * @retvalue   :无
********************************************************************/ 
void OLED_Reset(void)
{
	OLED_RST_PIN_Set();
	delay_ms(100);
	OLED_RST_PIN_Clr();
	delay_ms(100);
	OLED_RST_PIN_Set();
}


/*******************************************************************
 * @name       :void OLED_Set_Pixel(unsigned char x, unsigned char y,unsigned char color)
 * @date       :2022-06-22
 * @function   :将像素值设置为RAM
 * @parameters :x:像素的x坐标
                y:像素的y坐标
								color:像素点的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
********************************************************************/ 
void OLED_Set_Pixel(unsigned char x, unsigned char y,unsigned char color)
{
	if(color)
	{
		OLED_buffer[(y/PAGE_SIZE)*WIDTH+x]|= (1<<(y%PAGE_SIZE))&0xff;
	}
	else
	{
		OLED_buffer[(y/PAGE_SIZE)*WIDTH+x]&= ~((1<<(y%PAGE_SIZE))&0xff);
	}
}


/*******************************************************************
 * @name       :void OLED_Display(void)
 * @date       :2022-06-22
 * @function   :在OLED屏幕中显示
 * @parameters :无
 * @retvalue   :无
********************************************************************/  
void OLED_Display(void)
{
	u8 i,n;
	for(i=0;i<PAGE_SIZE;i++)  
	{  
		OLED_Write_Byte (YLevel+i,OLED_CMD);			//设置页地址(0~7)
		OLED_Write_Byte (XLevelL,OLED_CMD);				//设置显示位置—列低地址
		OLED_Write_Byte (XLevelH,OLED_CMD);				//设置显示位置—列高地址
		for(n=0;n<WIDTH;n++)
		{
			OLED_Write_Byte(OLED_buffer[i*WIDTH+n],OLED_DATA);
		}
	}		//更新显示
}


/*******************************************************************
 * @name       :void OLED_Clear(unsigned dat)
 * @date       :2022-06-22
 * @function   :清除OLED屏幕显示
 * @parameters :dat:0-显示全黑
                    1-显示全白
 * @retvalue   :无
********************************************************************/
void OLED_Clear(unsigned dat)
{
	unsigned int i=0;
	for(i=0;i<1024;i++)
	{
		OLED_buffer[i]=0;
	}
	OLED_Display();
	if(dat)
	{
		memset(OLED_buffer,0xff,sizeof(OLED_buffer));
	}
	else
	{
		memset(OLED_buffer,0,sizeof(OLED_buffer));
	}
	OLED_Display();
}


/*******************************************************************
 * @name       :void OLED_Init_GPIO(void)
 * @date       :2022-06-22
 * @function   :OLED引脚初始化
 * @parameters :无
 * @retvalue   :无
********************************************************************/ 
void OLED_Init_GPIO(void)
{
	GPIO_InitTypeDef  GPIO_InitStructure;
	
	RCC_APB2PeriphClockCmd(OLED_DC_CLK,ENABLE);					//使能端口时钟
	GPIO_InitStructure.GPIO_Pin = OLED_DC_PIN;
 	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;		//推挽输出
	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;		//速度50MHz
 	GPIO_Init(OLED_DC_PORT, &GPIO_InitStructure);
 	GPIO_SetBits(OLED_DC_PORT,OLED_DC_PIN);
	
	RCC_APB2PeriphClockCmd(OLED_CS_CLK,ENABLE);					//使能端口时钟
	GPIO_InitStructure.GPIO_Pin = OLED_CS_PIN;
 	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;		//推挽输出
	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;		//速度50MHz
 	GPIO_Init(OLED_DC_PORT, &GPIO_InitStructure);
 	GPIO_SetBits(OLED_CS_PORT,OLED_CS_PIN);
	
	RCC_APB2PeriphClockCmd(OLED_RST_CLK,ENABLE);				//使能端口时钟
	GPIO_InitStructure.GPIO_Pin = OLED_RST_PIN;
 	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;		//推挽输出
	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;		//速度50MHz
 	GPIO_Init(OLED_DC_PORT, &GPIO_InitStructure);
 	GPIO_SetBits(OLED_RST_PORT,OLED_RST_PIN);
	
	RCC_APB2PeriphClockCmd(SPI2_SCK_CLK,ENABLE);					//使能端口时钟
	GPIO_InitStructure.GPIO_Pin = SPI2_SCK_PIN;
 	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;		//推挽输出
	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;		//速度50MHz
 	GPIO_Init(SPI2_SCK_PORT, &GPIO_InitStructure);
 	GPIO_SetBits(SPI2_SCK_PORT,SPI2_SCK_PIN);
	
	RCC_APB2PeriphClockCmd(SPI2_MOSI_CLK,ENABLE);					//使能端口时钟
	GPIO_InitStructure.GPIO_Pin = SPI2_MOSI_PIN;
 	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;		//推挽输出
	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;		//速度50MHz
 	GPIO_Init(SPI2_MOSI_PORT, &GPIO_InitStructure);
 	GPIO_SetBits(SPI2_MOSI_PORT,SPI2_MOSI_PIN);
}


/*******************************************************************
 * @name       :void OLED_Init(void)
 * @date       :2022-06-22
 * @function   :初始化OLED SSD1306控制IC
 * @parameters :无
 * @retvalue   :无
********************************************************************/ 				    
void OLED_Init(void)
{
 	OLED_Init_GPIO();		//初始化GPIO
	
 	delay_ms(200);
	OLED_Reset();				//复位OLED
	
	/**************初始化SSD1306*****************/
	OLED_Write_Byte(0xAE,OLED_CMD);	/*display off*/
	OLED_Write_Byte(0x00,OLED_CMD);	/*set lower column address*/
	OLED_Write_Byte(0x10,OLED_CMD);	/*set higher column address*/
	OLED_Write_Byte(0x40,OLED_CMD);	/*set display start line*/
	OLED_Write_Byte(0xB0,OLED_CMD);	/*set page address*/
	OLED_Write_Byte(0x81,OLED_CMD);	/*contract control*/
	OLED_Write_Byte(0xFF,OLED_CMD);	/*128*/
	OLED_Write_Byte(0xA1,OLED_CMD);	/*set segment remap*/
	OLED_Write_Byte(0xA6,OLED_CMD);	/*normal / reverse*/
	OLED_Write_Byte(0xA8,OLED_CMD);	/*multiplex ratio*/
	OLED_Write_Byte(0x3F,OLED_CMD);	/*duty = 1/64*/
	OLED_Write_Byte(0xC8,OLED_CMD);	/*Com scan direction*/
	OLED_Write_Byte(0xD3,OLED_CMD);	/*set display offset*/
	OLED_Write_Byte(0x00,OLED_CMD);
	OLED_Write_Byte(0xD5,OLED_CMD);	/*set osc division*/
	OLED_Write_Byte(0x80,OLED_CMD);
	OLED_Write_Byte(0xD9,OLED_CMD);	/*set pre-charge period*/
	OLED_Write_Byte(0XF1,OLED_CMD);
	OLED_Write_Byte(0xDA,OLED_CMD);	/*set COM pins*/
	OLED_Write_Byte(0x12,OLED_CMD);
	OLED_Write_Byte(0xDB,OLED_CMD);	/*set vcomh*/
	OLED_Write_Byte(0x30,OLED_CMD);
	OLED_Write_Byte(0x8D,OLED_CMD);	/*set charge pump disable*/
	OLED_Write_Byte(0x14,OLED_CMD);
	OLED_Write_Byte(0xAF,OLED_CMD);	/*display ON*/
}


/*****************************************************************************
 * @name       :void SPI_WriteByte(u8 Data)
 * @date       :2022-06-22
 * @function   :使用STM32的软件SPI写入一个字节的数据
 * @parameters :Byte:要写入的数据
 * @retvalue   :
******************************************************************************/
void SPI_WriteByte(u8 Data)
{
	unsigned char i=0;
	for(i=8;i>0;i--)
	{
	  if(Data&0x80)	
		{
			SPI2_MOSI_PIN_SET(); //写数据1
    }
		else
		{
			SPI2_MOSI_PIN_CLR(); //写数据0
	  }
    SPI2_SCK_PIN_CLR();    //将时钟拉低拉高     
    SPI2_SCK_PIN_SET();    //发送1bit数据
    Data<<=1; 
	}
}


/*******************************************************************
 * @name       :void OLED_DrawPoint(u8 x,u8 y,u8 color)
 * @date       :2022-06-22
 * @function   :在OLED屏幕中绘制点
 * @parameters :x:点的x坐标
                y:点的y坐标
								color:点的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
********************************************************************/
void OLED_DrawPoint(u8 x,u8 y,u8 color)
{
	OLED_Set_Pixel(x,y,color);
	OLED_Display();
}


/*******************************************************************
 * @name       :void OLED_Fill(u8 sx,u8 sy,u8 ex,u8 ey,u8 color)
 * @date       :2022-06-22
 * @function   :填充指定区域
 * @parameters :sx:指定填充区域的起始x坐标
                sy:指定填充区域的起始y坐标
								ex:指定填充区域的结束x坐标
								ey:指定填充区域的结束y坐标
								color:指定区域的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
********************************************************************/
void OLED_Fill(u8 sx,u8 sy,u8 ex,u8 ey,u8 color)
{
	u8 i,j;
	u8 width=ex-sx+1;			//得到填充的宽度
	u8 height=ey-sy+1;		//高度
	for(i=0;i<height;i++)
	{
		for(j=0;j<width;j++)
		{
				OLED_Set_Pixel(sx+j, sy+i,color);
		}
	}
	OLED_Display();
}


/*******************************************************************
 * @name       :void OLED_DrawLine(u8 x1, u8 y1, u8 x2, u8 y2,u8 color)
 * @date       :2022-06-22
 * @function   :在两点之间画一条线
 * @parameters :x1:线的起始x点坐标
                y1:线的起始y点坐标
								x2:线的结束x点坐标
								y2:线的结束y点坐标
								color:线条的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
********************************************************************/
void OLED_DrawLine(u8 x1, u8 y1, u8 x2, u8 y2,u8 color)
{
	u16 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_y;}
	if( delta_x>delta_y)distance=delta_x; //选取基本增量坐标轴
	else distance=delta_y;
	for(t=0;t<=distance+1;t++ )//画线输出
	{
		OLED_Set_Pixel(uRow,uCol,color);
		xerr+=delta_x ;
		yerr+=delta_y ;
		if(xerr>distance)
		{
			xerr-=distance;
			uRow+=incx;
		}
		if(yerr>distance)
		{
			yerr-=distance;
			uCol+=incy;
		}
	}
	OLED_Display();
}


/*****************************************************************************
 * @name       :void OLED_DrawRectangle(u8 x1, u8 y1, u8 x2, u8 y2,u8 color)
 * @date       :2022-06-22
 * @function   :绘制矩形
 * @parameters :x1:矩形的起始x坐标
                y1:矩形的起始y坐标
								x2:矩形的结束x坐标
								y2:矩形的结束y坐标
								color:线条的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
******************************************************************************/
void OLED_DrawRectangle(u8 x1, u8 y1, u8 x2, u8 y2,u8 color)
{
	OLED_DrawLine(x1,y1,x2,y1,color);
	OLED_DrawLine(x1,y1,x1,y2,color);
	OLED_DrawLine(x1,y2,x2,y2,color);
	OLED_DrawLine(x2,y1,x2,y2,color);
}


/*****************************************************************************
 * @name       :void OLED_FillRectangle(u8 x1, u8 y1, u8 x2, u8 y2,u8 color)
 * @date       :2022-06-22
 * @function   :填充矩形
 * @parameters :x1:填充矩形的起始x坐标
                y1:填充矩形的起始y坐标
								x2:填充矩形的结束x坐标
								y2:填充矩形的结束y坐标
								color:矩形的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
******************************************************************************/  
void OLED_FillRectangle(u8 x1, u8 y1, u8 x2, u8 y2,u8 color)
{
	OLED_Fill(x1,y1,x2,y2,color);
}

 
/*****************************************************************************
 * @name       :static void _draw_circle_8(u8 xc, u8 yc, u8 x, u8 y, u8 color)
 * @date       :2022-06-22
 * @function   :对称圆绘制算法(内部调用)
 * @parameters :xc:圆心的x坐标
                yc:圆心的y坐标
								x:相对于圆心的x坐标
								y:相对于圆心的y坐标
								color:圆的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
******************************************************************************/
static void _draw_circle_8(u8 xc, u8 yc, u8 x, u8 y, u8 color)
{
	OLED_Set_Pixel(xc + x, yc + y, color);
	OLED_Set_Pixel(xc - x, yc + y, color);
	OLED_Set_Pixel(xc + x, yc - y, color);
	OLED_Set_Pixel(xc - x, yc - y, color);
	OLED_Set_Pixel(xc + y, yc + x, color);
	OLED_Set_Pixel(xc - y, yc + x, color);
	OLED_Set_Pixel(xc + y, yc - x, color);
	OLED_Set_Pixel(xc - y, yc - x, color);
}


/*****************************************************************************
 * @name       :void OLED_DrawCircle(u8 xc, u8 yc, u8 color, u8 r)
 * @date       :2022-06-22
 * @function   :在指定位置绘制指定大小的圆
 * @parameters :xc:圆心的x坐标
                yc:圆心的y坐标
								r:圆形半径
								color:圆的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
******************************************************************************/
void OLED_DrawCircle(u8 xc, u8 yc, u8 color, u8 r)
{
	int x = 0, y = r,d;
	d = 3 - 2 * r;
	while (x <= y)
	{
		_draw_circle_8(xc, yc, x, y, color);
		if (d < 0)
		{
				d = d + 4 * x + 6;
		}
		else
		{
				d = d + 4 * (x - y) + 10;
				y--;
		}
		x++;
	}
	OLED_Display();
}


/*****************************************************************************
 * @name       :void OLED_FillCircle(u8 xc, u8 yc, u8 color, u8 r)
 * @date       :2022-06-22
 * @function   :在指定位置填充指定大小的圆
 * @parameters :xc:圆心的x坐标
                yc:圆心的y坐标
								r:圆形半径
								color:圆的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
******************************************************************************/
void OLED_FillCircle(u8 xc, u8 yc, u8 color, u8 r)
{
	int x = 0, y = r, yi, d;
	d = 3 - 2 * r;
	while (x <= y)
	{
			for (yi = x; yi <= y; yi++)
			{
				_draw_circle_8(xc, yc, x, yi, color);
			}
			if (d < 0)
			{
				d = d + 4 * x + 6;
			}
			else
			{
				d = d + 4 * (x - y) + 10;
				y--;
			}
			x++;
	}
	OLED_Display();
}


/**********************************************************************************
 * @name       :void OLED_DrawTriangel(u8 x0,u8 y0,u8 x1,u8 y1,u8 x2,u8 y2,u8 color)
 * @date       :2022-06-22 
 * @function   :在指定位置绘制三角形
 * @parameters :x0:三角形的第一点x坐标
                y0:三角形的第一点y坐标
								x1:三角形的第二点x坐标
								y1:三角形的第二点y坐标
								x2:三角形的第三点x坐标
								y2:三角形的第三点y坐标
								color:三角形的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
***********************************************************************************/
void OLED_DrawTriangel(u8 x0,u8 y0,u8 x1,u8 y1,u8 x2,u8 y2,u8 color)
{
	OLED_DrawLine(x0,y0,x1,y1,color);
	OLED_DrawLine(x1,y1,x2,y2,color);
	OLED_DrawLine(x2,y2,x0,y0,color);
}



/*****************************************************************************
 * @name       :static void _swap(u8 *a, u8 *b)
 * @date       :2022-06-22
 * @function   :交换两个号码(内部通话)
 * @parameters :a:第一个号码的地址
								b:第二个号码的地址
 * @retvalue   :无
******************************************************************************/
static void _swap(u8 *a, u8 *b)
{
	u16 tmp;
  tmp = *a;
	*a = *b;
	*b = tmp;
}


/*****************************************************************************
 * @name       :static void _draw_h_line(u8 x0,u8 x1,u8 y,u8 color)
 * @date       :2022-06-22
 * @function   :在显示屏中画一条水平线(内部调用)
 * @parameters :x0:水平线的起始x坐标
                x1:水平线的结束x坐标
								y:水平线的y坐标
								color:线的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
******************************************************************************/
static void _draw_h_line(u8 x0,u8 x1,u8 y,u8 color)
{
	u8 i=0;
	for(i=x0;i<=x1;i++)
	{
		OLED_Set_Pixel(i, y, color);
	}
}


/*****************************************************************************
 * @name       :void OLED_FillTriangel(u8 x0,u8 y0,u8 x1,u8 y1,u8 x2,u8 y2,u8 color)
 * @date       :2022-06-22
 * @function   :在指定位置填充三角形
 * @parameters :x0:三角形的第一点x坐标
                y0:三角形的第一点y坐标
								x1:三角形的第二点x坐标
								y1:三角形的第二点y坐标
								x2:三角形的第三点x坐标
								y2:三角形的第三点y坐标
								color:三角形的颜色值
								      1-白色
											0-黑色
 * @retvalue   :无
******************************************************************************/
void OLED_FillTriangel(u8 x0,u8 y0,u8 x1,u8 y1,u8 x2,u8 y2,u8 color)
{
	u8 a, b, y, last;
	int dx01, dy01, dx02, dy02, dx12, dy12;
	long sa = 0;
	long sb = 0;
 	if (y0 > y1)
	{
    _swap(&y0,&y1);
		_swap(&x0,&x1);
 	}
 	if (y1 > y2)
	{
    _swap(&y2,&y1);
		_swap(&x2,&x1);
 	}
  if (y0 > y1)
	{
    _swap(&y0,&y1);
		_swap(&x0,&x1);
  }
	if(y0 == y2)
	{
		a = b = x0;
		if(x1 < a)
    {
			a = x1;
    }
    else if(x1 > b)
    {
			b = x1;
    }
    if(x2 < a)
    {
			a = x2;
    }
		else if(x2 > b)
    {
			b = x2;
    }
		_draw_h_line(a,b,y0,color);
    return;
	}
	dx01 = x1 - x0;
	dy01 = y1 - y0;
	dx02 = x2 - x0;
	dy02 = y2 - y0;
	dx12 = x2 - x1;
	dy12 = y2 - y1;
	
	if(y1 == y2)
	{
		last = y1;
	}
  else
	{
		last = y1-1;
	}
	for(y=y0; y<=last; y++)
	{
		a = x0 + sa / dy01;
		b = x0 + sb / dy02;
		sa += dx01;
    sb += dx02;
    if(a > b)
    {
			_swap(&a,&b);
		}
		_draw_h_line(a,b,y,color);
	}
	sa = dx12 * (y - y1);
	sb = dx02 * (y - y0);
	for(; y<=y2; y++)
	{
		a = x1 + sa / dy12;
		b = x0 + sb / dy02;
		sa += dx12;
		sb += dx02;
		if(a > b)
		{
			_swap(&a,&b);
		}
		_draw_h_line(a,b,y,color);
	}
	OLED_Display();
}


/*****************************************************************************
 * @name       :void OLED_ShowChar(u8 x,u8 y,u8 chr,u8 Char_Size,u8 mode)
 * @date       :2022-06-22
 * @function   :显示单个英文字符
 * @parameters :x:字符显示位置的起始x坐标
                y:字符显示位置的起始y坐标
								chr:显示字符的ascii码(0~94)
								Char_Size:显示字符的大小(8,16)
								mode:0-白底黑字
								     1-黑底白字
 * @retvalue   :无
******************************************************************************/
void OLED_ShowChar(u8 x,u8 y,u8 chr,u8 Char_Size,u8 mode)
{
	unsigned char c=0,i=0,tmp,j=0;
	c=chr-' ';											//得到偏移后的值
	if(x>WIDTH-1){x=0;y=y+2;}
	if(Char_Size ==16)
	{
		for(i=0;i<16;i++)
		{
			if(mode)
			{
				tmp = F8X16[c*16+i];
			}
			else
			{
				tmp = ~(F8X16[c*16+i]);
			}
			for(j=0;j<8;j++)
			{
				if(tmp&(0x80>>j))
				{
					OLED_Set_Pixel(x+j, y+i,1);
				}
				else
				{
					OLED_Set_Pixel(x+j, y+i,0);
				}
			}
		}
	}
	else if(Char_Size==8)
	{
		for(i=0;i<8;i++)
		{
			if(mode)
			{
				tmp = F6x8[c][i];
			}
			else
			{
				tmp = ~(F6x8[c][i]);
			}
			for(j=0;j<8;j++)
			{
				if(tmp&(0x80>>j))
				{
					OLED_Set_Pixel(x+j, y+i,1);
				}
				else
				{
					OLED_Set_Pixel(x+j, y+i,0);
				}
			}
		}
	}
	else
	{
		return;
	}
	OLED_Display();
}


/*****************************************************************************
 * @name       :void OLED_ShowString(u8 x,u8 y,u8 *chr,u8 Char_Size,u8 mode)
 * @date       :2022-06-22 
 * @function   :显示英文字符串
 * @parameters :x:英语字符串的起始x坐标
                y:英语字符串的起始y坐标
								chr:英文字符串的起始地址
								Char_Size:显示字符的大小
								mode:0-白底黑字
								     1-黑底白字
 * @retvalue   :无
******************************************************************************/
void OLED_ShowString(u8 x,u8 y,u8 *chr,u8 Char_Size,u8 mode)
{
	unsigned char j=0,csize;
	if(Char_Size == 16)
  {
	  csize = Char_Size/2;
	}
  else if(Char_Size == 8)
  {
	  csize = Char_Size/2+2;
	}
	else
	{
		return;
	}
	while (chr[j]!='\0')
	{
		OLED_ShowChar(x,y,chr[j],Char_Size,mode);
		x+=csize;
		if(x>120)
		{
			x=0;
			y+=Char_Size;
		}
		j++;
	}
}


/*****************************************************************************
 * @name       :u32 mypow(u8 m,u8 n)
 * @date       :2022-06-22 
 * @function   :获取m的n次方(内部调用)
 * @parameters :m:the multiplier
                n:the power
 * @retvalue   :m的n次方
******************************************************************************/
static u32 mypow(u8 m,u8 n)
{
	u32 result=1;
	while(n--)result*=m;
	return result;
}


/*****************************************************************************
 * @name       :void OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 Size,u8 mode)
 * @date       :2022-06-22 
 * @function   :显示数字
 * @parameters :x:数字的起始x坐标
                y:数字的起始y坐标
								num:数字(0~4294967295)
								len:显示数字的长度
								Size:显示数字的大小
								mode:0-白底黑字
								     1-黑底白字
 * @retvalue   :无
******************************************************************************/
void OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 Size,u8 mode)
{
	u8 t,temp;
	u8 enshow=0,csize;
  if(Size == 16)
  {
	  csize = Size/2;
	}
  else if(Size == 8)
  {
	  csize = Size/2+2;
	}
	else
	{
		return;
	}
	for(t=0;t<len;t++)
	{
		temp=(num/mypow(10,len-t-1))%10;
		if(enshow==0&&t<(len-1))
		{
			if(temp==0)
			{
				OLED_ShowChar(x+csize*t,y,' ',Size,mode);
				continue;
			}else enshow=1;
			
		}
	 	OLED_ShowChar(x+csize*t,y,temp+'0',Size,mode);
	}
}


/*****************************************************************************
 * @name       :void OLED_ShowFont16(u8 x,u8 y,u8 *s,u8 mode)
 * @date       :2022-06-22
 * @function   :显示单个16x16汉字
 * @parameters :x:汉字的起始x坐标
                y:汉字的起始y坐标
								s:汉字的起始地址
								mode:0-白底黑字
								     1-黑底白字
 * @retvalue   :无
******************************************************************************/ 
void OLED_ShowFont16(u8 x,u8 y,u8 *s,u8 mode)
{
	u8 i,j,k,tmp;
	u16 num;
	num = sizeof(cfont16)/sizeof(typFNT_GB16);
  for(i=0;i<num;i++)
	{
		if((cfont16[i].Index[0] == *s) && (cfont16[i].Index[1] == *(s+1)))
		{
			for(j=0;j<32;j++)
			{
				if(mode)
				{
					tmp = cfont16[i].Msk[j];
				}
				else
				{
					tmp = ~(cfont16[i].Msk[j]);
				}
				for(k=0;k<8;k++)
				{
					if(tmp&(0x80>>k))
					{
						OLED_Set_Pixel(x+(j%2)*8+k, y+j/2,1);
					}
					else
					{
						OLED_Set_Pixel(x+(j%2)*8+k, y+j/2,0);
					}
				}
			}	
			break;
		}	
	}
	OLED_Display();
}

/*****************************************************************************
 * @name       :void OLED_ShowFont24(u8 x,u8 y,u8 *s,u8 mode)
 * @date       :2022-06-22
 * @function   :显示单个24x24汉字
 * @parameters :x:汉字的起始x坐标
                y:汉字的起始y坐标
								s:汉字的起始地址
								mode:0-白底黑字
								     1-黑底白字
 * @retvalue   :无
******************************************************************************/ 
void OLED_ShowFont24(u8 x,u8 y,u8 *s,u8 mode)
{
	u8 i,j,k,tmp;
	u16 num;
	num = sizeof(cfont24)/sizeof(typFNT_GB24);
  for(i=0;i<num;i++)
	{
		if((cfont24[i].Index[0] == *s) && (cfont24[i].Index[1] == *(s+1)))
		{
			for(j=0;j<72;j++)
			{
				if(mode)
				{
					tmp = cfont24[i].Msk[j];
				}
				else
				{
					tmp = ~(cfont24[i].Msk[j]);
				}
				for(k=0;k<8;k++)
				{
					if(tmp&(0x80>>k))
					{
						OLED_Set_Pixel(x+(j%3)*8+k, y+j/3,1);
					}
					else
					{
						OLED_Set_Pixel(x+(j%3)*8+k, y+j/3,0);
					}
				}
			}	
			break;
		}	
	}
	OLED_Display();
}

/*****************************************************************************
 * @name       :void OLED_ShowFont32(u8 x,u8 y,u8 *s,u8 mode)
 * @date       :2022-06-22
 * @function   :显示单个32x32汉字
 * @parameters :x:汉字的起始x坐标
                y:汉字的起始y坐标
								s:汉字的起始地址
								mode:0-白底黑字
								     1-黑底白字
 * @retvalue   :无
******************************************************************************/
void OLED_ShowFont32(u8 x,u8 y,u8 *s,u8 mode)
{
	u8 i,j,k,tmp;
	u16 num;
	num = sizeof(cfont32)/sizeof(typFNT_GB32);
  for(i=0;i<num;i++)
	{
		if((cfont32[i].Index[0] == *s) && (cfont32[i].Index[1] == *(s+1)))
		{
			for(j=0;j<128;j++)
			{
				if(mode)
				{
					tmp = cfont32[i].Msk[j];
				}
				else
				{
					tmp = ~(cfont32[i].Msk[j]);
				}
				for(k=0;k<8;k++)
				{
					if(tmp&(0x80>>k))
					{
						OLED_Set_Pixel(x+(j%4)*8+k, y+j/4,1);
					}
					else
					{
						OLED_Set_Pixel(x+(j%4)*8+k, y+j/4,0);
					}
				}
			}
			break;
		}
	}
	OLED_Display();
}


/*****************************************************************************
 * @name       :void OLED_ShowCHinese(u8 x,u8 y,u8 hsize,u8 *str,u8 mode)
 * @date       :2022-06-22 
 * @function   :显示中文字符串
 * @parameters :x:汉语字符串的起始x坐标
                y:汉语字符串的起始y坐标
								size:中文字符串的大小
								str:中文字符串的起始地址
								mode:0-白底黑字
								     1-黑底白字
 * @retvalue   :无
******************************************************************************/
void OLED_ShowCHinese(u8 x,u8 y,u8 hsize,u8 *str,u8 mode)
{
	while(*str!='\0')
	{
		if(hsize == 16)
		{
			OLED_ShowFont16(x,y,str,mode);
		}
		else if(hsize == 24)
		{
			OLED_ShowFont24(x,y,str,mode);
		}
		else if(hsize == 32)
		{
			OLED_ShowFont32(x,y,str,mode);
		}
		else
		{
			return;
		}
		x+=hsize;
		if(x>WIDTH-hsize)
		{
			x=0;
			y+=hsize;
		}
		str+=2;
	}
}


/*****************************************************************************
 * @name       :void OLED_DrawBMP(u8 x,u8 y,u8 width, u8 height, u8 BMP[], u8 mode)
 * @date       :2022-06-22
 * @function   :显示BMP单色图片
 * @parameters :x:BMP单色图片的起始x坐标
                y:BMP单色图片的起始y坐标
								width:BMP单色图片的宽度
								height:BMP单色图片的高度
								BMP:BMP单色图像阵列的起始地址
								mode:0-白底黑字
								     1-黑底白字
 * @retvalue   :无
******************************************************************************/
void OLED_DrawBMP(u8 x,u8 y,u8 width, u8 height, u8 BMP[], u8 mode)
{
 u8 i,j,k;
 u8 tmp;
 for(i=0;i<height;i++)
 {
		for(j=0;j<(width+7)/8;j++)
		{
			if(mode)
			{
				tmp = BMP[i*((width+7)/8)+j];
			}
			else
			{
				tmp = ~BMP[i*((width+7)/8)+j];
			}
			for(k=0;k<8;k++)
			{
				if(tmp&(0x80>>k))
				{
					OLED_Set_Pixel(x+j*8+k, y+i,1);
				}
				else
				{
					OLED_Set_Pixel(x+j*8+k, y+i,0);
				}
			}
		}
	}
	OLED_Display();
}


/*****************************************************************************
 * @name       :void OLED_Test_MainPage(void)
 * @date       :2022-06-22
 * @function   :绘制综合测试程序主界面
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_MainPage(void)
{
	OLED_ShowString(28,0,"stars",16,1);					//显示英文字符串
	OLED_ShowCHinese(28,20,16,"小星星",1);			//显示中文汉字
	//OLED_ShowString(40,32,"64X128",16,1);
	OLED_ShowString(4,48,"631907030123",16,1);	//显示数字
	//OLED_ShowString(4,48,"www.lcdwiki.com",16,1);
	delay_ms(1500);
	delay_ms(1500);
}


/*****************************************************************************
 * @name       :void OLED_Test_Color(void)
 * @date       :2022-06-22
 * @function   :颜色填充测试(白色、黑色)
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_Color(void)
{
	 OLED_Fill(0,0,WIDTH-1,HEIGHT-1,0);
	 OLED_ShowString(10,10,"BLACK",16,1);
	 delay_ms(1000);
	 OLED_Fill(0,0,WIDTH-1,HEIGHT-1,1);
	 delay_ms(1500);
}


/*****************************************************************************
 * @name       :void OLED_Test_Rectangular(void))
 * @date       :2022-06-22
 * @function   :矩形显示和填充测试
								依次显示黑白矩形框,1000毫秒后,依次用黑色和白色填充矩形
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_Rectangular(void)
{
	OLED_Fill(0,0,WIDTH/2-1,HEIGHT-1,0);
	OLED_Fill(WIDTH/2,0,WIDTH-1,HEIGHT-1,1);
	OLED_DrawRectangle(5, 5, WIDTH/2-1-5, HEIGHT-1-5,1);
	OLED_DrawRectangle(WIDTH/2-1+5, 5, WIDTH-1-5, HEIGHT-1-5,0);
	delay_ms(1000);
	OLED_FillRectangle(5, 5, WIDTH/2-1-5, HEIGHT-1-5,1);
	OLED_FillRectangle(WIDTH/2-1+5, 5, WIDTH-1-5, HEIGHT-1-5,0);
	delay_ms(1500);
}


/*****************************************************************************
 * @name       :void OLED_Test_Circle(void)
 * @date       :2022-06-22
 * @function   :循环显示和填充测试依次显示黑白圆形框,1000毫秒后,依次用黑色、白色填充圆形
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_Circle(void)
{
	OLED_Fill(0,0,WIDTH/2-1,HEIGHT-1,0);
	OLED_Fill(WIDTH/2,0,WIDTH-1,HEIGHT-1,1);
	OLED_DrawCircle(WIDTH/2/2-1, HEIGHT/2-1, 1, 27);
	OLED_DrawCircle(WIDTH/2+WIDTH/2/2-1, HEIGHT/2-1, 0, 27);
	delay_ms(1000);
	OLED_FillCircle(WIDTH/2/2-1, HEIGHT/2-1, 1, 27);
	OLED_FillCircle(WIDTH/2+WIDTH/2/2-1, HEIGHT/2-1, 0, 27);
	delay_ms(1500);
}


/*****************************************************************************
 * @name       :void OLED_Test_Triangle(void)
 * @date       :2022-06-22
 * @function   :三角形显示和填充测试依次显示黑白三角形框,1000毫秒后,依次用黑色和白色填充三角形
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_Triangle(void)
{
	OLED_Fill(0,0,WIDTH/2-1,HEIGHT-1,0);
	OLED_Fill(WIDTH/2,0,WIDTH-1,HEIGHT-1,1);
	OLED_DrawTriangel(5,HEIGHT-1-5,WIDTH/2/2-1,5,WIDTH/2-1-5,HEIGHT-1-5,1);
	OLED_DrawTriangel(WIDTH/2-1+5,HEIGHT-1-5,WIDTH/2+WIDTH/2/2-1,5,WIDTH-1-5,HEIGHT-1-5,0);
	delay_ms(1000);
	OLED_FillTriangel(5,HEIGHT-1-5,WIDTH/2/2-1,5,WIDTH/2-1-5,HEIGHT-1-5,1);
	OLED_FillTriangel(WIDTH/2-1+5,HEIGHT-1-5,WIDTH/2+WIDTH/2/2-1,5,WIDTH-1-5,HEIGHT-1-5,0);
	delay_ms(1500);
}


/*****************************************************************************
 * @name       :void OLED_TEST_English(void)
 * @date       :2022-06-22
 * @function   :英文显示测试
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_TEST_English(void)
{
	OLED_ShowString(0,5,"6x8:abcdefghijklmnopqrstuvwxyz",8,1);
	OLED_ShowString(0,25,"8x16:abcdefghijklmnopqrstuvwxyz",16,1);
	delay_ms(1000);
	OLED_ShowString(0,5,"6x8:ABCDEFGHIJKLMNOPQRSTUVWXYZ",8,1);
	OLED_ShowString(0,25,"8x16:ABCDEFGHIJKLMNOPQRSTUVWXYZ",16,1);
	delay_ms(1500);
}


/*****************************************************************************
 * @name       :void OLED_TEST_Number_Character(void) 
 * @date       :2022-06-22
 * @function   :数字和字符显示测试
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_TEST_Number_Character(void)
{
	OLED_Fill(0,0,WIDTH-1,HEIGHT/2-1,0);
	OLED_ShowString(0,0,"6x8:!\"#$%&'()*+,-./:;<=>?@[]\\^_`~{}|",8,1);
	OLED_ShowNum(30,16,1234567890,10,8,1);
	delay_ms(1000);
	OLED_Clear(0);
  OLED_ShowString(0,0,"8x16:!\"#$%&'()*+,-./:;<=>?@[]\\^_`~{}|",16,1);
	OLED_ShowNum(40,32,1234567890,10,16,1);
	delay_ms(1500);
	OLED_Clear(0);
}


/*****************************************************************************
 * @name       :void OLED_Test_Chinese(void)
 * @date       :2022-06-22
 * @function   :中文显示测试
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_Chinese(void)
{
	OLED_ShowString(45,0,"16x16",8,1);
	OLED_ShowCHinese(16,20,16,"全动电子技术",1);
	delay_ms(1000);
	OLED_Clear(0);
	OLED_ShowString(45,0,"24x24",8,1);
	OLED_ShowCHinese(16,20,24,"全动电子",1);
	delay_ms(1000);
	OLED_Clear(0);
	OLED_ShowString(45,0,"32x32",8,1);
	OLED_ShowCHinese(0,20,32,"全动电子",1);
  delay_ms(1000);
	OLED_Clear(0);
}


/*****************************************************************************
 * @name       :void OLED_Test_BMP(void)
 * @date       :2022-06-22
 * @function   :BMP单色图片显示测试
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_BMP(void)
{
	OLED_DrawBMP(0,0,128,64, BMP2, 1);
	delay_ms(1000);
	OLED_DrawBMP(0,0,128,64, BMP3, 1);
	delay_ms(1000);
	OLED_DrawBMP(0,0,128,64, BMP4, 1);
	delay_ms(1000);
}


/*****************************************************************************
 * @name       :void OLED_Test_Menu1(void)
 * @date       :2022-06-22
 * @function   :中文选择菜单显示测试
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_Menu1(void)
{
	OLED_Fill(0,0,WIDTH-1,15,1);
	OLED_ShowCHinese(32,0,16,"系统设置",0);
	OLED_DrawCircle(10, 24, 1,6);
	OLED_DrawCircle(10, 24, 1,3);
	OLED_DrawCircle(10, 40, 1,6);
	OLED_DrawCircle(10, 40, 1,3);
	OLED_DrawCircle(10, 56, 1,6);
	OLED_DrawCircle(10, 56, 1,3);
	OLED_ShowString(20,16,"A.",16,1);
	OLED_ShowCHinese(36,16,16,"音量设置",1);
	OLED_ShowString(20,32,"B.",16,1);
	OLED_ShowCHinese(36,32,16,"颜色设置",1);
	OLED_ShowString(20,48,"C.",16,1);
	OLED_ShowCHinese(36,48,16,"网络设置",1);
	OLED_DrawRectangle(0, 0,WIDTH-1,HEIGHT-1,1);
	OLED_DrawLine(WIDTH-1-10, 15, WIDTH-1-10, HEIGHT-1,1);
	OLED_FillTriangel(WIDTH-1-9,20,WIDTH-1-5,16,WIDTH-1-1,20,1);
	OLED_FillTriangel(WIDTH-1-9,HEIGHT-1-5,WIDTH-1-5,HEIGHT-1-1,WIDTH-1-1,HEIGHT-1-5,1);
	OLED_FillCircle(10, 24, 1,3);
	OLED_Fill(20,16,99,31,1);
	OLED_ShowString(20,16,"A.",16,0);
	OLED_ShowCHinese(36,16,16,"音量设置",0);
	OLED_Fill(WIDTH-1-9,23,WIDTH-1-1,28,1);
	delay_ms(1500);
	OLED_FillCircle(10, 24, 0,3);
	OLED_DrawCircle(10, 24, 1,3);
	OLED_Fill(20,16,99,31,0);
	OLED_ShowString(20,16,"A.",16,1);
	OLED_ShowCHinese(36,16,16,"音量设置",1);
	OLED_Fill(WIDTH-1-9,23,WIDTH-1-1,28,0);
	OLED_FillCircle(10, 40, 1,3);
	OLED_Fill(20,32,99,47,1);
	OLED_ShowString(20,32,"B.",16,0);
	OLED_ShowCHinese(36,32,16,"颜色设置",0);
	OLED_Fill(WIDTH-1-9,37,WIDTH-1-1,42,1);
	delay_ms(1500);
	OLED_FillCircle(10, 40, 0,3);
	OLED_DrawCircle(10, 40, 1,3);
	OLED_Fill(20,32,99,47,0);
	OLED_ShowString(20,32,"B.",16,1);
	OLED_ShowCHinese(36,32,16,"颜色设置",1);
	OLED_Fill(WIDTH-1-9,37,WIDTH-1-1,42,0);
	OLED_FillCircle(10, 56, 1,3);
	OLED_Fill(20,48,99,63,1);
	OLED_ShowString(20,48,"C.",16,0);
	OLED_ShowCHinese(36,48,16,"网络设置",0);
	OLED_Fill(WIDTH-1-9,HEIGHT-1-13,WIDTH-1-1,HEIGHT-1-8,1);
	delay_ms(1500);
}


/*****************************************************************************
 * @name       :void OLED_Test_Menu2(void)
 * @date       :2022-06-22
 * @function   :英文天气界面显示测试
 * @parameters :无
 * @retvalue   :无
******************************************************************************/
void OLED_Test_Menu2(void)
{
	u8 i;
	srand(123456);
	OLED_DrawLine(0, 10, WIDTH-1, 10,1);
	OLED_DrawLine(WIDTH/2-1,11,WIDTH/2-1,HEIGHT-1,1);
	OLED_DrawLine(WIDTH/2-1,10+(HEIGHT-10)/2-1,WIDTH-1,10+(HEIGHT-10)/2-1,1);
	OLED_ShowString(0,1,"2019-08-17",8,1);
	OLED_ShowString(78,1,"Saturday",8,1);
	OLED_ShowString(14,HEIGHT-1-10,"Cloudy",8,1);
	OLED_ShowString(WIDTH/2-1+2,13,"TEMP",8,1);
	OLED_DrawCircle(WIDTH-1-19, 25, 1,2);
	OLED_ShowString(WIDTH-1-14,20,"C",16,1);
	OLED_ShowString(WIDTH/2-1+9,20,"32.5",16,1);
	OLED_ShowString(WIDTH/2-1+2,39,"PM2.5",8,1);
	OLED_ShowString(WIDTH/2-1+5,46,"90ug/m3",16,1);
	OLED_DrawBMP(6,16,51,32, BMP5, 1);
	for(i=0;i<15;i++)
	{
		OLED_ShowNum(WIDTH/2-1+9,20,rand()%4,1,16,1);
		OLED_ShowNum(WIDTH/2-1+9+8,20,rand()%10,1,16,1);
		OLED_ShowNum(WIDTH/2-1+9+8+16,20,rand()%10,1,16,1);
		OLED_ShowNum(WIDTH/2-1+5,46,rand()%10,1,16,1);
		OLED_ShowNum(WIDTH/2-1+5+8,46,rand()%10,1,16,1);
    delay_ms(500);
	}
}



oled.h



/****************************************************************************************************
//=========================================电源接线================================================//
// OLED模块               STM32单片机
//   VCC         接       DC 5V/3.3V      //OLED屏电源正
//   GND         接          GND          //OLED屏电源地
//=======================================液晶屏数据线接线==========================================//
//本模块默认数据总线类型为4线制SPI
// OLED模块               STM32单片机
//   D1          接          PB15        //OLED屏SPI写信号
//=======================================液晶屏控制线接线==========================================//
// OLED模块               STM32单片机
//   CS          接          PB11        //OLED屏片选控制信号
//   RES         接          PB12        //OLED屏复位控制信号
//   DC          接          PB10        //OLED屏数据/命令选择控制信号
//   D0          接          PB13        //OLED屏SPI时钟信号
//=========================================触摸屏接线=========================================//
//本模块不带触摸功能,所以不需要触摸屏接线
****************************************************************************************************/	


#ifndef __OLED_H
#define __OLED_H		


#include "sys.h"
#include "stdlib.h"
#include "string.h" 	 
#include "delay.h"


//--------------OLED参数定义---------------------
#define PAGE_SIZE			8
#define XLevelL				0x00
#define XLevelH				0x10
#define YLevel				0xB0
#define	Brightness		0xFF 
#define WIDTH					128
#define HEIGHT				64	


//-------------写命令和数据定义-------------------
#define OLED_CMD			0		//写命令
#define OLED_DATA			1		//写数据 


//-----------------OLED端口定义----------------

#define OLED_RST_PIN		GPIO_Pin_8							//复位信号
#define OLED_RST_PORT		GPIOA										//复位信号
#define OLED_RST_CLK		RCC_APB2Periph_GPIOA		//复位信号

#define OLED_DC_PIN			GPIO_Pin_11							//数据/命令控制信号
#define OLED_DC_PORT		GPIOA										//数据/命令控制信号
#define OLED_DC_CLK			RCC_APB2Periph_GPIOA		//数据/命令控制信号

#define OLED_CS_PIN			GPIO_Pin_12							//片选信号
#define OLED_CS_PORT		GPIOA										//片选信号
#define OLED_CS_CLK			RCC_APB2Periph_GPIOA		//片选信号

#define SPI2_SCK_PIN		GPIO_Pin_13							//时钟信号
#define SPI2_SCK_PORT		GPIOB										//时钟信号
#define SPI2_SCK_CLK		RCC_APB2Periph_GPIOB		//时钟信号

#define SPI2_MOSI_PIN		GPIO_Pin_15							//数据发送信号
#define SPI2_MOSI_PORT	GPIOB										//数据发送信号
#define SPI2_MOSI_CLK		RCC_APB2Periph_GPIOB		//数据发送信号

//-----------------OLED端口操作定义----------------
 					   
#define OLED_RST_PIN_Clr()	GPIO_ResetBits(OLED_RST_PORT,OLED_RST_PIN)
#define OLED_RST_PIN_Set()	GPIO_SetBits	(OLED_RST_PORT,OLED_RST_PIN)

#define OLED_DC_PIN_Clr()		GPIO_ResetBits(OLED_DC_PORT,OLED_DC_PIN)
#define OLED_DC_PIN_Set()		GPIO_SetBits	(OLED_DC_PORT,OLED_DC_PIN)

#define OLED_CS_PIN_Clr()		GPIO_ResetBits(OLED_CS_PORT,OLED_CS_PIN)
#define OLED_CS_PIN_Set()		GPIO_SetBits	(OLED_CS_PORT,OLED_CS_PIN)

#define	SPI2_SCK_PIN_SET()  	GPIO_SetBits	(SPI2_SCK_PORT,SPI2_SCK_PIN)
#define	SPI2_SCK_PIN_CLR()  	GPIO_ResetBits(SPI2_SCK_PORT,SPI2_SCK_PIN)

#define	SPI2_MOSI_PIN_SET()  	GPIO_SetBits	(SPI2_MOSI_PORT,SPI2_MOSI_PIN)
#define	SPI2_MOSI_PIN_CLR()  	GPIO_ResetBits(SPI2_MOSI_PORT,SPI2_MOSI_PIN)


void OLED_Write_Byte(unsigned dat,unsigned cmd);														//将一个字节的内容写入OLED屏幕
void OLED_Display_On(void);																									//打开OLED显示
void OLED_Display_Off(void);																								//关闭OLED显示
void OLED_Set_Pos(unsigned char x, unsigned char y);												//在OLED屏幕中设置坐标
void OLED_Reset(void);																											//重置OLED屏幕显示
void OLED_Set_Pixel(unsigned char x, unsigned char y,unsigned char color);	//将像素值设置为RAM
void OLED_Display(void);																										//在OLED屏幕中显示
void OLED_Clear(unsigned dat);																							//清除OLED屏幕显示
void OLED_Init_GPIO(void);																									//OLED引脚初始化
void OLED_Init(void);																												//初始化OLED SSD1306控制IC

void SPI_WriteByte(u8 Data);																								//SPI写入一个字节

void OLED_DrawPoint(u8 x, u8 y, u8 color);																	//在OLED屏幕中绘制点
void OLED_Fill(u8 sx,u8 sy,u8 ex,u8 ey,u8 color);														//填充指定区域
void OLED_DrawLine(u8 x1, u8 y1, u8 x2, u8 y2,u8 color);										//在两点之间画一条线
void OLED_DrawRectangle(u8 x1, u8 y1, u8 x2, u8 y2,u8 color);								//绘制矩形
void OLED_FillRectangle(u8 x1, u8 y1, u8 x2, u8 y2,u8 color);								//填充矩形
void OLED_DrawCircle(u8 xc, u8 yc, u8 color, u8 r);													//在指定位置绘制指定大小的圆
void OLED_FillCircle(u8 xc, u8 yc, u8 color, u8 r);													//在指定位置填充指定大小的圆
void OLED_DrawTriangel(u8 x0,u8 y0,u8 x1,u8 y1,u8 x2,u8 y2,u8 color);				//在指定位置绘制三角形
void OLED_FillTriangel(u8 x0,u8 y0,u8 x1,u8 y1,u8 x2,u8 y2,u8 color);				//在指定位置填充三角形
void OLED_ShowChar(u8 x,u8 y,u8 chr,u8 Char_Size,u8 mode);									//显示单个英文字符
void OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 Size,u8 mode);								//显示英文字符串
void OLED_ShowString(u8 x,u8 y,u8 *chr,u8 Char_Size,u8 mode);								//显示数字
void OLED_ShowFont16(u8 x,u8 y,u8 *s,u8 mode);															//显示单个16x16汉字
void OLED_ShowFont24(u8 x,u8 y,u8 *s,u8 mode);															//显示单个24x24汉字
void OLED_ShowFont32(u8 x,u8 y,u8 *s,u8 mode);															//显示单个32x32汉字
void OLED_ShowCHinese(u8 x,u8 y,u8 hsize,u8 *str,u8 mode);									//显示中文字符串
void OLED_DrawBMP(u8 x,u8 y,u8 width, u8 height, u8 BMP[], u8 mode);				//显示BMP单色图片

void OLED_Test_MainPage(void);																							//绘制综合测试程序主界面
void OLED_Test_Color(void);																									//颜色填充测试(白色、黑色)
void OLED_Test_Rectangular(void);																						//矩形显示和填充测试
void OLED_Test_Circle(void);																								//循环显示和填充测试依次显示黑白圆形框,1000毫秒后,依次用黑色、白色填充圆形
void OLED_Test_Triangle(void);																							//三角形显示和填充测试依次显示黑白三角形框,1000毫秒后,依次用黑色和白色填充三角形
void OLED_TEST_English(void);																								//英文显示测试
void OLED_TEST_Number_Character(void);																			//数字和字符显示测试
void OLED_Test_Chinese(void);																								//中文显示测试
void OLED_Test_BMP(void);																										//BMP单色图片显示测试
void OLED_Test_Menu1(void);																									//中文选择菜单显示测试
void OLED_Test_Menu2(void);																									//英文天气界面显示测试


#endif


程序当中使用SPI的地方只有一条函数

/*****************************************************************************
 * @name       :void SPI_WriteByte(u8 Data)
 * @date       :2022-06-22
 * @function   :使用STM32的软件SPI写入一个字节的数据
 * @parameters :Byte:要写入的数据
 * @retvalue   :
******************************************************************************/
void SPI_WriteByte(u8 Data)
{
	unsigned char i=0;
	for(i=8;i>0;i--)
	{
	  if(Data&0x80)	
		{
			SPI2_MOSI_PIN_SET(); //写数据1
    }
		else
		{
			SPI2_MOSI_PIN_CLR(); //写数据0
	  }
    SPI2_SCK_PIN_CLR();    //将时钟拉低拉高     
    SPI2_SCK_PIN_SET();    //发送1bit数据
    Data<<=1; 
	}
}

oledfont.h



#ifndef __OLEDFONT_H
#define __OLEDFONT_H


//常用ASCII表
//偏移量32
//ASCII字符集
//偏移量32
//大小:6*8
//逐行式,顺向(高位在前)
/************************************6*8的点阵************************************/
const unsigned char F6x8[][8] =
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // sp
	0x10,0x10,0x10,0x10,0x00,0x10,0x00,0x00, // !
	0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00, // "
	0x28,0x28,0x7C,0x28,0x7C,0x28,0x28,0x00, // #
	0x10,0x3C,0x50,0x38,0x14,0x78,0x10,0x00, // $
	0x00,0x4C,0x2C,0x10,0x08,0x60,0x60,0x00, // %
	0x30,0x48,0x50,0x20,0x54,0x48,0x34,0x00, // &
	0x30,0x10,0x20,0x00,0x00,0x00,0x00,0x00, // '
	0x08,0x10,0x20,0x20,0x20,0x10,0x08,0x00, // (
	0x20,0x10,0x08,0x08,0x08,0x10,0x20,0x00, // )
	0x00,0x10,0x54,0x38,0x54,0x10,0x00,0x00, // *
	0x00,0x10,0x10,0x7C,0x10,0x10,0x00,0x00, // +
	0x00,0x00,0x00,0x00,0x00,0x18,0x08,0x10, // ,
	0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00, // -
	0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00, // .
	0x00,0x04,0x08,0x10,0x20,0x40,0x00,0x00, // /
	0x38,0x44,0x4C,0x54,0x64,0x44,0x38,0x00, // 0
	0x10,0x30,0x10,0x10,0x10,0x10,0x38,0x00, // 1
	0x38,0x44,0x04,0x08,0x10,0x20,0x7C,0x00, // 2
	0x7C,0x08,0x10,0x08,0x04,0x44,0x38,0x00, // 3 
	0x08,0x18,0x28,0x48,0x7C,0x08,0x08,0x00, // 4
	0x7C,0x40,0x78,0x04,0x04,0x44,0x38,0x00, // 5
	0x18,0x20,0x40,0x78,0x44,0x44,0x38,0x00, // 6
	0x7C,0x04,0x08,0x10,0x20,0x20,0x20,0x00, // 7
	0x38,0x44,0x44,0x38,0x44,0x44,0x38,0x00, // 8
	0x38,0x44,0x44,0x3C,0x04,0x08,0x30,0x00, // 9
	0x00,0x30,0x30,0x00,0x30,0x30,0x00,0x00, // :
	0x00,0x30,0x30,0x00,0x30,0x10,0x20,0x00, // ;
	0x08,0x10,0x20,0x40,0x20,0x10,0x08,0x00, // <
	0x00,0x00,0x7C,0x00,0x7C,0x00,0x00,0x00, // =
	0x20,0x10,0x08,0x04,0x08,0x10,0x20,0x00, // >
	0x38,0x44,0x04,0x08,0x10,0x00,0x10,0x00, // ?
	0x38,0x44,0x04,0x34,0x5C,0x44,0x38,0x00, // @
	0x10,0x28,0x44,0x44,0x7C,0x44,0x44,0x00, // A
	0x78,0x44,0x44,0x78,0x44,0x44,0x78,0x00, // B
	0x38,0x44,0x40,0x40,0x40,0x44,0x38,0x00, // C
	0x70,0x48,0x44,0x44,0x44,0x48,0x70,0x00, // D
	0x7C,0x40,0x40,0x78,0x40,0x40,0x7C,0x00, // E
	0x7C,0x40,0x40,0x78,0x40,0x40,0x40,0x00, // F
	0x38,0x44,0x40,0x5C,0x44,0x44,0x3C,0x00, // G
	0x44,0x44,0x44,0x7C,0x44,0x44,0x44,0x00, // H
	0x38,0x10,0x10,0x10,0x10,0x10,0x38,0x00, // I
	0x1C,0x08,0x08,0x08,0x08,0x48,0x30,0x00, // J
	0x44,0x48,0x50,0x60,0x50,0x48,0x44,0x00, // K
	0x40,0x40,0x40,0x40,0x40,0x40,0x7C,0x00, // L
	0x44,0x6C,0x54,0x54,0x44,0x44,0x44,0x00, // M
	0x44,0x44,0x64,0x54,0x4C,0x44,0x44,0x00, // N
	0x38,0x44,0x44,0x44,0x44,0x44,0x38,0x00, // O
	0x78,0x44,0x44,0x78,0x40,0x40,0x40,0x00, // P
	0x38,0x44,0x44,0x44,0x54,0x48,0x34,0x00, // Q
	0x78,0x44,0x44,0x78,0x50,0x48,0x44,0x00, // R
	0x3C,0x40,0x40,0x38,0x04,0x04,0x78,0x00, // S
	0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x00, // T
	0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00, // U
	0x44,0x44,0x44,0x44,0x44,0x28,0x10,0x00, // V
	0x44,0x44,0x44,0x54,0x54,0x54,0x28,0x00, // W
	0x44,0x44,0x28,0x10,0x28,0x44,0x44,0x00, // X
	0x44,0x44,0x44,0x28,0x10,0x10,0x10,0x00, // Y
	0x7C,0x04,0x08,0x10,0x20,0x40,0x7C,0x00, // Z
	0x38,0x20,0x20,0x20,0x20,0x20,0x38,0x00, // [
	0x00,0x40,0x20,0x10,0x08,0x04,0x00,0x00, // '\'
	0x38,0x08,0x08,0x08,0x08,0x08,0x38,0x00, // ]
	0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x00, // ^
	0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x00, // _
	0x20,0x10,0x08,0x00,0x00,0x00,0x00,0x00, // '
	0x00,0x00,0x38,0x04,0x3C,0x44,0x3C,0x00, // a
	0x40,0x40,0x58,0x64,0x44,0x44,0x78,0x00, // b
	0x00,0x00,0x38,0x40,0x40,0x44,0x38,0x00, // c
	0x04,0x04,0x34,0x4C,0x44,0x44,0x3C,0x00, // d
	0x00,0x00,0x38,0x44,0x7C,0x40,0x38,0x00, // e
	0x38,0x24,0x20,0x70,0x20,0x20,0x20,0x00, // f
	0x00,0x00,0x3C,0x44,0x44,0x3C,0x04,0x38, // g
	0x40,0x40,0x58,0x64,0x44,0x44,0x44,0x00, // h
	0x10,0x00,0x30,0x10,0x10,0x10,0x38,0x00, // i
	0x08,0x00,0x18,0x08,0x08,0x08,0x48,0x30, // j
	0x40,0x40,0x48,0x50,0x60,0x50,0x48,0x00, // k
	0x30,0x10,0x10,0x10,0x10,0x10,0x38,0x00, // l
	0x00,0x00,0x68,0x54,0x54,0x44,0x44,0x00, // m
	0x00,0x00,0x58,0x64,0x44,0x44,0x44,0x00, // n
	0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00, // o
	0x00,0x00,0x58,0x64,0x64,0x58,0x40,0x40, // p
	0x00,0x00,0x34,0x4C,0x4C,0x34,0x04,0x04, // q
	0x00,0x00,0x58,0x64,0x40,0x40,0x40,0x00, // r
	0x00,0x00,0x3C,0x40,0x38,0x04,0x78,0x00, // s
	0x20,0x20,0x70,0x20,0x20,0x24,0x18,0x00, // t
	0x00,0x00,0x44,0x44,0x44,0x4C,0x34,0x00, // u
	0x00,0x00,0x44,0x44,0x44,0x28,0x10,0x00, // v
	0x00,0x00,0x44,0x44,0x54,0x54,0x28,0x00, // w
	0x00,0x00,0x44,0x28,0x10,0x28,0x44,0x00, // x
	0x00,0x00,0x44,0x44,0x44,0x3C,0x04,0x38, // y
	0x00,0x00,0x7C,0x08,0x10,0x20,0x7C,0x00, // z
	0x10,0x20,0x20,0x40,0x20,0x20,0x10,0x00, // {
	0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00, // |
	0x20,0x10,0x10,0x08,0x10,0x10,0x20,0x00, // }
	0x00,0x00,0x00,0x20,0x54,0x08,0x00,0x00, // ~
};


//常用ASCII表
//偏移量32
//ASCII字符集
//偏移量32
//大小:8*16
//逐行式,顺向(高位在前)
/****************************************8*16的点阵************************************/
const unsigned char F8X16[]=	  
{
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 0
  0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,//! 1
  0x00,0x12,0x36,0x24,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 2
  0x00,0x00,0x00,0x24,0x24,0x24,0xFE,0x48,0x48,0x48,0xFE,0x48,0x48,0x48,0x00,0x00,//# 3
  0x00,0x00,0x10,0x38,0x54,0x54,0x50,0x30,0x1C,0x14,0x14,0x54,0x54,0x38,0x10,0x10,//$ 4
  0x00,0x00,0x00,0x44,0xA4,0xA8,0xA8,0xA8,0x54,0x1A,0x2A,0x2A,0x2A,0x44,0x00,0x00,//% 5
  0x00,0x00,0x00,0x30,0x48,0x48,0x48,0x50,0x6E,0xA4,0x94,0x88,0x89,0x76,0x00,0x00,//& 6
  0x00,0x60,0x60,0x20,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7
  0x00,0x02,0x04,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x08,0x08,0x04,0x02,0x00,//( 8
  0x00,0x40,0x20,0x10,0x10,0x08,0x08,0x08,0x08,0x08,0x08,0x10,0x10,0x20,0x40,0x00,//) 9
  0x00,0x00,0x00,0x00,0x10,0x10,0xD6,0x38,0x38,0xD6,0x10,0x10,0x00,0x00,0x00,0x00,//* 10
  0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0xFE,0x10,0x10,0x10,0x10,0x00,0x00,0x00,//+ 11
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x20,0xC0,//, 12
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//- 13
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00,0x00,//. 14
  0x00,0x00,0x01,0x02,0x02,0x04,0x04,0x08,0x08,0x10,0x10,0x20,0x20,0x40,0x40,0x00,/// 15
  0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x24,0x18,0x00,0x00,//0 16
  0x00,0x00,0x00,0x10,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,//1 17
  0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x04,0x04,0x08,0x10,0x20,0x42,0x7E,0x00,0x00,//2 18
  0x00,0x00,0x00,0x3C,0x42,0x42,0x04,0x18,0x04,0x02,0x02,0x42,0x44,0x38,0x00,0x00,//3 19
  0x00,0x00,0x00,0x04,0x0C,0x14,0x24,0x24,0x44,0x44,0x7E,0x04,0x04,0x1E,0x00,0x00,//4 20
  0x00,0x00,0x00,0x7E,0x40,0x40,0x40,0x58,0x64,0x02,0x02,0x42,0x44,0x38,0x00,0x00,//5 21
  0x00,0x00,0x00,0x1C,0x24,0x40,0x40,0x58,0x64,0x42,0x42,0x42,0x24,0x18,0x00,0x00,//6 22
  0x00,0x00,0x00,0x7E,0x42,0x44,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,//7 23
  0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x24,0x18,0x24,0x42,0x42,0x42,0x3C,0x00,0x00,//8 24
  0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x26,0x1A,0x02,0x02,0x24,0x38,0x00,0x00,//9 25
  0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,//: 26
  0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x08,0x30,0x00,//; 27
  0x00,0x00,0x00,0x02,0x04,0x08,0x10,0x20,0x40,0x20,0x10,0x08,0x04,0x02,0x00,0x00,//< 28
  0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,//= 29
  0x00,0x00,0x00,0x40,0x20,0x10,0x08,0x04,0x02,0x04,0x08,0x10,0x20,0x40,0x00,0x00,//> 30
  0x00,0x00,0x00,0x3C,0x42,0x42,0x62,0x02,0x04,0x08,0x08,0x00,0x18,0x18,0x00,0x00,//? 31
  0x00,0x00,0x00,0x38,0x44,0x5A,0xAA,0xAA,0xAA,0xAA,0xB4,0x42,0x44,0x38,0x00,0x00,//@ 32
  0x00,0x00,0x00,0x10,0x10,0x18,0x28,0x28,0x24,0x3C,0x44,0x42,0x42,0xE7,0x00,0x00,//A 33
  0x00,0x00,0x00,0xF8,0x44,0x44,0x44,0x78,0x44,0x42,0x42,0x42,0x44,0xF8,0x00,0x00,//B 34
  0x00,0x00,0x00,0x3E,0x42,0x42,0x80,0x80,0x80,0x80,0x80,0x42,0x44,0x38,0x00,0x00,//C 35
  0x00,0x00,0x00,0xF8,0x44,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x44,0xF8,0x00,0x00,//D 36
  0x00,0x00,0x00,0xFE,0x42,0x48,0x48,0x78,0x48,0x48,0x40,0x42,0x42,0xFE,0x00,0x00,//E 37
  0x00,0x00,0x00,0xFE,0x42,0x48,0x48,0x78,0x48,0x48,0x40,0x40,0x40,0xE0,0x00,0x00,//F 38
  0x00,0x00,0x00,0x3C,0x44,0x44,0x80,0x80,0x80,0x8E,0x84,0x44,0x44,0x38,0x00,0x00,//G 39
  0x00,0x00,0x00,0xE7,0x42,0x42,0x42,0x42,0x7E,0x42,0x42,0x42,0x42,0xE7,0x00,0x00,//H 40
  0x00,0x00,0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,//I 41
  0x00,0x00,0x00,0x3E,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x88,0xF0,//J 42
  0x00,0x00,0x00,0xEE,0x44,0x48,0x50,0x70,0x50,0x48,0x48,0x44,0x44,0xEE,0x00,0x00,//K 43
  0x00,0x00,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x42,0xFE,0x00,0x00,//L 44
  0x00,0x00,0x00,0xEE,0x6C,0x6C,0x6C,0x6C,0x54,0x54,0x54,0x54,0x54,0xD6,0x00,0x00,//M 45
  0x00,0x00,0x00,0xC7,0x62,0x62,0x52,0x52,0x4A,0x4A,0x4A,0x46,0x46,0xE2,0x00,0x00,//N 46
  0x00,0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x44,0x38,0x00,0x00,//O 47
  0x00,0x00,0x00,0xFC,0x42,0x42,0x42,0x42,0x7C,0x40,0x40,0x40,0x40,0xE0,0x00,0x00,//P 48
  0x00,0x00,0x00,0x38,0x44,0x82,0x82,0x82,0x82,0x82,0xB2,0xCA,0x4C,0x38,0x06,0x00,//Q 49
  0x00,0x00,0x00,0xF8,0x44,0x44,0x44,0x78,0x48,0x48,0x44,0x44,0x42,0xE3,0x00,0x00,//R 50
  0x00,0x00,0x00,0x3E,0x42,0x42,0x40,0x20,0x18,0x04,0x02,0x42,0x42,0x7C,0x00,0x00,//S 51
  0x00,0x00,0x00,0xFE,0x92,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00,//T 52
  0x00,0x00,0x00,0xE7,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,//U 53
  0x00,0x00,0x00,0xE7,0x42,0x42,0x44,0x24,0x24,0x28,0x28,0x18,0x10,0x10,0x00,0x00,//V 54
  0x00,0x00,0x00,0xD6,0x92,0x92,0x92,0x92,0xAA,0xAA,0x6C,0x44,0x44,0x44,0x00,0x00,//W 55
  0x00,0x00,0x00,0xE7,0x42,0x24,0x24,0x18,0x18,0x18,0x24,0x24,0x42,0xE7,0x00,0x00,//X 56
  0x00,0x00,0x00,0xEE,0x44,0x44,0x28,0x28,0x10,0x10,0x10,0x10,0x10,0x38,0x00,0x00,//Y 57
  0x00,0x00,0x00,0x7E,0x84,0x04,0x08,0x08,0x10,0x20,0x20,0x42,0x42,0xFC,0x00,0x00,//Z 58
  0x00,0x1E,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1E,0x00,//[ 59
  0x00,0x00,0x40,0x40,0x20,0x20,0x10,0x10,0x08,0x04,0x04,0x02,0x02,0x02,0x01,0x01,//\ 60
  0x00,0x78,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x78,0x00,//] 61
  0x00,0x08,0x14,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,//_ 63
  0x00,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x1E,0x22,0x42,0x42,0x3F,0x00,0x00,//a 65
  0x00,0x00,0x00,0xC0,0x40,0x40,0x40,0x58,0x64,0x42,0x42,0x42,0x64,0x58,0x00,0x00,//b 66
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x22,0x40,0x40,0x40,0x22,0x1C,0x00,0x00,//c 67
  0x00,0x00,0x00,0x06,0x02,0x02,0x02,0x1E,0x22,0x42,0x42,0x42,0x26,0x1B,0x00,0x00,//d 68
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x7E,0x40,0x40,0x42,0x3C,0x00,0x00,//e 69
  0x00,0x00,0x00,0x0F,0x11,0x10,0x10,0x7E,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,//f 70
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x44,0x44,0x38,0x40,0x3C,0x42,0x42,0x3C,//g 71
  0x00,0x00,0x00,0xC0,0x40,0x40,0x40,0x5C,0x62,0x42,0x42,0x42,0x42,0xE7,0x00,0x00,//h 72
  0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,//i 73
  0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x1C,0x04,0x04,0x04,0x04,0x04,0x04,0x44,0x78,//j 74
  0x00,0x00,0x00,0xC0,0x40,0x40,0x40,0x4E,0x48,0x50,0x68,0x48,0x44,0xEE,0x00,0x00,//k 75
  0x00,0x00,0x00,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,//l 76
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF6,0x49,0x49,0x49,0x49,0x49,0xED,0x00,0x00,//m 77
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDC,0x62,0x42,0x42,0x42,0x42,0xE7,0x00,0x00,//n 78
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,//o 79
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD8,0x64,0x42,0x42,0x42,0x64,0x58,0x40,0xE0,//p 80
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x22,0x42,0x42,0x42,0x26,0x1A,0x02,0x07,//q 81
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEE,0x32,0x20,0x20,0x20,0x20,0xF8,0x00,0x00,//r 82
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x42,0x40,0x3C,0x02,0x42,0x7C,0x00,0x00,//s 83
  0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x7C,0x10,0x10,0x10,0x10,0x10,0x0C,0x00,0x00,//t 84
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC6,0x42,0x42,0x42,0x42,0x46,0x3B,0x00,0x00,//u 85
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE7,0x42,0x24,0x24,0x28,0x10,0x10,0x00,0x00,//v 86
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD7,0x92,0x92,0xAA,0xAA,0x44,0x44,0x00,0x00,//w 87
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6E,0x24,0x18,0x18,0x18,0x24,0x76,0x00,0x00,//x 88
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE7,0x42,0x24,0x24,0x28,0x18,0x10,0x10,0xE0,//y 89
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x44,0x08,0x10,0x10,0x22,0x7E,0x00,0x00,//z 90
  0x00,0x03,0x04,0x04,0x04,0x04,0x04,0x08,0x04,0x04,0x04,0x04,0x04,0x04,0x03,0x00,//{ 91
  0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,//| 92
  0x00,0x60,0x10,0x10,0x10,0x10,0x10,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x60,0x00,//} 93
  0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x52,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
};


typedef struct 
{
	unsigned char Index[3];	
	char Msk[32];
}typFNT_GB16; 

/*
输出格式:C51
数据排列:从左到右从上到下
取模方式:横向8点左高位
黑白取反:正常
字体种类:[HZK1616宋体]
强制转角:ASCII自动转全角
*/
const typFNT_GB16 cfont16[] = 
{
	"全",0x01,0x00,0x01,0x00,0x02,0x80,0x04,0x40,0x08,0x20,0x10,0x10,0x2F,0xE8,0xC1,0x06,
	0x01,0x00,0x01,0x00,0x1F,0xF0,0x01,0x00,0x01,0x00,0x01,0x00,0x7F,0xFC,0x00,0x00,/*"全",0*/
	"动",0x00,0x40,0x00,0x40,0x7C,0x40,0x00,0x40,0x01,0xFC,0x00,0x44,0xFE,0x44,0x20,0x44,
	0x20,0x44,0x20,0x84,0x48,0x84,0x44,0x84,0xFD,0x04,0x45,0x04,0x02,0x28,0x04,0x10,/*"动",1*/
	"电",0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,
	0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x0A,0x01,0x02,0x01,0x02,0x00,0xFE,/*"电",0*/
	"子",0x00,0x00,0x7F,0xF8,0x00,0x10,0x00,0x20,0x00,0x40,0x01,0x80,0x01,0x00,0xFF,0xFE,
	0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00,/*"子",1*/
	"技",0x10,0x20,0x10,0x20,0x10,0x20,0x13,0xFE,0xFC,0x20,0x10,0x20,0x10,0x20,0x15,0xFC,
	0x18,0x84,0x30,0x88,0xD0,0x48,0x10,0x50,0x10,0x20,0x10,0x50,0x51,0x88,0x26,0x06,/*"技",2*/
	"术",0x01,0x00,0x01,0x20,0x01,0x10,0x01,0x10,0x7F,0xFC,0x03,0x80,0x05,0x40,0x05,0x40,
	0x09,0x20,0x11,0x10,0x21,0x08,0x41,0x04,0x81,0x02,0x01,0x00,0x01,0x00,0x01,0x00,/*"术",3*/
	"系",0x00,0xF8,0x3F,0x00,0x04,0x00,0x08,0x20,0x10,0x40,0x3F,0x80,0x01,0x00,0x06,0x10,
	0x18,0x08,0x7F,0xFC,0x01,0x04,0x09,0x20,0x11,0x10,0x21,0x08,0x45,0x04,0x02,0x00,/*"系",0*/
	"统",0x10,0x40,0x10,0x20,0x20,0x20,0x23,0xFE,0x48,0x40,0xF8,0x88,0x11,0x04,0x23,0xFE,
	0x40,0x92,0xF8,0x90,0x40,0x90,0x00,0x90,0x19,0x12,0xE1,0x12,0x42,0x0E,0x04,0x00,/*"统",1*/
	"设",0x00,0x00,0x21,0xF0,0x11,0x10,0x11,0x10,0x01,0x10,0x02,0x0E,0xF4,0x00,0x13,0xF8,
	0x11,0x08,0x11,0x10,0x10,0x90,0x14,0xA0,0x18,0x40,0x10,0xA0,0x03,0x18,0x0C,0x06,/*"设",2*/
	"置",0x7F,0xFC,0x44,0x44,0x7F,0xFC,0x01,0x00,0x7F,0xFC,0x01,0x00,0x1F,0xF0,0x10,0x10,
	0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0xFF,0xFE,0x00,0x00,/*"置",3*/
	"音",0x02,0x00,0x01,0x00,0x3F,0xF8,0x00,0x00,0x08,0x20,0x04,0x40,0xFF,0xFE,0x00,0x00,
	0x1F,0xF0,0x10,0x10,0x10,0x10,0x1F,0xF0,0x10,0x10,0x10,0x10,0x1F,0xF0,0x10,0x10,/*"音",4*/
	"量",0x00,0x00,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0xFF,0xFE,0x00,0x00,0x1F,0xF0,
	0x11,0x10,0x1F,0xF0,0x11,0x10,0x1F,0xF0,0x01,0x00,0x1F,0xF0,0x01,0x00,0x7F,0xFC,/*"量",5*/
	"颜",0x10,0x00,0x08,0xFE,0x7F,0x10,0x22,0x20,0x14,0x7C,0x7F,0x44,0x44,0x54,0x48,0x54,
	0x52,0x54,0x44,0x54,0x48,0x54,0x51,0x54,0x42,0x28,0x44,0x24,0x88,0x42,0x30,0x82,/*"颜",6*/
	"色",0x08,0x00,0x08,0x00,0x1F,0xE0,0x20,0x20,0x40,0x40,0xBF,0xF8,0x21,0x08,0x21,0x08,
	0x21,0x08,0x3F,0xF8,0x20,0x00,0x20,0x02,0x20,0x02,0x20,0x02,0x1F,0xFE,0x00,0x00,/*"色",7*/
	"网",0x00,0x00,0x7F,0xFC,0x40,0x04,0x40,0x04,0x42,0x14,0x52,0x94,0x4A,0x54,0x44,0x24,
	0x44,0x24,0x4A,0x54,0x4A,0x54,0x52,0x94,0x61,0x04,0x40,0x04,0x40,0x14,0x40,0x08,/*"网",8*/
	"络",0x10,0x80,0x10,0x80,0x20,0xF8,0x21,0x08,0x4B,0x10,0xFC,0xA0,0x10,0x40,0x20,0xA0,
	0x41,0x18,0xFA,0x06,0x45,0xF8,0x01,0x08,0x19,0x08,0xE1,0x08,0x41,0xF8,0x01,0x08,/*"络",9*/
	"小",0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x40,0x05,0x20,0x09,0x10,
	0x09,0x08,0x11,0x04,0x21,0x04,0x41,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00,
	"星",0x00,0x08,0x3F,0xFC,0x20,0x08,0x3F,0xF8,0x20,0x08,0x3F,0xF8,0x01,0x00,0x21,0x08,
	0x3F,0xFC,0x21,0x00,0x41,0x10,0xBF,0xF8,0x01,0x00,0x01,0x04,0xFF,0xFE,0x00,0x00,
	
	"戴",
	0x08,0x50,0x7F,0x48,0x08,0x44,0xFF,0xFE,0x00,0x40,0x7F,0x48,0x49,0x48,0x7F,0x50,
	0x49,0x50,0x7F,0x20,0x22,0x20,0x7F,0x60,0x22,0x90,0xFF,0x92,0x22,0x0A,0x41,0x06,

	"创",
	0x08,0x04,0x08,0x04,0x14,0x04,0x12,0x24,0x21,0xA4,0x20,0xA4,0x7E,0x24,0xA2,0x24,
	0x22,0x24,0x2A,0x24,0x24,0x24,0x20,0x04,0x21,0x04,0x21,0x04,0x1F,0x14,0x00,0x08,

	"昆",
	0x00,0x08,0x3F,0xFC,0x20,0x08,0x20,0x08,0x3F,0xF8,0x20,0x08,0x20,0x08,0x3F,0xF8,
	0x00,0x80,0x20,0x84,0x24,0x98,0x3E,0xE0,0x20,0x80,0x20,0x82,0x2E,0x82,0x70,0x7E,
}
/


typedef struct
{
	unsigned char Index[3];
	char Msk[72];
}typFNT_GB24;

//宋体
//24*24大小
//逐行式,顺向(高位在前)
const typFNT_GB24 cfont24[] = 
{
	"全",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x68,0x00,0x00,
	0x44,0x00,0x00,0xC2,0x00,0x01,0x81,0x00,0x03,0x00,0xC0,0x06,0x00,0x70,0x0F,0xFF,
	0xFE,0x10,0x18,0x08,0x60,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x60,
	0x03,0xFF,0x80,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x08,0x1F,
	0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,/*"全",0*/
	
	"动",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x01,0x00,0x00,0x61,0x00,0x3F,
	0x81,0x00,0x00,0x01,0x00,0x00,0x01,0x0C,0x00,0x07,0xFC,0x00,0x31,0x0C,0x3F,0xC1,
	0x0C,0x06,0x01,0x0C,0x04,0x01,0x0C,0x0C,0x81,0x08,0x08,0x43,0x08,0x10,0x62,0x08,
	0x10,0x22,0x08,0x2F,0xF4,0x08,0x38,0x14,0x08,0x00,0x08,0x08,0x00,0x11,0x18,0x00,
	0x20,0xF8,0x00,0x40,0x30,0x00,0x00,0x00,/*"动",1*/
	
	"电",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,
	0x10,0x00,0x0F,0xFF,0xF0,0x08,0x10,0x20,0x08,0x10,0x20,0x08,0x10,0x20,0x08,0x10,
	0x20,0x0F,0xFF,0xE0,0x08,0x10,0x20,0x08,0x10,0x20,0x08,0x10,0x20,0x08,0x10,0x20,
	0x0F,0xFF,0xE0,0x08,0x10,0x00,0x00,0x10,0x08,0x00,0x10,0x08,0x00,0x10,0x04,0x00,
	0x18,0x0C,0x00,0x0F,0xF8,0x00,0x00,0x00,/*"电",2*/
	
	"子",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x0F,0xFF,0xF0,0x00,0x00,0x60,0x00,
	0x00,0x80,0x00,0x03,0x00,0x00,0x14,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,
	0x0C,0x7F,0xFF,0xFE,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,
	0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,
	0xF8,0x00,0x00,0x30,0x00,0x00,0x00,0x00,/*"子",3*/
	
	"技",0x00,0x00,0x00,0x04,0x00,0x00,0x07,0x01,0x80,0x06,0x01,0x00,0x06,0x01,0x00,0x06,
	0x01,0x00,0x06,0xC1,0x0C,0x3F,0x3F,0xF0,0x06,0x01,0x00,0x06,0x01,0x00,0x06,0x01,
	0x00,0x06,0xFF,0xF8,0x07,0x08,0x10,0x3E,0x08,0x30,0x26,0x04,0x20,0x06,0x04,0x60,
	0x06,0x02,0x40,0x06,0x02,0xC0,0x06,0x01,0x80,0x06,0x03,0x80,0x06,0x0C,0x60,0x1E,
	0x10,0x3E,0x0C,0xE0,0x0C,0x00,0x00,0x00,/*"技",4*/
	
	"术",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x19,0x80,0x00,0x18,0xE0,0x00,
	0x18,0x60,0x00,0x18,0x28,0x00,0x18,0x1C,0x3F,0xFF,0xE0,0x00,0x3C,0x00,0x00,0x7C,
	0x00,0x00,0x5A,0x00,0x00,0xDA,0x00,0x00,0x99,0x00,0x01,0x19,0x80,0x03,0x18,0xC0,
	0x06,0x18,0x60,0x04,0x18,0x38,0x08,0x18,0x1E,0x30,0x18,0x08,0x40,0x18,0x00,0x00,
	0x18,0x00,0x00,0x18,0x00,0x00,0x00,0x00,/*"术",5*/
}
/


typedef struct
{
	unsigned char Index[3];
	char Msk[128];
}typFNT_GB32;

//宋体
//32*32大小
//逐行式,顺向(高位在前)
const typFNT_GB32 cfont32[] = 
{
	"全",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x80,0x00,
	0x00,0x07,0x80,0x00,0x00,0x06,0x80,0x00,0x00,0x0C,0x40,0x00,0x00,0x1C,0x20,0x00,
	0x00,0x18,0x30,0x00,0x00,0x30,0x18,0x00,0x00,0x60,0x0C,0x00,0x00,0xC0,0x07,0x00,
	0x01,0x80,0x03,0xC0,0x03,0x00,0x02,0xF8,0x07,0xFF,0xFF,0x7C,0x08,0x01,0x80,0x90,
	0x30,0x01,0x80,0x00,0x40,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x81,0x00,
	0x00,0x01,0x83,0x80,0x01,0xFF,0xFF,0xC0,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
	0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x10,
	0x00,0x01,0x80,0x38,0x1F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"全",0*/
	"动",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0E,0x00,
	0x00,0x00,0x0C,0x00,0x00,0x0C,0x0C,0x00,0x3F,0xFE,0x0C,0x00,0x10,0x00,0x0C,0x00,
	0x00,0x00,0x0C,0x00,0x00,0x00,0x0C,0x18,0x00,0x00,0xFF,0xFC,0x00,0x02,0x0C,0x18,
	0x00,0x07,0x0C,0x18,0x3F,0xFF,0x8C,0x18,0x01,0xC0,0x0C,0x18,0x01,0xC0,0x0C,0x18,
	0x01,0x80,0x08,0x18,0x03,0x00,0x08,0x18,0x02,0x10,0x18,0x18,0x06,0x08,0x18,0x18,
	0x04,0x0C,0x10,0x18,0x08,0x06,0x10,0x18,0x10,0x06,0x30,0x10,0x2F,0xFB,0x20,0x10,
	0x3E,0x03,0x60,0x10,0x10,0x02,0xC0,0x30,0x00,0x00,0x80,0x30,0x00,0x01,0x0C,0x30,
	0x00,0x02,0x03,0xE0,0x00,0x0C,0x01,0xE0,0x00,0x10,0x00,0x80,0x00,0x00,0x00,0x00,/*"动",1*/
	"电",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x80,0x00,
	0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,
	0x07,0xFF,0xFF,0xC0,0x06,0x03,0x00,0xC0,0x06,0x03,0x00,0xC0,0x06,0x03,0x00,0xC0,
	0x06,0x03,0x00,0xC0,0x06,0x03,0x00,0xC0,0x06,0x03,0x00,0xC0,0x07,0xFF,0xFF,0xC0,
	0x06,0x03,0x00,0xC0,0x06,0x03,0x00,0xC0,0x06,0x03,0x00,0xC0,0x06,0x03,0x00,0xC0,
	0x06,0x03,0x00,0xC0,0x07,0xFF,0xFF,0xC0,0x06,0x03,0x00,0x80,0x06,0x03,0x00,0x00,
	0x00,0x03,0x00,0x10,0x00,0x03,0x00,0x08,0x00,0x03,0x00,0x08,0x00,0x03,0x00,0x18,
	0x00,0x03,0x80,0x1C,0x00,0x01,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"电",2*/
	"子",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,
	0x03,0xFF,0xFF,0xE0,0x00,0x00,0x01,0xE0,0x00,0x00,0x03,0x00,0x00,0x00,0x06,0x00,
	0x00,0x00,0x18,0x00,0x00,0x00,0x30,0x00,0x00,0x01,0xC0,0x00,0x00,0x01,0xC0,0x00,
	0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x10,0x00,0x01,0x80,0x38,0x3F,0xFF,0xFF,0xFC,
	0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
	0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
	0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
	0x00,0x3F,0x80,0x00,0x00,0x07,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,/*"子",3*/
	"技",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x08,0x00,0x01,0xC0,0x0E,0x00,
	0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,
	0x01,0x98,0x0C,0x18,0x3F,0xFF,0xFF,0xFC,0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,
	0x01,0x80,0x0C,0x00,0x01,0x80,0x0C,0x00,0x01,0x8C,0x0C,0x20,0x01,0xB3,0xFF,0xF0,
	0x01,0xC0,0x80,0x60,0x0F,0x80,0x80,0x60,0x3D,0x80,0x40,0xC0,0x31,0x80,0x40,0xC0,
	0x01,0x80,0x21,0x80,0x01,0x80,0x21,0x80,0x01,0x80,0x33,0x00,0x01,0x80,0x1E,0x00,
	0x01,0x80,0x0C,0x00,0x01,0x80,0x1E,0x00,0x01,0x80,0x37,0x00,0x01,0x80,0xE3,0xC0,
	0x1F,0x83,0x80,0xF8,0x07,0x8E,0x00,0x7C,0x02,0x30,0x00,0x00,0x00,0x00,0x00,0x00,/*"技",4*/
	"术",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0xC0,0x00,
	0x00,0x01,0x8C,0x00,0x00,0x01,0x87,0x00,0x00,0x01,0x83,0x80,0x00,0x01,0x81,0x80,
	0x00,0x01,0x80,0x80,0x00,0x01,0x80,0x30,0x3F,0xFF,0xFF,0xF8,0x10,0x03,0xC0,0x00,
	0x00,0x07,0xC0,0x00,0x00,0x07,0xA0,0x00,0x00,0x0D,0xA0,0x00,0x00,0x0D,0x90,0x00,
	0x00,0x19,0x90,0x00,0x00,0x19,0x98,0x00,0x00,0x31,0x8C,0x00,0x00,0x61,0x86,0x00,
	0x00,0xC1,0x87,0x00,0x00,0x81,0x83,0x80,0x01,0x81,0x81,0xC0,0x03,0x01,0x80,0xF0,
	0x04,0x01,0x80,0x7C,0x08,0x01,0x80,0x38,0x10,0x01,0x80,0x10,0x60,0x01,0x80,0x00,
	0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,/*"术",5*/
};
/


unsigned char BMP2[] =
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x7F,0xE0,0x03,0x91,0x1C,0x38,0x18,0x00,0x70,0x00,0xFF,0xFC,0x00,0x07,0xFF,0xFE,
	0x66,0x60,0x04,0x5B,0x22,0x44,0x14,0x01,0x8C,0x01,0x7F,0xFA,0x00,0x04,0x00,0x02,
	0x36,0xC0,0x08,0x15,0x40,0x80,0x52,0x02,0x02,0x01,0xBF,0xF6,0x00,0x3D,0xB6,0xDA,
	0x1F,0x80,0x88,0x11,0x40,0x80,0x34,0x04,0x71,0x01,0xDF,0xEE,0x00,0x25,0xB6,0xDA,
	0x0F,0x02,0x88,0x11,0x40,0x80,0x18,0x00,0x88,0x01,0xE0,0x1E,0x00,0x25,0xB6,0xDA,
	0x06,0x0A,0x88,0x11,0x40,0x80,0x34,0x01,0x04,0x01,0xDF,0xEE,0x00,0x25,0xB6,0xDA,
	0x06,0x2A,0x88,0x11,0x40,0x80,0x52,0x00,0x20,0x01,0xBF,0xF6,0x00,0x3D,0xB6,0xDA,
	0x06,0xAA,0x84,0x51,0x22,0x44,0x14,0x00,0x70,0x01,0x7F,0xFA,0x00,0x04,0x00,0x02,
	0x06,0xAA,0x83,0x91,0x1C,0x38,0x18,0x00,0x20,0x00,0xFF,0xFC,0x00,0x07,0xFF,0xFE,
	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,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,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,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,0x03,0x1F,0xFC,0x00,0x3F,0xFC,0x7F,0xF0,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x07,0x3F,0xFE,0x00,0x7F,0xFC,0xFF,0xF8,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x0F,0x30,0x06,0x00,0x60,0x00,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x1B,0x30,0x06,0x00,0x60,0x00,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x33,0x30,0x06,0x00,0x60,0x00,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x63,0x30,0x06,0x18,0x60,0x00,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0xC3,0x30,0x06,0x18,0x7F,0xFC,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x83,0x30,0x06,0x00,0x7F,0xFC,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x3F,0xFE,0x00,0x00,0x0C,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x3F,0xFE,0x00,0x00,0x0C,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x30,0x06,0x00,0x00,0x0C,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x30,0x06,0x18,0x00,0x0C,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x30,0x06,0x18,0x00,0x0C,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x30,0x06,0x00,0x00,0x0C,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x30,0x06,0x00,0x60,0x0C,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x30,0x06,0x00,0x60,0x0C,0xC0,0x18,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x3F,0xFE,0x00,0x7F,0xFC,0xFF,0xF8,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x1F,0xFC,0x00,0x3F,0xF8,0x7F,0xF0,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,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,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0xF9,0xE3,0x0F,0x00,0xF1,0xE0,0x1E,0x3C,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x01,0x0A,0x15,0x10,0x81,0x0A,0x10,0x21,0x42,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x12,0x11,0x10,0x81,0x0A,0x00,0x21,0x40,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x22,0x11,0x1F,0x81,0x0B,0xE0,0x21,0x7C,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x42,0x11,0x10,0x81,0x0A,0x10,0x21,0x42,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x82,0x11,0x10,0x99,0x0A,0x13,0x21,0x42,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x01,0xF9,0xE7,0xCF,0x18,0xF1,0xE3,0x1E,0x3C,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,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,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,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,
	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,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,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x41,0x1C,0x41,0x41,0x00,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x00,0x82,0x7C,0x82,
	0x63,0x22,0x61,0x41,0x00,0x00,0x00,0x00,0xF1,0x00,0x00,0x00,0x00,0xC6,0x82,0xC2,
	0x55,0x41,0x51,0x41,0x00,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x00,0xAA,0x80,0xA2,
	0x49,0x7E,0x49,0x41,0x00,0x00,0x00,0x00,0xFD,0x00,0x00,0x00,0x00,0x92,0x7C,0x92,
	0x41,0x40,0x45,0x41,0x00,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x00,0x82,0x02,0x8A,
	0x41,0x21,0x43,0x22,0x00,0x00,0x00,0x00,0xF1,0x00,0x00,0x00,0x00,0x82,0x82,0x86,
	0x41,0x1E,0x41,0x1C,0x00,0x00,0x00,0x00,0x81,0x00,0x00,0x00,0x00,0x82,0x7C,0x82,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};


unsigned char BMP3[] =
{
	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,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,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,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,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,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,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,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,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0xF8,0x03,0xFF,0xF8,0x03,0xC0,0xF0,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x0F,0xFE,0x03,0xFF,0xF8,0x07,0xF3,0xFC,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x18,0x03,0x03,0x00,0x00,0x0F,0xFF,0xFE,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x30,0x01,0x83,0x00,0x00,0x1F,0xFF,0xFF,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC3,0x00,0x00,0x1F,0xFF,0xFF,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC3,0x00,0x00,0x1F,0xFF,0xFF,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC3,0x00,0x00,0x0F,0xFF,0xFE,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC3,0x00,0x00,0x0F,0xFF,0xFE,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x30,0x01,0x83,0x7F,0xC0,0x07,0xFF,0xFC,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x30,0x03,0x03,0xFF,0xF0,0x03,0xFF,0xF8,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x18,0x06,0x03,0x80,0x38,0x01,0xFF,0xF0,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x0F,0xFC,0x03,0x00,0x18,0x00,0x7F,0xC0,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x1F,0xFF,0x00,0x00,0x0C,0x00,0x3F,0x80,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x30,0x01,0x80,0x00,0x0C,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC0,0x00,0x0C,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC0,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC0,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC0,0x00,0x0C,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC0,0x00,0x0C,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC6,0x00,0x0C,0x1E,0x38,0xCC,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x60,0x00,0xC7,0x00,0x1C,0x11,0x45,0x32,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x30,0x01,0x83,0x80,0x38,0x11,0x45,0x22,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x1F,0xFF,0x01,0xFF,0xF0,0x11,0x45,0x22,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x0F,0xFE,0x00,0x7F,0xC0,0x11,0x45,0x22,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x79,0x22,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,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,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,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x22,0x00,0x90,0x04,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x02,0x40,0x42,0x00,0x90,0x04,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x06,0x40,0x41,0x01,0x08,0x08,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x04,0x20,0x81,0x01,0x08,0x08,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x08,0x20,0x81,0x02,0x04,0x10,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x08,0x20,0x80,0x82,0x04,0x10,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x10,0x21,0x00,0x82,0x02,0x10,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x20,0x11,0x00,0x84,0x02,0x10,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x40,0x12,0x00,0x44,0x02,0x20,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x80,0x12,0x00,0x48,0x01,0x20,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x48,0x01,0x20,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x30,0x01,0x20,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x30,0x00,0xC0,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,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,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};



unsigned char BMP4[] =
{
	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,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,0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x01,0x00,0x0C,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x01,0x00,0x0F,0xC0,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x00,0x1F,0xFE,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x00,0x3F,0xFF,0xFF,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x07,0x00,0x7F,0xFF,0xFF,0xFF,0xC0,0x10,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x06,0x00,0xFF,0xFF,0xFF,0xFF,0xE0,0x10,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x06,0x03,0xFF,0xFF,0xFF,0xFF,0xE0,0x20,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x06,0x0F,0xFF,0xFF,0xFF,0xFF,0xE0,0x60,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x06,0x3F,0xFF,0xFF,0xFF,0xFF,0xF0,0xC0,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x07,0x3C,0x3F,0xFF,0xF8,0x7F,0xF1,0x80,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x07,0x3F,0xFF,0xFF,0xFF,0xFF,0xF1,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x3F,0xFF,0xFF,0xFF,0xFF,0xF3,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x20,0x00,0xFF,0x00,0x07,0xF2,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x01,0x0F,0xFF,0x7E,0xFF,0xFB,0xE7,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x01,0x9F,0x7F,0x81,0xFD,0xFC,0x0F,0x80,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x01,0xBE,0x3F,0x9D,0xF8,0xFD,0xFF,0x80,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0xDF,0x7F,0xBC,0xFD,0xFB,0xFF,0x80,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x67,0xFE,0x7E,0x7F,0xE3,0xFF,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x38,0x01,0xFF,0x80,0x0F,0xFE,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x07,0xFE,0x00,0x7F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xC7,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xE0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x0F,0x80,0x00,0x00,0x00,0x01,0x83,0x80,0x61,0xC0,0x00,0x00,0x00,
	0x00,0x00,0x00,0x0F,0x80,0xF0,0x00,0x00,0x07,0x82,0xE3,0xE1,0xB0,0x00,0x00,0x00,
	0x00,0x00,0x00,0x0F,0x80,0x1C,0x00,0x00,0x0C,0x6C,0x02,0x3F,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x0E,0x00,0x03,0x00,0x00,0x00,0xFE,0x00,0x3F,0x80,0x00,0x00,0x00,
	0x00,0x00,0x00,0x06,0x00,0xF1,0x80,0x00,0x0F,0x81,0xF7,0xC0,0x7C,0x00,0x00,0x00,
	0x00,0x00,0x00,0x03,0x80,0x18,0x80,0x00,0x03,0xFF,0x80,0xFF,0xE0,0x00,0x00,0x00,
	0x00,0x00,0x00,0x01,0xC0,0x0C,0x40,0x00,0x02,0x18,0x81,0x8C,0x60,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0xE1,0x84,0x40,0x00,0x02,0x18,0x81,0x8C,0x60,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x7F,0xC2,0x40,0x00,0x03,0xFF,0x81,0xFF,0xE0,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x3F,0xE2,0x40,0x00,0x02,0x00,0x31,0x80,0x0C,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x0F,0xC0,0x00,0x00,0x03,0xFF,0xF0,0xFF,0xFC,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xC0,0x7F,0xF0,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,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,0x00,
};


//	 
//
//存储图片数据,图片大小为51*32像素
//逐行式,顺向(高位在前)
//
/
unsigned char BMP5[] =
{
	0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,
	0x0E,0x00,0x00,0x00,0x00,0x01,0x80,0x0E,0x00,0x20,0x00,0x00,0x01,0xC0,0x00,0x00,
	0x70,0x00,0x00,0x00,0xC0,0x00,0x00,0xE0,0x00,0x00,0x00,0xE0,0x3F,0x81,0xC0,0x00,
	0x00,0x00,0x61,0xFF,0xF0,0x80,0x00,0x00,0x00,0x03,0xC0,0xF8,0x00,0x00,0x00,0x00,
	0x07,0x00,0x1C,0x00,0x00,0x00,0x00,0x1E,0x00,0x0F,0x00,0x00,0x00,0x7C,0x1C,0x00,
	0x03,0x1F,0x80,0x00,0x7C,0x1C,0x07,0xFF,0x1F,0x80,0x00,0x7C,0x1C,0x1F,0xFF,0x9F,
	0x80,0x00,0x00,0x1C,0x7C,0x03,0xF8,0x00,0x00,0x00,0x0F,0xF0,0x00,0x7C,0x00,0x00,
	0x03,0xFF,0x00,0x00,0x0F,0xE0,0x00,0x0F,0xF2,0x00,0x00,0x07,0xFE,0x00,0x1F,0x80,
	0x00,0x00,0x00,0x7F,0x80,0x3C,0x00,0x00,0x00,0x00,0x03,0x80,0x7C,0x00,0x00,0x00,
	0x00,0x03,0xC0,0x70,0x00,0x00,0x00,0x00,0x01,0xC0,0x70,0x00,0x00,0x00,0x00,0x01,
	0xC0,0x78,0x00,0x00,0x00,0x00,0x01,0xC0,0x7C,0x00,0x00,0x00,0x00,0x03,0xC0,0x3C,
	0x00,0x00,0x00,0x00,0x07,0x80,0x3E,0x00,0x00,0x00,0x00,0x3F,0x80,0x0F,0xE1,0xC0,
	0x00,0x1F,0xFC,0x00,0x03,0xFF,0xFC,0x03,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,
	0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,0xFC,0x00,0x00,0x00,
};



#endif


效果

stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm
stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm
stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm
stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm
stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm
stm32f103c8t6的最多能接几个oled屏,stm32,单片机,arm

源码

链接:https://pan.baidu.com/s/1czB9j0vUdYnwTy_VyOldeQ?pwd=1234
提取码:1234
如本文有用,请在评论区留言“已阅”,表明来过,感谢!文章来源地址https://www.toymoban.com/news/detail-759786.html

到了这里,关于STM32F103模拟SPI控制6针/7针0.96寸OLED显示屏的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • stm32使用模拟IIC控制四针0.96寸OLED

    STM32系列模拟IIC控制0.96寸OLED方法 首先说为什么要采用模拟IIC来控制OLED,采用STM32系列单片机硬件IIC时有可能出现程序死掉的情况,我遇到的情况是与程序while的使用有关(听说原因很随机)。这个时候我们可以采用两个GPIO来模拟IIC通信控制OLED屏幕。顺带说一下OLED的使用原理

    2024年02月14日
    浏览(60)
  • STM32 F103C8T6学习笔记9:0.96寸单色OLED显示屏—自由取模显示—显示汉字与图片

    今日学习0.96寸单色OLED显示屏的自由取模显示: 宋体汉字比较复杂,常用字符可以直接复制存下来,毕竟只有那么几十个字母字符,但汉字实在太多了,基本不会全部放在单片机里存着,一般用到多少个字就取几个字的模,因此汉字放在这里与自由取模一起讲。 文章提供源码

    2024年02月11日
    浏览(45)
  • 0.96OLED STM32 SPI驱动(一)

    闲来无聊,翻出了一个OLED,本来想串流做个小显示器用,感觉难度太大。将就变成了下面这 个样子,姑且叫火柴人大乱斗之OLED。 火柴人之OLED 分两步走,先驱动OLED能显示一副图片,本篇讲述此内容。 第二步显示动画,放在下一篇中讲。 查资料得到此OLED为SPI通信,SCL对应连

    2024年02月06日
    浏览(53)
  • STM32配合CubeMX硬件SPI驱动0.96寸OLED

    目录 一、简单介绍 1.1 OLED 1.2 SPI协议 接口 优点 缺点 数据传输 二、实战 2.1 工程配置 2.2 测试工程 2.3 波形分析 三、驱动OLED 3.1 初始化代码 3.2 清屏函数 3.3 设置坐标函数 3.4 显示字符函数 3.5 显示字符串函数 3.6 显示图片函数 附录 驱动代码文件 oled.c oled.h f6x8.h 1.1 OLED 有机发

    2024年02月02日
    浏览(38)
  • STM32--7针0.96寸OLED屏幕显示(4线SPI)

    本文介绍基于STM32F103C8T6+0.96寸OLED(7针)的显示(完整程序代码见文末链接) 一、简介 OLED,即有机发光二极管( Organic Light Emitting Diode)。 OLED 由于同时具备自发光,不需背光源、对比度高、厚度薄、视角广、反应速度快、可用于挠曲性面板、使用温度范围广、构造及制程较

    2024年01月16日
    浏览(49)
  • STM32F103C8T6—库函数应用I2C/SPI驱动OLED显示中文、字符串

    I2C(Inter-Integrated Circuit) SPI(Serial Peripheral Interface) 传输方式 半双工 全双工 传输速度 低速,100Kbps----4Mbps 高速,30Mbps以上 几线制 4线制:VCC,GND,SCL,SDA 6/7线制:VCC,GND,SCLK(D0),MOSI(D1/SDA),DC,CS/SS 主从模式 多主机总线,通过SDA上的地址信息锁定从机 只有一个主机,主

    2024年02月02日
    浏览(61)
  • STM32F103驱动oled显示屏

    oled显示屏和其他显示屏类似,不过他只有0.96英寸,屏幕较小,但是使用起来比较方便。有二种驱动方式,分别为IIC,和SPI驱动。驱动方式比较简单。IIC驱动的话只需要4根线,电源,地线,数据线,和时钟线。 我这里使用的是IIC协议驱动oled显示屏,如果想了解IIC协议的可以看

    2024年02月11日
    浏览(52)
  • STM32F103ZET6 驱动 OLED

    目录 前言 OLED模块的基本了解 OLED驱动程序的开发 前言 ​ 大家好,这是我第一次发帖,由于,我的技术并不成熟,程序难免有编写不规范的地方,希望读者能够指正,也希望这篇帖子能够让读者对OLED模块有个大致的了解。很高兴能与大家交流。 OLED模块的基本了解 OLED模块的

    2024年02月14日
    浏览(44)
  • 基于HAL库的stm32的OLED显示屏显示(模拟I2C,四脚,0.96寸)

    参考视频:江科大oled程序移植stm32hal库,freertos学习,cpu使用率_哔哩哔哩_bilibili ​ STM32入门教程-2023持续更新中_哔哩哔哩_bilibili 高速和低速晶振均选择为陶瓷晶振即可。 不需更改初始化配置,因为模拟I2C初始化时会设置这两个引脚的电平 step1、step2完成后生成工程即可。 代

    2024年02月06日
    浏览(52)
  • STM32F103硬件SPI驱动ADS1256

    最近实验室有几个项目都需要用到高分辨率AD转换,于是就开始了ADS1256的开发。 新手,焊得丑,见谅(能用就行) 二: 本以为很容易就能做完,结果被采样速率的问题困扰了很久。 代码如下,使用2.5V基准源进行测试,结果在读ADS时经常出现读出0xFFFFFF的情况,只能忍住悲伤

    2024年02月12日
    浏览(75)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包