【STM32+HAL庫】---- 硬體IIC驅動0.96OLED

来源:https://www.cnblogs.com/zxr-blog/p/18002669
-Advertisement-
Play Games

硬體開發板:STM32G0B1RET6 軟體平臺:cubemax+keil+VScode 內容原著聲明 代碼借鑒學習於以下文章: STM32 使用硬體IIC驅動0.96寸4針IOLED顯示器(HAL庫) 1 新建cubemax工程 1.1 配置系統時鐘RCC 1.2 配置引腳 1.3 導出工程 略. ...


硬體開發板:STM32G0B1RET6
軟體平臺:cubemax+keil+VScode

內容原著聲明

代碼借鑒學習於以下文章:
STM32 使用硬體IIC驅動0.96寸4針IOLED顯示器(HAL庫)

1 新建cubemax工程

1.1 配置系統時鐘RCC

image

1.2 配置引腳

image

1.3 導出工程

略...

2 代碼

2.1 OLED_IIC_Config.h

/**
 * ************************************************************************
 * 
 * @file OLED_IIC_Config.h
 * @author zxr
 * @brief IIC和OLED基礎配置頭文件
 * 
 * ************************************************************************
 * @copyright Copyright (c) 2024 zxr 
 * ************************************************************************
 */
#ifndef OLED_IIC_CONFIG_H
#define OLED_IIC_CONFIG_H

#include "main.h"
#include "stm32g0xx_hal.h"

#define  OLED_ADDRESS 		0x78	//OLED地址  預設0x78

//OLED命令控制巨集
#define  	LEFT 			0x27
#define  	RIGHT 			0x26
#define  	UP 			0X29
#define  	DOWM			0x2A
#define  	ON			0xA7
#define  	OFF			0xA6


#define    	SCREEN_PAGE_NUM		(8)     //屏幕頁數
#define    	SCREEN_PAGEDATA_NUM	(128)   //每頁的數據個數
#define		SCREEN_COLUMN		(128)   //列數
#define  	SCREEN_ROW		(64)    //行數


void WriteCmd(unsigned char cmd);		//寫命令
void WriteDat(unsigned char dat);		//寫數據
void OLED_ON(void);				//開啟OLED
void OLED_OFF(void);				//休眠OLED
void OLED_CLS(void);				//OLED清屏函數
void OLED_Init(void);				//OLED初始化函數
void OLED_RefreshRAM(void);			//更新數據緩衝區
void OLED_ClearRAM(void);			//清除數據緩衝區
void OLED_SetPixel(signed short int x, signed short int y, unsigned char set_pixel);	//設置坐標像素點數據
void OLED_DisplayMode(unsigned char mode);	//屏幕內容取反顯示
void OLED_IntensityControl(unsigned char intensity);//屏幕亮度調節
void OLED_Shift(unsigned char shift_num);	//全屏內容偏移指定距離
void OLED_HorizontalShift(unsigned char start_page,unsigned char end_page,unsigned char direction);	//屏幕內容水平方向滾動播放

#endif  /*OLED_IIC_CONFIG_H*/

2.2 OLED_IIC_Config.c

/**
 * ************************************************************************
 * 
 * @file OLED_IIC_Config.c
 * @author zxr
 * @brief IIC初始化配置和OLED屏幕的底層驅動
 * 
 * ************************************************************************
 * @copyright Copyright (c) 2024 zxr 
 * ************************************************************************
 */
#include "OLED_IIC_Config.h"
#include "i2c.h"
#include "MyDelay.h"

unsigned char  ScreenBuffer[SCREEN_PAGE_NUM][SCREEN_COLUMN];//定義屏幕的存儲空間



/**
* @brief  向OLED寄存器地址寫一個byte的數據
* @param  addr:寄存器地址
* @param  data:要寫入的數據
* @retval 無
*/
void I2C_WriteByte(uint8_t addr, uint8_t data)
{
	extern I2C_HandleTypeDef hi2c1;
	HAL_I2C_Mem_Write(&hi2c1, OLED_ADDRESS, addr, I2C_MEMADD_SIZE_8BIT, &data, 1, 10);
}

/**
 * ************************************************************************
 * @brief 寫命令函數
 * @param[in] cmd  寫入的命令
 * ************************************************************************
 */
void WriteCmd(unsigned char cmd)
{
	I2C_WriteByte(0x00, cmd);
}

/**
 * ************************************************************************
 * @brief 寫數據函數
 * @param[in] dat  寫入的數據
 * ************************************************************************
 */
void WriteDat(unsigned char dat)
{
	I2C_WriteByte(0x40, dat);
}

/**
 * ************************************************************************
 * @brief 開啟OLED
 * ************************************************************************
 */
void OLED_ON(void)
{
	WriteCmd(0X8D);  //設置電荷泵
	WriteCmd(0X14);  //開啟電荷泵
	WriteCmd(0XAF);  //OLED喚醒
}

/**
 * ************************************************************************
 * @brief 休眠OLED
 * ************************************************************************
 */
void OLED_OFF(void)
{
	WriteCmd(0X8D);  //設置電荷泵
	WriteCmd(0X10);  //關閉電荷泵
	WriteCmd(0XAE);  //OLED休眠
}

/**
 * ************************************************************************
 * @brief OLED清屏函數
 * ************************************************************************
 */
void OLED_CLS(void)//清屏
{
	unsigned char m,n;
	for(m=0;m<8;m++)
	{
		WriteCmd(0xb0+m);	//page0-page1
		WriteCmd(0x00);		//low column start address
		WriteCmd(0x10);		//high column start address
		for(n=0;n<128;n++)
		{
			WriteDat(0x00);
		}
	}
}

/**
 * ************************************************************************
 * @brief OLED初始化函數
 * ************************************************************************
 */
void OLED_Init(void)
{
	WriteCmd(0xAE); //顯示關閉
	WriteCmd(0x20);	//設置記憶體定址模式
	WriteCmd(0x10);	//00,水平定址模式;01,垂直定址模式;10,頁定址模式(複位);11,無效
	WriteCmd(0xb0);	//設置頁定址模式的頁起始地址,0-7
	WriteCmd(0xc8);	//設置COM輸出掃描方向
	WriteCmd(0x00); //-設置低列地址
	WriteCmd(0x10); //-設置高列地址
	WriteCmd(0x40); //-設置起始行地址
	WriteCmd(0x81); //設置對比度控制寄存器
	WriteCmd(0xff); //亮度調節 0x00~0xff
	WriteCmd(0xa1); //設置段重新映射0到127
	WriteCmd(0xa6); //設置正常顯示
	WriteCmd(0xa8); //設置復用比例(1到64)
	WriteCmd(0x3F); //
	WriteCmd(0xa4); //0xa4,輸出遵循RAM內容;0xa5,輸出忽略RAM內容
	WriteCmd(0xd3); //設置顯示偏移
	WriteCmd(0x00); //不偏移
	WriteCmd(0xd5); //--set display clock divide ratio/oscillator frequency
	WriteCmd(0xf0); //--set divide ratio
	WriteCmd(0xd9); //--set pre-charge period
	WriteCmd(0x22); //
	WriteCmd(0xda); //--set com pins hardware configuration
	WriteCmd(0x12);
	WriteCmd(0xdb); //--set vcomh
	WriteCmd(0x20); //0x20,0.77xVcc
	WriteCmd(0x8d); //設置DC-DC使能
	WriteCmd(0x14); //
	WriteCmd(0xaf); //--turn on oled panel
	OLED_CLS();
}

/**
 * ************************************************************************
 * @brief 更新數據緩衝區
 * ************************************************************************
 */
void OLED_RefreshRAM(void)
{
	// 頁定址模式填充
	for(unsigned short int m = 0; m < SCREEN_ROW/8; m++)
	{
		WriteCmd(0xb0+m);		//設置頁地址b0~b7
		WriteCmd(0x00);			//設置顯示位置—列低地址00-0f
		WriteCmd(0x10);			//設置顯示位置—列高地址10-1f
		for(unsigned short int n = 0; n < SCREEN_COLUMN; n++)
		{
			WriteDat(ScreenBuffer[m][n]);
		}
	} 
}

/**
 * ************************************************************************
 * @brief 清除數據緩衝區
 * ************************************************************************
 */
void OLED_ClearRAM(void)
{
	for(unsigned short int m = 0; m < SCREEN_ROW/8; m++)
	{
		for(unsigned short int n = 0; n < SCREEN_COLUMN; n++)
		{
			ScreenBuffer[m][n] = 0x00;
		}
	}
}

/**
 * ************************************************************************
 * @brief 設置坐標像素點數據
 * 
 * @param[in] x  			起始點橫坐標(x:0~127)
 * @param[in] y  			起始點縱坐標(y:0~63)
 * @param[in] set_pixel  	該點的數據  SET_PIXEL = 1, RESET_PIXEL = 0
 * 
 * ************************************************************************
 */
void OLED_SetPixel(signed short int x, signed short int y, unsigned char set_pixel)
{ 
	if (x >= 0 && x < SCREEN_COLUMN && y >= 0 && y < SCREEN_ROW) {
		if(set_pixel){
				ScreenBuffer[y/8][x] |= (0x01 << (y%8));
		}  
		else{
				ScreenBuffer[y/8][x] &= ~(0x01 << (y%8));
		}
	}
}

/**
 * ************************************************************************
 * @brief 屏幕內容取反顯示
 * 
 * @param[in] mode  開關
 * 					開	ON	0xA7	點亮全屏
 *  				關	OFF	0xA6	預設此模式,設置像素點亮
 * 
 * ************************************************************************
 */
void OLED_DisplayMode(unsigned char mode)
{
	WriteCmd(mode);
}

/**
 * ************************************************************************
 * @brief 屏幕亮度調節
 * 
 * @param[in] intensity  亮度大小(0~255),預設為0x7f
 * 
 * ************************************************************************
 */
void OLED_IntensityControl(unsigned char intensity)
{
	WriteCmd(0x81);
	WriteCmd(intensity);
}

/**
 * ************************************************************************
 * @brief 全屏內容偏移指定距離
 * 
 * @param[in] shift_num  偏移距離(0~63)
 * 
 * ************************************************************************
 */
void OLED_Shift(unsigned char shift_num)
{
	for(unsigned char i = 0; i < shift_num; i++)
		{
			WriteCmd(0xd3);//設置顯示偏移,垂直向上偏移
			WriteCmd(i);//偏移量
			HAL_Delay(10);//延時時間
		}
}


/**
 * ************************************************************************
 * @brief 屏幕內容水平方向滾動播放
 * 
 * @param[in] start_page  	開始頁數	(0~7)
 * @param[in] end_page  	結束頁數	(0~7)
 * @param[in] direction  	滾動方向
 * 								左		LEFT	0x27
 * 								右		RIGHT	0x26
 * @note 在開始頁數和結束頁數之間的內容才會滾動播放,且寫命令順序不得改變
 * ************************************************************************
 */
void OLED_HorizontalShift(unsigned char start_page,unsigned char end_page,unsigned char direction)
{
	WriteCmd(0x2e);  //關閉滾動

	WriteCmd(direction);//設置滾動方向
	WriteCmd(0x00);//虛擬位元組設置,預設為0x00
	WriteCmd(start_page);//設置開始頁地址
	WriteCmd(0x05);//設置每個滾動步驟之間的時間間隔的幀頻
	WriteCmd(end_page);//設置結束頁地址
	WriteCmd(0x00);//虛擬位元組設置,預設為0x00
	WriteCmd(0xff);//虛擬位元組設置,預設為0xff

	WriteCmd(0x2f);//開啟滾動-0x2f,禁用滾動-0x2e,禁用需要重寫數據
}


2.3 OLED_Function.h

/**
 * ************************************************************************
 * 
 * @file OLED_Function.h
 * @author zxr
 * @brief OLED功能函數驅動頭文件
 * 
 * ************************************************************************
 * @copyright Copyright (c) 2024 zxr 
 * ************************************************************************
 */
#ifndef _OLED_FUNCTION_H_
#define _OLED_FUNCTION_H_

#include "OLED_IIC_Config.h"

//字元串顯示函數
void OLED_ShowStr(signed short int x, signed short int y, unsigned char ch[], unsigned char TextSize);
//中文漢字顯示函數
void OLED_ShowChinese(signed short int x, signed short int y, unsigned char* ch);
//BMP圖片顯示函數
void OLED_ShowBMP(signed short int x0,signed short int y0,signed short int L,signed short int H,const unsigned char BMP[]);

#endif /* _OLED_FUNCTION_H_ */

2.4 OLED_Function.c

#include "OLED_Function.h"
#include "OLED_Front.h"

/**
 * ************************************************************************
 * @brief 字元串顯示函數
 * 
 * @param[in] x  	起始點橫坐標(0~127)
 * @param[in] y  	起始點縱坐標(0~63)
 * @param[in] ch  	字元串(通過雙引號引入)
 * @param[in] TextSize  字元大小(1:6*8 ;2:8*16)
 * 
 * ************************************************************************
 */
void OLED_ShowStr(signed short int x, signed short int y, unsigned char ch[], unsigned char TextSize)
{ 
	if (x >= 0 && x < SCREEN_COLUMN && y >= 0 && y < SCREEN_ROW) 
	{
		int32_t c = 0;
		unsigned char j = 0;
	
		switch(TextSize)
		{
			case 1:
			{
				while(ch[j] != '\0')
				{
					c = ch[j] - 32;
					if(c < 0)	//無效字元
						break;
					
					if(x >= 125 || (127-x < 6))//一行最大顯示字元數:21位元組顯示,多出兩列,不顯示 || 剩餘列小於6不能顯示完整字元,換行顯示
					{
						x = 0;
						y += 8;//換行顯示
						if(63 - y < 8)	// 不足以顯示一行時不顯示
							break;
					}
					for(unsigned char m = 0; m < 6; m++)
					{
						for(unsigned char n = 0; n < 8; n++)
						{
							OLED_SetPixel(x+m, y+n, (F6x8[c][m] >> n) & 0x01);
						}
					}
					x += 6;
					j++;
				}
			}break;
			case 2:
			{
				while(ch[j] != '\0')
				{
					c = ch[j] - 32;
					if(c < 0)	//無效字元
						break;
					
					if(x >= 127 || (127-x < 8))//16位元組顯示 || 剩餘列小於8不能顯示完整字元,換行顯示
					{
						x = 0;
						y += 16;//換行顯示
						if(63 - y < 16)	// 不足以顯示一行時不顯示
							break;
					}
					for(unsigned char m = 0; m < 2; m++)
					{
						for(unsigned char n = 0; n < 8; n++)
						{
							for(unsigned char i = 0; i < 8; i++)
							{
								OLED_SetPixel(x+n, y+i+m*8, (F8X16[c][n+m*8] >> i) & 0x01);
							}
						}	
					}
					x += 8;
					j++;
				}
			}break;
		}
	}
	OLED_RefreshRAM();
}


/**
 * ************************************************************************
 * @brief 中文漢字顯示函數
 * 
 * @param[in] x  	起始點橫坐標(0~127)
 * @param[in] y  	起始點縱坐標(0~63)
 * @param[in] ch  	漢字字模庫索引
 * 
 * @example OLED_ShowCN(0,0,"字");
 * ************************************************************************
 */
void OLED_ShowChinese(signed short int x, signed short int y, unsigned char* ch)
{
	if (x >= 0 && x < SCREEN_COLUMN && y >= 0 && y < SCREEN_ROW) {
		int32_t  len = 0,offset = sizeof(F16x16_CN[0].index);
		
		while(ch[len] != '\0')
		{
			if(x >= 127 || (127-x < 16))//8個漢字顯示||剩餘列小於16不能顯示完整字元,換行顯示
			{
				x = 0;
				y += 16;
				if(63 - y < 16)	// 不足以顯示一行時不顯示
					break;
			}
					
			//需要處理輸入數據大於顯示數據的問題
			for(unsigned char i = 0; i < sizeof(F16x16_CN)/sizeof(GB2312_CN); i++)
			{
				if(((F16x16_CN[i].index[0] == ch[len]) && (F16x16_CN[i].index[1] == ch[len+1]))){
						for(unsigned char m = 0; m < 2; m++)	//頁
						{
							for(unsigned char n = 0; n < 16; n++) // 列
							{
								for(unsigned char j = 0; j < 8; j++)	// 行
								{
									OLED_SetPixel(x+n, y+j+m*8, (F16x16_CN[i].encoder[n+m*16] >> j) & 0x01);
								}
							}
						}			
						x += 16;
						len += offset;
						break;
				}
				else if(F16x16_CN[i].index[0] == ch[len] && ch[len] == 0x20){
					for(unsigned char m = 0; m < 2; m++)
					{
						for(unsigned char n = 0; n < 16; n++)
						{
							for(unsigned char j = 0; j < 8; j++)
							{
								OLED_SetPixel(x+n, y+j+m*8, (F16x16_CN[i].encoder[n+m*16] >> j) & 0x01);
							}								
						}	
					}			
					x += 16; 
					len++;
					break;
				}
			}
		}
	}
	OLED_RefreshRAM();
}


/**
 * ************************************************************************
 * @brief BMP圖片顯示函數
 * 
 * @param[in] x0  	起始點橫坐標(0~127)
 * @param[in] y0  	起始點縱坐標(0~63)
 * @param[in] L  	BMP圖片寬度
 * @param[in] H  	BMP圖片高度
 * @param[in] BMP  	圖片取模地址
 * 
 * @example OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_0);
 * ************************************************************************
 */
void OLED_ShowBMP(signed short int x0,signed short int y0,signed short int L,signed short int H,const unsigned char BMP[])
{
	if (x0 >= 0 && x0 < SCREEN_COLUMN && x0+L <= SCREEN_ROW &&\
		y0 >= 0 && y0 < SCREEN_COLUMN && y0+H <= SCREEN_ROW) {
		
		unsigned char *p = (unsigned char *)BMP;
		for(signed short int y = y0; y < y0+H; y+=8)
		{
			for(signed short int x = x0; x < x0+L; x++)
			{
				for(signed short int i = 0; i < 8; i++)
				{
					OLED_SetPixel(x, y+i, ((*p) >> i) & 0x01);
				}
				p++;
			}
		}
	}

	OLED_RefreshRAM();
}


2.5 OLED_Front.h

點擊查看代碼

#ifndef _OLED_FRONT_H_
#define _OLED_FRONT_H_


/**
 * ************************************************************************
 * @brief 大小6*8的字元取模庫
 * ************************************************************************
 */
static unsigned char F6x8[][6] =
{
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// sp
	0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,// !
	0x00, 0x00, 0x07, 0x00, 0x07, 0x00,// "
	0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14,// #
	0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12,// $
	0x00, 0x62, 0x64, 0x08, 0x13, 0x23,// %
	0x00, 0x36, 0x49, 0x55, 0x22, 0x50,// &
	0x00, 0x00, 0x05, 0x03, 0x00, 0x00,// '
	0x00, 0x00, 0x1c, 0x22, 0x41, 0x00,// (
	0x00, 0x00, 0x41, 0x22, 0x1c, 0x00,// )
	0x00, 0x14, 0x08, 0x3E, 0x08, 0x14,// *
	0x00, 0x08, 0x08, 0x3E, 0x08, 0x08,// +
	0x00, 0x00, 0x00, 0xA0, 0x60, 0x00,// ,
	0x00, 0x08, 0x08, 0x08, 0x08, 0x08,// -
	0x00, 0x00, 0x60, 0x60, 0x00, 0x00,// .
	0x00, 0x20, 0x10, 0x08, 0x04, 0x02,// /
	0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
	0x00, 0x00, 0x42, 0x7F, 0x40, 0x00,// 1
	0x00, 0x42, 0x61, 0x51, 0x49, 0x46,// 2
	0x00, 0x21, 0x41, 0x45, 0x4B, 0x31,// 3
	0x00, 0x18, 0x14, 0x12, 0x7F, 0x10,// 4
	0x00, 0x27, 0x45, 0x45, 0x45, 0x39,// 5
	0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
	0x00, 0x01, 0x71, 0x09, 0x05, 0x03,// 7
	0x00, 0x36, 0x49, 0x49, 0x49, 0x36,// 8
	0x00, 0x06, 0x49, 0x49, 0x29, 0x1E,// 9
	0x00, 0x00, 0x36, 0x36, 0x00, 0x00,// :
	0x00, 0x00, 0x56, 0x36, 0x00, 0x00,// ;
	0x00, 0x08, 0x14, 0x22, 0x41, 0x00,// <
	0x00, 0x14, 0x14, 0x14, 0x14, 0x14,// =
	0x00, 0x00, 0x41, 0x22, 0x14, 0x08,// >
	0x00, 0x02, 0x01, 0x51, 0x09, 0x06,// ?
	0x00, 0x32, 0x49, 0x59, 0x51, 0x3E,// @
	0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C,// A
	0x00, 0x7F, 0x49, 0x49, 0x49, 0x36,// B
	0x00, 0x3E, 0x41, 0x41, 0x41, 0x22,// C
	0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C,// D
	0x00, 0x7F, 0x49, 0x49, 0x49, 0x41,// E
	0x00, 0x7F, 0x09, 0x09, 0x09, 0x01,// F
	0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A,// G
	0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F,// H
	0x00, 0x00, 0x41, 0x7F, 0x41, 0x00,// I
	0x00, 0x20, 0x40, 0x41, 0x3F, 0x01,// J
	0x00, 0x7F, 0x08, 0x14, 0x22, 0x41,// K
	0x00, 0x7F, 0x40, 0x40, 0x40, 0x40,// L
	0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F,// M
	0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F,// N
	0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E,// O
	0x00, 0x7F, 0x09, 0x09, 0x09, 0x06,// P
	0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
	0x00, 0x7F, 0x09, 0x19, 0x29, 0x46,// R
	0x00, 0x46, 0x49, 0x49, 0x49, 0x31,// S
	0x00, 0x01, 0x01, 0x7F, 0x01, 0x01,// T
	0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F,// U
	0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F,// V
	0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F,// W
	0x00, 0x63, 0x14, 0x08, 0x14, 0x63,// X
	0x00, 0x07, 0x08, 0x70, 0x08, 0x07,// Y
	0x00, 0x61, 0x51, 0x49, 0x45, 0x43,// Z
	0x00, 0x00, 0x7F, 0x41, 0x41, 0x00,// [
	0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55,// 55
	0x00, 0x00, 0x41, 0x41, 0x7F, 0x00,// ]
	0x00, 0x04, 0x02, 0x01, 0x02, 0x04,// ^
	0x00, 0x40, 0x40, 0x40, 0x40, 0x40,// _
	0x00, 0x00, 0x01, 0x02, 0x04, 0x00,// '
	0x00, 0x20, 0x54, 0x54, 0x54, 0x78,// a
	0x00, 0x7F, 0x48, 0x44, 0x44, 0x38,// b
	0x00, 0x38, 0x44, 0x44, 0x44, 0x20,// c
	0x00, 0x38, 0x44, 0x44, 0x48, 0x7F,// d
	0x00, 0x38, 0x54, 0x54, 0x54, 0x18,// e
	0x00, 0x08, 0x7E, 0x09, 0x01, 0x02,// f
	0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C,// g
	0x00, 0x7F, 0x08, 0x04, 0x04, 0x78,// h
	0x00, 0x00, 0x44, 0x7D, 0x40, 0x00,// i
	0x00, 0x40, 0x80, 0x84, 0x7D, 0x00,// j
	0x00, 0x7F, 0x10, 0x28, 0x44, 0x00,// k
	0x00, 0x00, 0x41, 0x7F, 0x40, 0x00,// l
	0x00, 0x7C, 0x04, 0x18, 0x04, 0x78,// m
	0x00, 0x7C, 0x08, 0x04, 0x04, 0x78,// n
	0x00, 0x38, 0x44, 0x44, 0x44, 0x38,// o
	0x00, 0xFC, 0x24, 0x24, 0x24, 0x18,// p
	0x00, 0x18, 0x24, 0x24, 0x18, 0xFC,// q
	0x00, 0x7C, 0x08, 0x04, 0x04, 0x08,// r
	0x00, 0x48, 0x54, 0x54, 0x54, 0x20,// s
	0x00, 0x04, 0x3F, 0x44, 0x40, 0x20,// t
	0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C,// u
	0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C,// v
	0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C,// w
	0x00, 0x44, 0x28, 0x10, 0x28, 0x44,// x
	0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C,// y
	0x00, 0x44, 0x64, 0x54, 0x4C, 0x44,// z
	0x14, 0x14, 0x14, 0x14, 0x14, 0x14,// horiz lines
};


/**
 * ************************************************************************
 * @brief 大小為8*16的字元取模庫
 * ************************************************************************
 */
static unsigned char F8X16[][16]=	  
{
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 0
  0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 1
  0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 2
  0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 3
  0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 4
  0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 5
  0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 6
  0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7
  0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 8
  0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 9
  0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 10
  0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 11
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 12
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 13
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 14
  0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 15
  0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 16
  0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 17
  0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 18
  0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 19
  0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 20
  0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 21
  0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 22
  0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 23
  0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 24
  0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 25
  0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 26
  0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 27
  0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 28
  0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 29
  0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 30
  0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 31
  0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 32
  0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 33
  0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 34
  0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 35
  0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 36
  0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 37
  0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 38
  0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 39
  0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 40
  0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 41
  0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 42
  0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 43
  0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 44
  0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 45
  0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 46
  0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 47
  0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 48
  0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 49
  0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 50
  0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 51
  0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 52
  0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 53
  0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 54
  0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 55
  0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 56
  0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 57
  0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 58
  0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 59
  0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 60
  0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 61
  0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 63
  0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64
  0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 65
  0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 66
  0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 67
  0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 68
  0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 69
  0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 70
  0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 71
  0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 72
  0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 73
  0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 74
  0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 75
  0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 76
  0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 77
  0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 78
  0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 79
  0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 80
  0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 81
  0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 82
  0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 83
  0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 84
  0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 85
  0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 86
  0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 87
  0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 88
  0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 89
  0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 90
  0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 91
  0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 92
  0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 93
  0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
};





/**
 * ************************************************************************
 * @brief 漢字字模數據結構
 * index[] 漢字內碼索引。使用UTF-8編碼格式時為index[3];使用GB2312或GBK編碼格式時為index[2];
 * encoder	點陣碼數據
 * ************************************************************************
 */
typedef struct {     
    char index[2];                                             
    unsigned char encoder[32];                                             
}GB2312_CN;

/**
 * ************************************************************************
 * @brief GB2312_CN 16*16漢字字模庫
 * 取模設置:共陰、列行式、逆向輸出
 * 數組格式參照代碼所示
 * ************************************************************************
 */
static GB2312_CN F16x16_CN[] = {

	{"嵌",
		0x80,0x80,0xEE,0x88,0x88,0x88,0xE8,0x8F,0x08,0x88,0x78,0x48,0x4E,0x40,0xC0,0x00,
		0x00,0x00,0x7F,0x24,0x24,0x24,0x7F,0x00,0x81,0x40,0x30,0x0F,0x30,0x41,0x80,0x00,
	},

	{"入",
		0x00,0x00,0x00,0x00,0x00,0x01,0xE2,0x1C,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
		0x80,0x40,0x20,0x10,0x0C,0x03,0x00,0x00,0x00,0x03,0x0C,0x30,0x40,0x80,0x80,0x00,
	},

	{"式",
		0x10,0x10,0x90,0x90,0x90,0x90,0x90,0x10,0x10,0xFF,0x10,0x10,0x11,0x16,0x10,0x00,
		0x00,0x20,0x60,0x20,0x3F,0x10,0x10,0x10,0x00,0x03,0x0C,0x10,0x20,0x40,0xF8,0x00,
	},

	{"學",
		0x40,0x30,0x11,0x96,0x90,0x90,0x91,0x96,0x90,0x90,0x98,0x14,0x13,0x50,0x30,0x00,
		0x04,0x04,0x04,0x04,0x04,0x44,0x84,0x7E,0x06,0x05,0x04,0x04,0x04,0x04,0x04,0x00,
	},

	{"習",
		0x00,0x02,0x02,0x02,0x12,0x22,0xC2,0x02,0x02,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,
		0x00,0x08,0x18,0x08,0x04,0x04,0x04,0x02,0x02,0x41,0x81,0x40,0x3F,0x00,0x00,0x00,
	},

};




/**
 * ************************************************************************
 * @brief astronaut_x 太空人52*48系列(共10張)  圖像取模 縱向取模,位元組倒序
 * ************************************************************************
 */
static unsigned char astronaut_0[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x40,0xC0,
	0xA0,0x60,0x60,0x60,0xA0,0xC0,0x40,0x40,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x10,0x00,0x00,0x30,0x0C,0x02,0x81,
	0xE0,0xF0,0xF8,0xFC,0xFC,0xFC,0xFC,0xFE,0xFC,0xFC,0xFC,0xF8,0xF8,0xF1,0xE2,0x04,
	0x30,0x80,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,0x11,0x40,0x00,0x0F,
	0x60,0x80,0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
	0xFF,0xFF,0xFF,0xFF,0x60,0x0F,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x01,0x02,0x08,0x10,0x42,0x84,0x04,0x09,0x13,0x17,0x17,0x0F,0x1F,0x6F,
	0x1F,0x1F,0x1F,0x0F,0x07,0x07,0x03,0x00,0x00,0x00,0x02,0x44,0x48,0x90,0x62,0x98,
	0x00,0xE4,0x08,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x01,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
	0x00,0x00,0x00,0x01,0x18,0x40,0x04,0x28,0x20,0x98,0xA4,0xA4,0x18,0x40,0x00,0x02,
	0x00,0x0A,0x04,0x03,0x0C,0xC0,0x00,0x40,0x80,0x01,0x04,0x00,0x00,0x00,0x00,0x00,
	0x00,0x04,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x08,0x10,
	0x42,0x00,0x08,0x38,0x48,0x05,0x24,0x1E,0x09,0x00,0x04,0x00,0x10,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,	
};
static unsigned char astronaut_1[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,
	0xE4,0x60,0x20,0x20,0x20,0x00,0x44,0x44,0x80,0x08,0x10,0x20,0x40,0x80,0x00,0x00,
	0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x8C,0xC2,0xE1,
	0xE3,0xF1,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x01,0x02,0x04,
	0x30,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
	0x7E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
	0xFC,0x00,0x00,0xB0,0x70,0x4F,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,
	0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x87,0x07,0x0F,0x1F,0x1F,0x1F,0x1F,0x1F,0x3F,
	0x9F,0x1F,0x1F,0x0B,0x00,0x04,0x03,0x00,0x00,0x04,0x00,0x08,0x01,0x40,0x22,0x14,
	0x08,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,0x02,0x08,0x10,0x40,
	0x80,0x00,0x00,0x00,0x01,0x09,0x26,0xB0,0x20,0xC0,0xA0,0x80,0x00,0x41,0x08,0x05,
	0x00,0x08,0x05,0x03,0x08,0x80,0x00,0x00,0x00,0x01,0x04,0x08,0x00,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,0x01,0x00,0x00,0x01,
	0x00,0x80,0x08,0x08,0x29,0x26,0x0E,0x00,0x09,0x00,0x05,0x00,0x00,0x02,0x84,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	
};
static unsigned char astronaut_2[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x40,0x00,
	0x20,0x20,0x20,0x20,0x20,0x00,0x40,0x44,0x80,0x08,0x10,0x20,0x40,0x00,0x00,0x00,
	0x00,0x00,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB0,0x9C,0xCE,0xC7,
	0xC1,0xC1,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x04,
	0x30,0x81,0x02,0x04,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x04,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,
	0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0xF0,0x00,0x00,
	0x00,0x00,0x00,0x80,0xEC,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x07,0x0F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
	0x7F,0x93,0x10,0x08,0x04,0x04,0x03,0x00,0x00,0x10,0x21,0x40,0x82,0x44,0x28,0x10,
	0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x07,0x1C,0x70,0xA0,0xE0,0x80,0x02,0x92,0x12,0x00,0x00,
	0x10,0x09,0x06,0x03,0x08,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x40,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x10,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x01,
	0x04,0x00,0x08,0x08,0x2F,0x22,0x1E,0x00,0x09,0x00,0x05,0x00,0x00,0x00,0x00,0x10,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	
};
static unsigned char astronaut_3[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x40,0x40,
	0x20,0x20,0x20,0x20,0x20,0x00,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x7C,0x8E,0x81,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0xC4,
	0x30,0xC0,0x02,0x04,0x10,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x20,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x80,0x00,0x0F,
	0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xF8,0xE0,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x80,0xE2,0x2F,0x20,0x20,0x40,0x00,0x00,0x01,0x04,0x10,0x20,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x02,0x08,0x10,0x00,0x03,0x07,0x07,0x0F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
	0x10,0xF0,0x10,0x08,0x04,0x04,0x03,0x20,0x42,0x06,0x0C,0x38,0xE0,0xC1,0x02,0x04,
	0x90,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x10,0x20,0x18,0xA4,0xA4,0x18,0x01,0x06,0x08,
	0x10,0x01,0x0D,0x07,0xE0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
	0x01,0x02,0x00,0x04,0x18,0x24,0x22,0x11,0x01,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x80,0x00,0x06,0x00,0x00,0x00,0x00,
	
};
static unsigned char astronaut_4[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x40,0x44,
	0x24,0x24,0x20,0x22,0x20,0x20,0x44,0x44,0x80,0x08,0x10,0x20,0x40,0x00,0x00,0x00,
	0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xEC,0x02,0x01,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x1B,0x04,
	0x18,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,
	0x7C,0xFC,0xF8,0xF8,0xF0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x80,0xE0,0x1F,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x07,0x0F,0x0F,0x1F,0x10,0x10,0x10,0x10,
	0x10,0xF0,0x90,0x08,0x38,0x74,0xC2,0x81,0x00,0x00,0x00,0x00,0x01,0x04,0x08,0x10,
	0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x40,0x00,0x00,0x00,0x02,0x02,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x08,0x20,0x18,0x00,0x00,0x00,0x02,0x04,0x10,0x60,0x80,
	0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x16,0x38,0x70,0xF0,0x83,0x8F,0x94,0x28,0x08,
	0x08,0x14,0xC6,0x19,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x30,
	0x00,0x00,0x00,0x00,0x02,0x04,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x01,0x02,0x04,0x04,0x28,0x04,0x23,0x03,0x11,0x0E,0x45,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	
};
static unsigned char astronaut_5[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x40,0x40,
	0x20,0x20,0x20,0x20,0x20,0x60,0x44,0xC4,0x84,0x08,0x10,0x20,0x4C,0x80,0x00,0x00,
	0x00,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x30,0x1C,0x1E,0x01,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x05,0x0A,0x0C,
	0x30,0xC1,0x02,0x0C,0x10,0x60,0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x05,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,
	0x70,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x80,0xF0,0x4F,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x01,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x0C,0x08,0x10,0x10,0x10,0x00,0x30,0xA0,
	0x30,0xD0,0x08,0x04,0x02,0x02,0x01,0x00,0x00,0x03,0x06,0x1C,0x38,0xE1,0xE2,0x9C,
	0x08,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
	0x00,0x00,0x00,0x03,0x18,0x60,0x07,0x3E,0x28,0xB0,0xC0,0x80,0xA0,0x10,0x08,0x00,
	0x04,0x8A,0x04,0x03,0x0C,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x24,
	0x28,0x00,0x00,0x00,0x03,0x04,0x18,0x60,0x80,0x00,0x01,0x00,0x01,0x01,0x00,0x01,
	0x02,0x04,0x08,0x38,0x48,0x47,0x26,0x1E,0x09,0x09,0x04,0x02,0x00,0x00,0x02,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	
};
static unsigned char astronaut_6[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x40,0x40,
	0x20,0x20,0x60,0xA0,0x20,0x60,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x20,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x0C,0x02,0x01,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x3F,0xFF,0xFF,0xFF,0xFE,0xFC,
	0xF8,0xC0,0x00,0x00,0x10,0x20,0x80,0x40,0x40,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
	0x30,0xC0,0x60,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x01,0x03,0x07,0x87,0x6F,0x0F,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x10,0x20,0x80,
	0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x05,0x08,0x08,0x10,0x10,0x10,0x90,0x60,
	0x30,0x10,0x10,0x18,0x48,0x14,0x42,0x01,0x09,0x20,0x42,0x84,0x48,0x30,0x40,0x00,
	0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x02,0x08,0x10,0x40,0x00,0x00,0x01,0x84,0x89,0x64,0x0C,0x92,0x21,
	0x02,0x0C,0x01,0x0A,0xC0,0x00,0x00,0x08,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,0x01,0x00,0x01,0x00,0x00,
	0x01,0x02,0x04,0x39,0x4A,0x3C,0x22,0x12,0x01,0x08,0x07,0x00,0x00,0x00,0x00,0x00,
	0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	
};
static unsigned char astronaut_7[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x40,0xC0,
	0xE0,0x60,0x60,0x20,0xA0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x0C,0x02,0x01,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,
	0xF0,0x80,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x80,0x00,0x0F,
	0x60,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0F,0x0F,0x1F,
	0x1F,0x3F,0x3F,0xBF,0x7F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x80,
	0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,
	0x00,0x00,0x02,0x08,0x10,0x00,0x03,0x04,0x00,0x0E,0x14,0x18,0x10,0x90,0x60,0x20,
	0x30,0x90,0xD0,0x08,0x04,0x04,0x82,0x01,0x01,0x00,0x82,0x44,0x08,0x10,0xC0,0x00,
	0x00,0x00,0x00,0x00,0x01,0x04,0x0B,0x20,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
	0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x02,0x04,0x10,0x40,0x81,0x07,0x1C,0xB0,0xF0,0x01,0x8C,0x08,0x63,0x00,
	0x00,0x01,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x01,0x02,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x01,
	0x02,0x00,0x04,0x00,0x18,0x24,0x20,0x12,0x01,0x09,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	
};
static unsigned char astronaut_8[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xC0,
	0x24,0x20,0x20,0x20,0xA0,0xC0,0xC4,0xC4,0x80,0x08,0x10,0x20,0x40,0x80,0x00,0x06,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x0C,0x02,0x07,
	0x03,0x01,0x00,0xE0,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,
	0xF0,0x80,0x00,0x00,0x00,0x00,0x08,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,
	0x60,0x80,0x00,0x00,0x00,0x00,0x00,0x03,0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,
	0xFF,0xFF,0xFF,0xFF,0xFF,0x8F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x04,0x04,0x08,0x00,0x10,0x18,0x18,0x10,0x20,
	0x10,0x10,0x11,0x09,0x05,0x04,0x03,0x00,0x00,0x00,0x03,0x04,0x0A,0xA4,0xE8,0x10,
	0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0C,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x10,0x20,0x80,
	0x00,0x00,0x00,0x00,0x04,0x20,0x40,0x23,0x18,0x20,0x80,0x80,0x0A,0x41,0x09,0x00,
	0x00,0x08,0x84,0x03,0x08,0xA0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,
	0x00,0x00,0x00,0x00,0x02,0x04,0x10,0x20,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x81,
	0x04,0x00,0x08,0x30,0x48,0x04,0x23,0x17,0x09,0x04,0x03,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
	
};
static unsigned char astronaut_9[]=
{
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x40,0x40,
	0x20,0x20,0x20,0x20,0x20,0x00,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0x88,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x7C,0x0E,0x07,
	0x02,0xC0,0xF0,0xF8,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,
	0xF0,0x80,0x02,0x04,0x10,0x20,0x80,0x00,0x06,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
	0x60,0x80,0x00,0x00,0x00,0x0F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
	0xFF,0xFF,0xFF,0xFF,0x7F,0x8F,0x00,0x00,0x00,0x00,0x00,0x01,0x04,0x00,0x00,0x08,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x04,0x04,0x08,0x00,0x10,0x11,0x11,0x23,0x23,
	0x13,0x13,0x93,0x0B,0x07,0x07,0x03,0x00,0x00,0x00,0x02,0x45,0x0A,0x64,0xC8,0x10,
	0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,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,0x10,0x40,0x01,0x24,0x10,0x40,0x14,0xA0,0x04,0x00,0x00,0x01,
	0x02,0x88,0x04,0x07,0xB0,0x00,0x00,0x00,0x10,0x00,0x00,0x00,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,0x04,0x10,0x20,0x80,0x00,0x01,0x02,0x02,0x01,0x01,0x02,
	0x04,0x00,0x08,0x30,0x48,0x45,0x26,0x1A,0x01,0x08,0x03,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};



#endif

3 功能驗證

首先在main.c中引入頭文件

/* USER CODE BEGIN Includes */
#include "OLED_IIC_Config.h"
#include "OLED_Function.h"
#include "OLED_Front.h"
/* USER CODE END Includes */

隨即根據要求在main函數中添加對應功能函數即可

3.1 顯示英文字元

int main(void)
{
  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_I2C1_Init();

  OLED_Init();  //OLED初始化
  OLED_ShowStr(0,0,"OLED-TEXT",1);
  OLED_ShowStr(0,16,"OLED-TEXT",2);
}

3.2 顯示中文漢字

int main(void)
{
  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_I2C1_Init();

  OLED_Init();  //OLED初始化
  OLED_ShowChinese(0,16,"嵌");
  OLED_ShowChinese(16,16,"入");
  OLED_ShowChinese(32,16,"式");
}

註意】使用時應將編譯器編碼選項選擇為GBK系列,否則編譯報錯,尤其註意通過keil修改後,再用vscode打開看見有亂碼時,一定檢查一下編譯器的編碼格式是否為GBK系列

3.3 顯示內容垂直偏移指定距離

int main(void)
{
  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_I2C1_Init();

  OLED_Init();  //OLED初始化
  OLED_ShowStr(0,40,"OLED-TEXT",1);
  OLED_ShowChinese(0,48,"嵌");
  OLED_ShowChinese(16,48,"入");
  OLED_ShowChinese(32,48,"式");
  OLED_Shift(20);
}

3.4 顯示內容水平迴圈滾動

int main(void)
{
  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_I2C1_Init();

  OLED_Init();  //OLED初始化
  OLED_ShowStr(0,0,"OLED-TEXT",1);
  OLED_ShowChinese(0,16,"嵌");
  OLED_ShowChinese(16,16,"入");
  OLED_ShowChinese(32,16,"式");
  OLED_HorizontalShift(0,3,RIGHT);
}

3.3 顯示BMP圖片

int main(void)
{
  HAL_Init();
  SystemClock_Config();
  MX_GPIO_Init();
  MX_I2C1_Init();

  OLED_Init();  //OLED初始化

  while (1)
  {
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_0);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_1);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_2);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_3);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_4);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_5);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_6);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_7);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_8);
    OLED_ShowBMP(0,0,52,48,(unsigned char *)astronaut_9);
  }
}

本文來自博客園,作者:晚風也溫柔,轉載請註明原文鏈接:https://www.cnblogs.com/zxr-blog/p/18002669


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 使用了標準庫頭文件 <setjmp.h>中的 setjmp 和 longjmp兩個函數,構建了一個簡單的查詢式協作多任務系統,支持獨立棧和共用棧兩種任務。 其中涉及到獲取和設置棧的地址操作,因此還需要根據不同平臺提供獲取和設置棧的地址操作(一般是彙編語言,因為涉及到寄存器) 該調度系統僅運行在一個實 ...
  • TTime —— 一款簡潔高效的輸入、截圖、劃詞翻譯軟體。支持輸入翻譯、截圖翻譯、劃詞翻譯、懸浮球翻譯、截圖OCR、靜默截圖OCR、剪貼板監聽翻譯。 ...
  • 主機發現 arp-scan -l ┌──(root㉿kali)-[~] └─# arp-scan -l Interface: eth0, type: EN10MB, MAC: 00:0c:29:6b:ed:27, IPv4: 192.168.100.251 Starting arp-scan 1.1 ...
  • 大家好,我是痞子衡,是正經搞技術的痞子。今天痞子衡給大家介紹的是SRC_SBMRx寄存器對於定位i.MXRT1xxx離線無法啟動問題的意義。 最近有一位開源社區大佬在使能 RT1050 BEE 加密過程中遇到無法啟動問題,折騰到一度崩潰,甚至想要棄坑。痞子衡哪能讓這位“老鄉”跑掉,連忙給予緊急支持, ...
  • 一直知道 OpenWrt 經常拿來做軟路由軟體。最近買了個二手小主機升騰 C92 來做旁路由伺服器,其被歸為瘦客戶機一類,感覺和工控機差不多,現價百元以內。想就著這個機會,瞭解體驗一下 OpenWrt。 ...
  • 封裝WINDOWS10系統 一、準備工具: 1、安裝NTLite。下載鏈接:https://www.ntlite.com/download/ 2、準備一個ISO的PE例如:FirPE。下載鏈接https://firpe.cn/page-247 3、安裝VMware 4、下載封裝工具Easy Sysp ...
  • 瀏覽器每次打開都有個煩人的提示要獲取將來的 microsoft edge 更新,需要 macos 10.15 或更高版本,找了很久也沒有解決辦法,有 windows 端的解決方案,有禁止更新的解決方案,就是沒有 Mac 上如何避免這個告警的方案,於是走上 Edge 定製化之旅。 效果 使用前後對比 ...
  • 在 Linux 中,你可以使用 alias 命令來設置別名。別名允許你為常用的命令創建自定義的縮寫或快捷方式。這些別名會存在於當前會話中,如果你希望使別名永久生效,可以將其添加到你的 shell 配置文件中(例如 .bashrc、.bash_profile、.zshrc 等)。 1、查看已有別名 通 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...