首页 > 其他分享 >基于STM32设计汽车空调自动控温系统(hal库)

基于STM32设计汽车空调自动控温系统(hal库)

时间:2024-07-30 16:28:33浏览次数:16  
标签:0x40 hal 0x04 0x20 0x00 0x01 STM32 0x08 汽车空调

一、前言

1.1项目介绍
【1】项目功能介绍

汽车空调自动控温系统是一个集成了先进传感技术,智能控制算法智能化系统。该系统指在通过自动感知车内温度变化,并根据调节空调的运行状态,从而保证车内气温保持在驾驶员和乘客所设定的属实范围之内。此外,该系统具备多种实用功能,以满足不同用户的个性化需求。

在该系统中,采用了STM32F103C8T6作为主控芯片,进行采集参数,并根据温度的上限值、下限值控制空调的启动和关闭。实现车内温度的自动调节功能。

【2】项目硬件模块组成

此自动控温检测系统的硬件模块主要由以下几个部分组成

(1) 主控芯片:采用了STM32F103C8T6,作为系统的核心控制单元,负责数据采集、处理和控制策略的执行。

(2) 温度传感器:用于检测并采集车内的温度,并将数据传给主控制芯片进行处理。

(3) 空调控制模块:当温度超过上限值时,主控芯片通过电路控制空调开关启动空调,进行降温操作;当温度达到下限值是,主控芯片通过控制电路控制空调开关关闭空调。

(4) 温度显示模块:每隔3秒,主控芯片将采集到的温度传给显示模块,进行温度显示。

(5) 温度告警模块:当温度超出上限温度时,短时间内告警器进行告警提示。

1.2设计思路

(1) 传感器数据采集:通过使用温度传感器,实时采集车内温度数据,并将数据传输给STM32主控芯片。

(2) 数据处理与判断:STM32主控芯片接收到传感器数据后,进行数据处理和判断,根据预设阀值进行控制和提示。

(3) 控制措施实施:如果温度高于范围,主控芯片控制空调打开,进行降温,同时进行短时告警提示;如果温度低于范围,主控芯片控制空调关闭。

(4)数据展示:主控芯片将处理后的温度数据,通过显示模块,进行温度显示。

整体设计思路

(1) 确定系统需求:根据车内的温度检测需求,确实需要实时检测温度信息,并根据阈值进行相应的控制和提示。

(2) 硬件选型:选择STM32F103C8T6作为主控芯片,具备足够的处理能力和接口资源;ds18b20作为温度传感器进行温度的检测;蜂鸣器作为警告设备;oled显示屏作为数据的展示设备;再发生警报时led灯闪烁;马达驱动风扇转动。

(3) 传感器数据采集:通过STM32F103C8T6的GPIO接口连接传感器,采集温度数据。

(4) 数据处理与控制:将采集到的传感器数据进行处理,判断是否超过阀值。如果温度高于范围,主控芯片控制空域打开,进行降温,同时进行短时告警提示;如果温度低于范围,主控芯片控制空调打开。

(5) 数据展示设计:通过显示屏显示实时数据。

(6) 系统测试与优化:对整个系统进行测试,确保传感器数据采集准确可靠,控制和提示功能正常运作。根据测试结果进行优化和调整,提高系统的稳定性刚和性能。

通过以上的设计思路,能够实现基于stm32的汽车空调控温系统的功能,提高车内温度的范围,增加舒适度。同时,通过显示屏(OLED)将温度进行实时显示,当温度超过设定的值时,蜂鸣器会发出警报,led灯会闪烁,马达会驱动电机开始转动。

1.3 项目开发背景
【1】项目项目实战应用意义

(1) 提高驾驶舒适度

智能温度调节:通过内置的高精度温度传感器和智能控制算法,系统能够实时感知车内温度,并自动调整空调的制冷/制热功能,确保车内温度维持在驾驶员和乘客所设定的舒适范围内。这大大减少了手动调节的繁琐,提高了驾驶的便捷性和舒适度。

(2)节能环保

系统采用先进的节能技术,如经济运行控制功能,在车外温度与设定车内温度相近时,智能缩短制冷压缩机的工作时间甚至完全停止其运转,从而实现节能目标。

(3)提升行车安全性

车内内置温度传感器,可实时监测车内温度。确保车内温度符合要求。这有助于减少因温度过高引起的不适感,提高行车安全性要求

【2】市场调研

基于STM32设计的汽车空调控温系统,实时检测车内温度及进行动态调节,以确保车内温度符合要求。该系统的设计和实现涉及多个技术领域,包括传感器技术、数据处理和控制技术及显示技术等。

一、市场规模与增长趋势空调

  1. 市场规模:根据权威数据,至2024年,全球新能源汽车空调系统市场规模已攀升至数十亿美元,显示出该市场的巨大潜力和广阔前景。作为新能源汽车空调系统的核心组成部分,自动控温系统也受益于这一市场规模的扩大。

  2. 增长趋势:随着新能源汽车市场的快速发展,汽车空调自动控温系统的市场规模亦呈现出稳步增长的趋势。这一趋势的推动力主要源自新能源汽车市场的快速扩张以及消费者对汽车舒适性和能效要求的不断提升。

二、技术发展趋势

  1. 智能化:随着车联网技术的发展,智能汽车空调系统将逐渐成为市场的主流。通过与其他汽车系统的互联,实现自动调节、预热/预冷等功能,为驾驶者提供更加便捷和舒适的体验。汽车空调自动控温系统作为其中的关键部分,智能化水平也在不断提高。

  2. 节能环保:随着全球环保意识的提高和节能减排政策的推行,汽车空调系统的环保和节能性能越来越受到关注。自动控温系统通过优化控制算法和采用环保材料,实现了更高的能效比和更低的能耗,满足了市场对节能环保的需求。

  3. 电动化:随着电动汽车市场的快速发展,电动化空调器也迎来了新的机遇。汽车空调自动控温系统作为电动化空调器的核心部分,通过采用电动压缩机等电动元件,实现了更高的能效和更低的噪音,满足了电动汽车对空调系统的特殊要求。

三、市场竞争格局

  1. 品牌竞争:汽车空调自动控温系统市场品牌众多,竞争激烈。一些具有技术和品牌优势的企业在市场上占据主导地位,如日本、美国和欧洲等发达国家和地区的知名品牌。同时,随着国内汽车工业的快速发展,一些国内品牌也逐渐崭露头角。

  2. 技术创新:为了在激烈的市场竞争中脱颖而出,企业不断加大研发投入,推出更加先进和高效的汽车空调自动控温系统。例如,通过优化控制算法、提高传感器精度、采用新型环保材料等手段,提高系统的能效比和可靠性。

四、市场挑战与机遇

  1. 挑战:汽车空调自动控温系统市场面临着原材料成本上涨、技术瓶颈等挑战。同时,新能源汽车市场的政策变化和消费者接受度波动也对市场产生了一定影响。

  2. 机遇:随着新能源汽车市场的不断扩大和消费者对汽车舒适性和能效要求的提高,汽车空调自动控温系统市场将迎来更加广阔的发展空间和机遇。同时,智能化、节能环保等技术的发展也将为市场带来新的增长点。

综上所述,汽车空调自动控温系统市场具有巨大的潜力和广阔的前景。面对市场竞争和挑战,企业需要加强技术创新和品牌建设,提高产品质量和竞争力,以应对市场竞争和满足消费者需求。

【3】摘要

本文介绍了一种基于STM32的汽车空调监测系统,旨在通过高科技手段解决汽车空调自动控温。系统集成了温度检测及告警于一体,利用先进的传感器技术实现实时数据采集。当监测数值超出预设标准时,系统自动打开空调,进行调温。同时主控芯片将所有监测数据被实时显示在屏幕上。

关键字:

  • STM32F103C8T6

  • 蜂鸣器

  • 温度传感器

  • 控制模块

  • OLED显示屏

  • 电机驱动

1.4 开发工具的选择

STM32的编程语言选择C语言,C语言执行效率高,大学里主学的C语言,C语言编译出来的可执行文件最接近于机器码,汇编语言执行效率最高,但是汇编的移植性比较差,目前在一些操作系统内核里还有一些低配的单片机使用的较多,平常的单片机编程还是以C语言为主。C语言的执行效率仅次于汇编,语法理解简单、代码通用性强,也支持跨平台,在嵌入式底层、单片机编程里用的非常多,当前的设计就是采用C语言开发。

开发工具选择Keil,keil是一家世界领先的嵌入式微控制器软件开发商,在2015年,keil被ARM公司收购。因为当前芯片选择的是STM32F103系列,STMF103是属于ARM公司的芯片构架、Cortex-M3内核系列的芯片,所以使用Kile来开发STM32是有先天优势的,而keil在各大高校使用的也非常多,很多教科书里都是以keil来教学,开发51单片机、STM32单片机等等。目前作为MCU芯片开发的软件也不只是keil一家独大,IAR在MCU微处理器开发领域里也使用的非常多,IAR扩展性更强,也支持STM32开发,也支持其他芯片,比如:CC2530,51单片机的开发。从软件的使用上来讲,IAR比keil更加简洁,功能相对少一些。如果之前使用过keil,而且使用频率较多,已经习惯再使用IAR是有点不适应界面的。

图片

1.5 系统功能总结
系统功能描述
实时监测系统能持续监测车内的温度数据。
自动降温当车内温度高于阈值时,自动开启空调进行调温。
告警提示当车内温度高于阈值时,自动触发告警功能,进行短暂提示
数据显示通过OLED显示屏,实时显示车内温度。

二、硬件选型

2.1 STM32开发板

主控CPU采用STM32F103C8T6,这颗芯片包括20KB SRAM、128 KB Flash、3个通用定时器、1个高级定时器、2个通用IO口、3个串口、1个DMA控制器、1个USB、3个12位ADC、1个12位DAC等接口,芯片属于小容量类型,配置均衡,整体符合硬件选型设计。

2.2 PCB板

2.3 母对母杜邦线(X2)

作用: 连接模块与单片机。

2.4 DS18B20温度传感器

三资源分析
1、温度采集资源分析
DS18B20STM32F103C8T6备注
DQ:PA11管脚连接到微控制器的GPIO引脚,用于单总线通信
VCCVCC电源脚连接到微控制器的供电电源,通常为3.3V或5V
GNDGND脚连接到微控制器的地
2、OLED显示资源分析
IICSTM32F103C8T6备注
IIC SDAPB7管脚连接到微控制器的I2C数据线(例如STM32的SDA引脚)
IIC SCLPB6管脚连接到微控制器的I2C时钟线(例如STM32的SCL引脚)
GNDGND脚连接到微控制器的地
VCCVCC电源脚连接到微控制器的供电电源,通常为3.3V或5V
3、蜂鸣器资源分析
蜂鸣器STM32F103C8T6备注
BEEPPB0管脚连接到微控制器的GPIO引脚,用于控制蜂鸣器的工作状态
VCC输出引脚VCC电源脚连接到电源正极(一般为3.3V或5V)
4、LED灯资源分析
LED灯STM32F103C8T6备注
LED1PA0管脚连接到LED的正极,用于控制LED的开关状态
GNDGND管脚连接到电源的地
VCCVCC电源管脚连接到电源的正极,通常为3.3V或5V
5、电机资源分析
电机STM32F103C8T6备注
MOTO IN1PB8管脚连接到微控制器的GPIO引脚,控制电机的运行方向或速度
VCCVCC电源管脚连接到电源的地,也可以连接到微控制器的地
GNDGND管脚连接到电源的地

四、STM32硬件端代码设计

4.1温度检测代码
ds18b20.h
#ifndef __DS18B20_H
#define __DS18B20_H
​
#include "./SYSTEM/sys/sys.h"
​
#define DS18_GPIO_PORT  GPIOA
#define DS18_GPIO_PIN       GPIO_PIN_11
#define DS18_GPIO_CLK_ENABLE()  do{ __HAL_RCC_GPIOA_CLK_ENABLE();}while(0)
​
#define DQ_OUT(x)   do{x ? HAL_GPIO_WritePin(DS18_GPIO_PORT,DS18_GPIO_PIN,GPIO_PIN_SET):\
                                             HAL_GPIO_WritePin(DS18_GPIO_PORT,DS18_GPIO_PIN,GPIO_PIN_RESET);}while(0)
​
#define DQ_IN       HAL_GPIO_ReadPin(DS18_GPIO_PORT,DS18_GPIO_PIN)                                           
                            
uint8_t ds18b20_init(void);
float ds18b20_get_temperature(void);                                     
#endif
                                             
​
​
ds18b20.c
#include "./BSP/DS18B20/ds18b20.h"
#include "./SYSTEM/delay/delay.h"
​
void ds18b20_reset(void)
{
    DQ_OUT(0);//拉低DQ,复位
    delay_us(750);//延时750us
    DQ_OUT(1);//DQ=1,释放总线
    delay_us(15);//延时15us
}
​
uint8_t ds18b20_check(void)
{
    uint8_t retry,rval=0;//定义变量
    while(DQ_IN && retry<200)
    {
        retry++;
        delay_us(1);
    }//等待DQ变低,等待200us
    if(retry>=200)//超时
    {
        rval=1;
    }   else{
            retry=0;
        while(!DQ_IN && retry < 240)
        {
            retry++;
            delay_us(1);
        }//等待DQ变高,等待240us
        if(retry >= 240)//超时
        {
            rval=1;
        }
    }
    return rval;
}
​
uint8_t ds18b20_init(void)
{
    GPIO_InitTypeDef g_ds18_init_struct;
    
​
    DS18_GPIO_CLK_ENABLE();
    
    g_ds18_init_struct.Pin=DS18_GPIO_PIN;
    g_ds18_init_struct.Mode=GPIO_MODE_OUTPUT_OD;        //开漏输出
    g_ds18_init_struct.Pull=GPIO_PULLUP;                        //上拉
    g_ds18_init_struct.Speed=GPIO_SPEED_FREQ_HIGH;//高速
    
    HAL_GPIO_Init(DS18_GPIO_PORT,&g_ds18_init_struct);//初始化DS18B20引脚
    
    ds18b20_reset();
​
  return ds18b20_check();
}
​
void ds18b20_write_0(void)
{
    DQ_OUT(0);//拉低DS18B20_DQ
    delay_us(60);//延时60us
    DQ_OUT(1);//释放DS18B20_DQ
    delay_us(2);//延时2us
}
​
void ds18b20_write_1(void)
{
    DQ_OUT(0);//拉低DS18B20_DQ
    delay_us(2);//延时2us
    DQ_OUT(1);//释放DS18B20_DQ
    delay_us(60);//延时60us
}
​
void ds18b20_write_byte(uint8_t data)//读取一个字节
{
    uint8_t j;
    
​
    for (j=0;j<8;j++)
    {
        if(data & 0x01)
        {
            ds18b20_write_1();//write 1
        }else{
            ds18b20_write_0();//write 0
        }
        data >>=1;//右移,获取高一位数据
    }
​
}
uint8_t ds18b20_read_bit(void)
{
    uint8_t data=0;
    
​
    DQ_OUT(0);
    delay_us(2);
    DQ_OUT(1);
    delay_us(12);
    
    if(DQ_IN)
    {
        data=1;
    }
    delay_us(50);
    return data;
​
}
​
uint8_t ds18b20_read_byte(void)
{
    uint8_t i, b, data = 0;
    
​
    for (i = 0; i < 8; i++)
    {
    /* 先输出低位数据 ,高位数据后输出 */
    b = ds18b20_read_bit();
    /* 填充data的每一位 */
    data |= b << i;
    }
    return data;
​
}
​
float ds18b20_get_temperature(void)
{
    uint8_t TL, TH;
    uint16_t temp = 0;
    float temperature = 0;
    float value;
    /* 1、初始化 */
    ds18b20_reset();
    ds18b20_check();
    /* 2、发送ROM命令 */
    ds18b20_write_byte(0xCC);
    /* 3、发送DS18B20操作命令 */
    ds18b20_write_byte(0x44);
    /* 4、初始化 */
    ds18b20_reset();
    ds18b20_check();
    /* 5、发送ROM命令 */
    ds18b20_write_byte(0xCC);
    /* 6、发送DS18B20操作命令 */
    ds18b20_write_byte(0xBE); /* 读取RAM命令 */
    /* 7、读取两个字节数据 */
    TL = ds18b20_read_byte();
    TH = ds18b20_read_byte();
    /* 8、温度数据运算 (正温度)*/
    temp = TL + (TH << 8);
    if((temp&0xf800)==0xf800)
    {   
    temp=(~temp)+1;
    value=temp*(-0.0625);
    }
    else
    {
    value=temp*0.0625;
    }
    return value;
}
4.2蜂鸣器代码
BEEP.h
#ifndef __FENGMINGQI_H
#define __FENGMINGQI_H
​
#include "./SYSTEM/sys/sys.h"
​
#define BEEP_GPIO_PORT      GPIOB
#define BEEP_GPIO_PIN           GPIO_PIN_0
#define BEEP_GPIO_CLK_ENABLE()  do{ __HAL_RCC_GPIOB_CLK_ENABLE();}while(0)
​
#define BEEP(x)     do{x ? HAL_GPIO_WritePin(BEEP_GPIO_PORT,BEEP_GPIO_PIN,GPIO_PIN_SET):\
                                                 HAL_GPIO_WritePin(BEEP_GPIO_PORT,BEEP_GPIO_PIN,GPIO_PIN_RESET);}while(0)
​
#define BEEP_TOGGLE()  do{HAL_GPIO_TogglePin(BEEP_GPIO_PORT, BEEP_GPIO_PIN);}while(0)       
​
void beep_init(void);
​
#endif
BEEP.c
#include "./BSP/FENGMINGQI/fengmingqi.h"
​
void beep_init(void)
{
    GPIO_InitTypeDef gpio_init_struct;
    
​
    __HAL_RCC_GPIOB_CLK_ENABLE();
    
    gpio_init_struct.Pin = GPIO_PIN_0;
    gpio_init_struct.Mode = GPIO_MODE_OUTPUT_PP;
    gpio_init_struct.Speed = GPIO_SPEED_FREQ_HIGH;
    
    HAL_GPIO_Init(GPIOB,&gpio_init_struct);//初始化GPIOB的端口
    
    HAL_GPIO_WritePin(GPIOB,GPIO_PIN_0,GPIO_PIN_SET);
​
}
4.3LED灯代码
LED.h
#ifndef __LED_H
#define __LED_H
​
#include "./SYSTEM/sys/sys.h"
​
//需要将硬件映射过来
​
​
#define LED_GPIO_PORT       GPIOA
#define LED_GPIO_PIN            GPIO_PIN_0
#define LED_GPIO_CLK_ENABLE()     do{ __HAL_RCC_GPIOA_CLK_ENABLE();}while(0)
//GPIO_PIN_SET代表 1(高电频)GPIO_PIN_SET 0(低电频)
#define LED(x)      do{  x ? HAL_GPIO_WritePin(LED_GPIO_PORT,LED_GPIO_PIN,GPIO_PIN_SET): \
                             HAL_GPIO_WritePin(LED_GPIO_PORT,LED_GPIO_PIN,GPIO_PIN_RESET); \
                                            }while(0)
                                                            
#define LED_TOGGLE()  do{HAL_GPIO_TogglePin(LED_GPIO_PORT, LED_GPIO_PIN);}while(0)
​
//函数或者变量声明
void led_init(void);
​
#endif
LED.c
#include "./BSP/LED/led.h"
​
void led_init(void)
{
    GPIO_InitTypeDef gpio_init_struct;//定义一个名为gpio_init_struct的结构体
    
​
    __HAL_RCC_GPIOA_CLK_ENABLE();//使能时钟
    
    gpio_init_struct.Pin = GPIO_PIN_0;//电路图的第P0个管脚是LED的第一盏灯
    gpio_init_struct.Mode = GPIO_MODE_OUTPUT_PP;//推挽输出模式,推挽输出模式是最常见的GPIO输出模式。在该模式下,引脚可以输出高电平或低电平,并且具有一定的驱动能力。
    //gpio_init_struct.Pull= GPIO_PIN_5;//pull是控制上下拉的,我们F1作为输出的话是进制上下
    gpio_init_struct.Speed = GPIO_SPEED_FREQ_LOW;//这是控制速度的,我们这里给的是一个低速
    
    HAL_GPIO_Init(GPIOA,&gpio_init_struct);//用于初始化指定的GPI引脚
    
    HAL_GPIO_WritePin(GPIOA,GPIO_PIN_0,GPIO_PIN_SET);
                                                                                                        GPIO_PIN_SET指的将指定的引脚设置为高电平*/    
​
}
4.4电机代码
MOTOR.h
#ifndef __DIANJI_H
#define __DIANJI_H
​
#include "./SYSTEM/sys/sys.h"
​
#define DIANJI_GPIO_PORT        GPIOB
#define DIANJI_GPIO_PIN         GPIO_PIN_8
#define DIANJI_GPIO_CLK_ENABLE()    do{ __HAL_RCC_GPIOB_CLK_ENABLE();}while(0)
​
#define DIANJI(x)   do{x ? HAL_GPIO_WritePin(DIANJI_GPIO_PORT,DIANJI_GPIO_PIN,GPIO_PIN_SET):\
                                                 HAL_GPIO_WritePin(DIANJI_GPIO_PORT,DIANJI_GPIO_PIN,GPIO_PIN_RESET);}while(0)
​
#define DIANJI_TOGGLE()  do{HAL_GPIO_TogglePin(DIANJI_GPIO_PORT, DIANJI_GPIO_PIN);}while(0)     
​
void dianji_init(void);
​
#endif
MOTOR.c
#include "./BSP/DIANJI/dianji.h"
​
void dianji_init(void)
{
    GPIO_InitTypeDef gpio_init_struct;
    
​
    __HAL_RCC_GPIOB_CLK_ENABLE();
    
    gpio_init_struct.Pin = GPIO_PIN_8;
    gpio_init_struct.Mode = GPIO_MODE_OUTPUT_PP;
    gpio_init_struct.Speed = GPIO_SPEED_FREQ_HIGH;
    
    HAL_GPIO_Init(GPIOB,&gpio_init_struct);//初始化GPIOB的端口
    
    HAL_GPIO_WritePin(GPIOB,GPIO_PIN_8,GPIO_PIN_RESET);
​
}
4.5、OLED显示屏代码
IIC.h
#ifndef __IIC_H
#define __IIC_H
​
#include "./SYSTEM/sys/sys.h"
​
/*IIC_SCL时钟端口,引脚定义*/
#define SCL_GPIO_PORT                   GPIOB
#define SCL_GPIO_PIN                    GPIO_PIN_6
#define SCL_GPIO_CLK_ENABLE()   do{ __HAL_RCC_GPIOB_CLK_ENABLE();}while(0)
​
#define SDA_GPIO_PORT                   GPIOB
#define SDA_GPIO_PIN                    GPIO_PIN_7
#define SDA_GPIO_CLK_ENABLE() do{ __HAL_RCC_GPIOB_CLK_ENABLE();}while(0)
​
#define SCL(x)  do{x? HAL_GPIO_WritePin(SCL_GPIO_PORT,SCL_GPIO_PIN,GPIO_PIN_SET):\
                                        HAL_GPIO_WritePin(SCL_GPIO_PORT,SCL_GPIO_PIN,GPIO_PIN_RESET);}while(0)
​
#define SDA(x)  do{x? HAL_GPIO_WritePin(SDA_GPIO_PORT,SDA_GPIO_PIN,GPIO_PIN_SET):\
                                        HAL_GPIO_WritePin(SDA_GPIO_PORT,SDA_GPIO_PIN,GPIO_PIN_RESET);}while(0)                                          
​
#define SDA_IN      HAL_GPIO_ReadPin(SDA_GPIO_PORT,SDA_GPIO_PIN)
                                            
void iic_init(void);
void iic_start(void);                                           
void iic_stop(void);
void iic_ack(void);                                         
void iic_nack(void);                                            
uint8_t iic_wait_ack(void);                                         
void iic_send_byte(uint8_t dat);
uint8_t iic_read_byte(uint8_t ack);
                                            
#endif
IIC.c
#include "./BSP/IIC/iic.h"
#include "./SYSTEM/delay/delay.h"
​
/*功能:iic管脚的初始化
SDA:开漏输出   SCL:推挽输出*/
​
void iic_init(void)
{
    GPIO_InitTypeDef gpio_init_struct;
    
​
    SCL_GPIO_CLK_ENABLE();
    SDA_GPIO_CLK_ENABLE();
    
    gpio_init_struct.Pin=SCL_GPIO_PIN;
    gpio_init_struct.Mode=GPIO_MODE_OUTPUT_PP;
    gpio_init_struct.Pull=GPIO_PULLUP;
    gpio_init_struct.Speed=GPIO_SPEED_FREQ_HIGH;
    HAL_GPIO_Init(SCL_GPIO_PORT,&gpio_init_struct);
    
    gpio_init_struct.Pin=SDA_GPIO_PIN;
    gpio_init_struct.Mode=GPIO_MODE_OUTPUT_OD;
    
    HAL_GPIO_Init(SDA_GPIO_PORT,&gpio_init_struct);
    
    //iic_stop();
​
}
​
//功能:MCU发出IIC的起始信号
​
void iic_start(void)
{
    SDA(1);
    SCL(1);
    delay_us(2);
    SDA(0);
    delay_us(2);
    SCL(0);
    delay_us(2);
}   
​
//功能:MCU发出IIC的停止信号
​
void iic_stop(void)
{
    SDA(0);
    delay_us(2);
    SCL(1);
    delay_us(2);
    SDA(1);
    delay_us(2);
}
​
//功能:MCU发出ACK信号
void iic_ack(void)
{
    SCL(0);
    delay_us(2);
    SDA(0);
    delay_us(2);
    SCL(1);
    delay_us(2);
}
​
//功能:MCU发出NACK信号
void iic_nack(void)
{
    SCL(0);
    delay_us(2);
    SDA(1);
    delay_us(2);
    SCL(1);
    delay_us(2);
}
​
/*功能描述:等待IIC 从机发出响应信号,进行检测
return:  ack:返回0        nack:返回1*/
uint8_t iic_wait_ack(void)
{
    uint8_t waittime = 0;//waittime(等待时间)
    SDA(1);
    delay_us(2);
    SCL(1);
    delay_us(2);
    if(SDA_IN)
    {
        waittime++;
        if(waittime > 250)
        {
            iic_stop();
            return 1;
        }
    }
    SCL(0);
    delay_us(2);
    return 0;
}   
​
/*功能:发送1个字节
参数:dat  一个uint8*/
void iic_send_byte(uint8_t dat)
{
    uint8_t i;
    for(i=0;i<8;i++)
    {
        SDA((dat & 0x80)>>7);
        delay_us(2);
        SCL(1);
        delay_us(2);
        SCL(0);
        dat<<=1;
    }
//释放总线,开启检测
    SDA(1);
}
​
/*iic读取1个字节
参数:ack      1:ack(确认应答) 0:nake(否定应答)
return(返回) uint8 receive(接收)*/
uint8_t iic_read_byte(uint8_t ack)
{
    uint8_t receive=0;
    uint8_t i;
    //读取1个byte
    for(i=0;i<8;i++)
    {
        receive<<=1;
        SCL(1);
        delay_us(2);
        if(SDA_IN)
        {
            receive++;
        }
        SCL(0);
        delay_us(2);
    }
    //读取数据后,进行相关的响应
    if(!ack)
    {
        iic_nack();
    }else{
        iic_ack();
    }
    return receive;
}
OLED.h
#ifndef __OLED_H
#define __OLED_H
​
#include "./SYSTEM/sys/sys.h"
​
#define X_WIDTH     128
#define Y_WIDTH     64
​
#define OLED_CMD    0
#define OLED_DATA 1
​
void oled_init(void);
void OLED_WR_Byte(uint8_t data,uint8_t type);
void OLED_Refresh_Gram(void);
void OLED_Set_Pos(uint8_t x,uint8_t y);
void OLED_Display_On(void);
void OLED_Display_Off(void);
void OLED_Clear(void);
void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t size,uint8_t mode);
void OLED_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size);
void OLED_ShowString(uint8_t x,uint8_t y,const uint8_t *p,uint8_t size);
void OLED_ShowFontHZ(uint8_t x,uint8_t y,uint8_t pos,uint8_t size,uint8_t mode);
void OLED_DrawBMP(uint8_t x0, uint8_t y0,uint8_t x1, uint8_t y1,uint8_t BMP[]);
​
#endif
OLED.c
#include "./BSP/OLED/oled.h"
#include "./BSP/IIC/iic.h"
#include "./BSP/OLED/oledfont.h"
​
uint8_t OLED_GRAM[128][8];
​
void write_iic_cmd(uint8_t cmd)
{
    iic_start();
    iic_send_byte(0x78);
    iic_wait_ack();
    iic_send_byte(0x00);
    iic_wait_ack();
    iic_send_byte(cmd);
    iic_wait_ack();
    iic_stop();
}
​
void write_iic_data(uint8_t data)
{
    iic_start();
    iic_send_byte(0x78);
    iic_wait_ack();
    iic_send_byte(0x40);
    iic_wait_ack();
    iic_send_byte(data);
    iic_wait_ack();
    iic_stop();
}
​
/*功能描述: 实现命令,数据的选择
type:1  写数据
         0  写命令*/
void OLED_WR_Byte(uint8_t data,uint8_t type)
{
    if(type)
    {
        write_iic_data(data);
    }else
     {
        write_iic_cmd(data);
     }
}   
/*功能描述:将GRAM显存数据刷屏到屏幕上
参数:无
返回值:无*/
void OLED_Refresh_Gram(void)
{
    int i,n;
    for(i=7;i>=0;i--)
    {
        OLED_WR_Byte(0xb0+i,OLED_CMD);
        OLED_WR_Byte(0x00,OLED_CMD);
        OLED_WR_Byte(0x10,OLED_CMD);
        
​
        for(n=0;n<128;n++)
        {
            OLED_WR_Byte(OLED_GRAM[n][i],OLED_DATA);
        }
    }
​
}
​
/*
功能描述:设置显示的位置
参数:x:   列的坐标
            y:   页
返回值:无
*/
void OLED_Set_Pos(uint8_t x,uint8_t y)
{
    OLED_WR_Byte(0xb0+y,OLED_CMD);
    OLED_WR_Byte(((x&0xf0)>>4)|0x10,OLED_CMD);
    OLED_WR_Byte((x&0x0f)|0x01,OLED_CMD);
}
​
/*
功能描述:打开屏幕的显示
参数:无
返回值:无
*/
void OLED_Display_On(void)
{
    OLED_WR_Byte(0x8D,OLED_CMD);//SET DCDC命令
    OLED_WR_Byte(0X14,OLED_CMD);//DCDC 打开
    OLED_WR_Byte(0XAF,OLED_CMD);//DISPLAY 打开
}
​
/*
功能描述:关闭屏幕的显示
参数:无
返回值:无
*/
void OLED_Display_Off(void)
{
        OLED_WR_Byte(0X8D,OLED_CMD);  //SET DCDC命令
      OLED_WR_Byte(0X10,OLED_CMD);  //DCDC 打开
      OLED_WR_Byte(0XAE,OLED_CMD);  //DISPLAY 打开
}
​
/*
功能描述:清除屏幕内容
参数:无
返回值:无
*/
void OLED_Clear(void)
{
        int i,n;
    for(i=0;i<8;i++)
    {
        
​
      for(n=0;n<128;n++)
        {
            OLED_GRAM[n][i]=0;
        }
        OLED_Refresh_Gram();
​
  }
}
​
/*
功能描述:计算权数的函数  ,幂函数
参数:m:  底数
            n:   幂数
返回值:m的n次方的结果
*/
uint32_t oled_pow(uint8_t m,uint8_t n)
{
    uint32_t result=1;
    while(n--)result*=m;//result=result*m
    return result;
}
​
/*
功能描述:画点函数
参数:x:列的坐标    y:行的坐标     t: 1 正常显示  0  反显
返回值:无
*/
void OLED_DrawPoint(uint8_t x,uint8_t y,uint8_t t)
{
    uint8_t pos,bx,temp=0;
    if(x>127||y>63)return;//超出范围了.
    pos=7-y/8;
    bx=y%8;
    temp=1<<(7-bx);
    if(t)
    {
        OLED_GRAM[x][pos]|=temp;
    }
    else 
    {
        OLED_GRAM[x][pos]&=~temp;   
    }       
}
​
/*
功能描述:显示1个字符
参数:x  列的坐标   y行的坐标    chr:待显示的字符    size:显示的字符大小    mode:  1  正常显示  0  反显
返回值:无
*/
​
void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t size,uint8_t mode)
{
    uint8_t temp,t,t1;
    uint8_t y0=y;
    uint8_t csize=(size/8+((size%8)?1:0))*(size/2);//得到一个字符对应点阵集所占的字节数
    chr=chr-' ';//得到偏移后的值
    for(t=0;t<csize;t++)
    {
        if(size==12)temp=ascii_1206[chr][t];//调用1206字体
        else if(size==16)temp=ascii_1608[chr][t];//调用1608字体
        else if(size==24)temp=ascii_2412[chr][t];//调用2412字体
        else return;//没有的字库
            for(t1=0;t1<8;t1++)
            {
                if(temp&0x80)OLED_DrawPoint(x,y,mode);
                else OLED_DrawPoint(x,y,!mode);
                temp<<=1;
                y++;
                if((y-y0)==size)
                {
                    y=y0;
                    x++;
                    break;
                }
            }
    }
}   
​
//显示2个数字
//x,y :起点坐标  
//len :数字的位数
//size:字体大小
//num:数值(0~4294967295);          
​
/*
功能描述:显示数字
参数:x  列的坐标   y行的坐标    num:待显示的数字    len:数字的长度    size :显示的数字的大小
返回值:无
*/
void OLED_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size)//123 102 1 2 3
{
    uint8_t t,temp;
    uint8_t enshow=0;
    for(t=0;t<len;t++)
    {
        temp=(num/oled_pow(10,len-t-1))%10;
        if(enshow==0&&t<(len-1))
        {
            if(temp==0)
            {
                OLED_ShowChar(x+(size/2)*t,y,' ',size,1);
                continue;
            }else enshow=1;
                
​
        }   
        OLED_ShowChar(x+(size/2)*t,y,temp+'0',size,1);
    }
​
}   
​
//显示字符串
//x,y:起点坐标  
//size:字体大小 
//*p:字符串起始地址 
//void OLED_ShowString(uint8_t x,uint8_t y,const uint8_t *p,uint8_t size)
​
/*
功能描述:显示1个字符串
参数:x  列的坐标   y行的坐标    p:待显示的字符串的地址    size:显示的字符大小 
返回值:无
*/
void OLED_ShowString(uint8_t x,uint8_t y,const uint8_t *p,uint8_t size)
{
    while((*p<='~')&&(*p>=' '))//判断是不是非法字符
    {
        if(x>(X_WIDTH-(size/2))){x=0;y+=size;}//x大于 某一行 列上的剩余列数,不能显示完成的字符串,将x坐标设置为0,同时y的高度+size
        if(y>(Y_WIDTH-size)){y=x=0;OLED_Clear();}//y大于 某一行 行上的剩余数,不能显示完成的字符串,将x坐标、y坐标设置为0,同时清屏
        OLED_ShowChar(x,y,*p,size,1);//取1个字符串进行显示
        x+=size/2;
        p++;//取出下一个字符
    }
}   
​
//显示汉字
//x,y:起点坐标  
//pos:数组位置汉字显示
//size:字体大小 
//mode:0,反白显示;1,正常显示
​
/*
功能描述:显示1个汉字
参数:x  列的坐标   y行的坐标    poa:汉字的编码数组    size:显示的字符大小   mode:  1  正常显示  0 反显
返回值:无
*/
void OLED_ShowFontHZ(uint8_t x,uint8_t y,uint8_t pos,uint8_t size,uint8_t mode)
{
    uint8_t temp,t,t1;
    uint8_t y0=y;
    uint8_t csize=(size/8+((size%8)?1:0))*(size);//得到字体一个字符对应点阵集所占的字节数 1
    if(size!=12&&size!=16&&size!=24)return;//不支持的size
    
​
    for(t=0;t<csize;t++)
    {                                                      
        if(size==12)temp=FontHzk[pos][t];       //调用1206字体
        else if(size==16)temp=FontHzk[pos][t];  //调用1608字体
        else if(size==24)temp=FontHzk[pos][t];  //调用2412字体
        else return;                                //没有的字库
        for(t1=0;t1<8;t1++)//循环画点
        {
            if(temp&0x80)OLED_DrawPoint(x,y,mode);
            else OLED_DrawPoint(x,y,!mode);
            temp<<=1;
            y++;
        //当前列是否描完,描完后,将行号置为初始行 列号+1
            if((y-y0)==size)
            {
                y=y0;
                x++;
                break;
            }
        }
    }   
​
}   
​
//显示BMP图片128×64
//起始点坐标(x,y),x的范围0~127,y为页的范围0~7
​
/*
功能描述:显示1个图片
参数:起始点  坐标:x0  列的坐标   y0行的坐标    
            结束点  坐标:x1  列的坐标   y1行的坐标    
            BMP[]:图片的编码数组
返回值:无
*/
void OLED_DrawBMP(uint8_t x0,uint8_t y0,uint8_t x1,uint8_t y1,uint8_t BMP[])
{
    uint16_t j=0;
    uint8_t x,y;
    
​
    if(y1%8==0)y=y1/8;
    else y=y1/8+1;
    for(y=y0;y<y1;y++)
    {
        OLED_Set_Pos(x0,y);
        for(x=x0;x<x1;x++)
        {
            OLED_WR_Byte(BMP[j++],OLED_DATA);
        }
    }
​
}   
​
void oled_init(void)
{
​
    iic_init();
    OLED_WR_Byte(0xAE,OLED_CMD); //关闭显示
    OLED_WR_Byte(0xD5,OLED_CMD); //设置时钟分频因子,震荡频率
    OLED_WR_Byte(80,OLED_CMD);   //[3:0],分频因子;[7:4],震荡频率
    OLED_WR_Byte(0xA8,OLED_CMD); //设置驱动路数
    OLED_WR_Byte(0X3F,OLED_CMD); //默认0X3F(1/64) 
    OLED_WR_Byte(0xD3,OLED_CMD); //设置显示偏移
    OLED_WR_Byte(0X00,OLED_CMD); //默认为0
    
    OLED_WR_Byte(0x40,OLED_CMD); //设置显示开始行 [5:0],行数.
                                                        
    OLED_WR_Byte(0x8D,OLED_CMD); //电荷泵设置
    OLED_WR_Byte(0x14,OLED_CMD); //bit2,开启/关闭
    OLED_WR_Byte(0x20,OLED_CMD); //设置内存地址模式
    OLED_WR_Byte(0x02,OLED_CMD); //[1:0],00,列地址模式;01,行地址模式;10,页地址模式;默认10;
    OLED_WR_Byte(0xA1,OLED_CMD); //段重定义设置,bit0:0,0->0;1,0->127;
    OLED_WR_Byte(0xC0,OLED_CMD); //设置COM扫描方向;bit3:0,普通模式;1,重定义模式 COM[N-1]->COM0;N:驱动路数
    OLED_WR_Byte(0xDA,OLED_CMD); //设置COM硬件引脚配置
    OLED_WR_Byte(0x12,OLED_CMD); //[5:4]配置
         
    OLED_WR_Byte(0x81,OLED_CMD); //对比度设置
    OLED_WR_Byte(0xEF,OLED_CMD); //1~255;默认0X7F (亮度设置,越大越亮)
    OLED_WR_Byte(0xD9,OLED_CMD); //设置预充电周期
    OLED_WR_Byte(0xf1,OLED_CMD); //[3:0],PHASE 1;[7:4],PHASE 2;
    OLED_WR_Byte(0xDB,OLED_CMD); //设置VCOMH 电压倍率
    OLED_WR_Byte(0x30,OLED_CMD); //[6:4] 000,0.65*vcc;001,0.77*vcc;011,0.83*vcc;
    
    OLED_WR_Byte(0xA4,OLED_CMD); //全局显示开启;bit0:1,开启;0,关闭;(白屏/黑屏)
    OLED_WR_Byte(0xA6,OLED_CMD); //设置显示方式;bit0:1,反相显示;0,正常显示                                   
    OLED_WR_Byte(0xAF,OLED_CMD); //开启显示 
    
    OLED_Clear();
​
}
OLED字体库
#ifndef __OLEDFONT_H
#define __OLEDFONT_H       
//常用ASCII表
//偏移量32 
//ASCII字符集: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
//PC2LCD2002取模方式设置:阴码+逐列式+顺向+C51格式
//总共:3个字符集(12*12、16*16和24*24),用户可以自行新增其他分辨率的字符集。
//每个字符所占用的字节数为:(size/8+((size%8)?1:0))*(size/2),其中size:是字库生成时的点阵大小(12/16/24...)
​
//12*12 ASCII字符集点阵
const unsigned char ascii_1206[95][12]={
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
{0x00,0x00,0x00,0x00,0x3F,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
{0x00,0x00,0x30,0x00,0x40,0x00,0x30,0x00,0x40,0x00,0x00,0x00},/*""",2*/
{0x09,0x00,0x0B,0xC0,0x3D,0x00,0x0B,0xC0,0x3D,0x00,0x09,0x00},/*"#",3*/
{0x18,0xC0,0x24,0x40,0x7F,0xE0,0x22,0x40,0x31,0x80,0x00,0x00},/*"$",4*/
{0x18,0x00,0x24,0xC0,0x1B,0x00,0x0D,0x80,0x32,0x40,0x01,0x80},/*"%",5*/
{0x03,0x80,0x1C,0x40,0x27,0x40,0x1C,0x80,0x07,0x40,0x00,0x40},/*"&",6*/
{0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x20,0x40,0x40,0x20},/*"(",8*/
{0x00,0x00,0x40,0x20,0x20,0x40,0x1F,0x80,0x00,0x00,0x00,0x00},/*")",9*/
{0x09,0x00,0x06,0x00,0x1F,0x80,0x06,0x00,0x09,0x00,0x00,0x00},/*"*",10*/
{0x04,0x00,0x04,0x00,0x3F,0x80,0x04,0x00,0x04,0x00,0x00,0x00},/*"+",11*/
{0x00,0x10,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
{0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x00,0x00},/*"-",13*/
{0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
{0x00,0x20,0x01,0xC0,0x06,0x00,0x38,0x00,0x40,0x00,0x00,0x00},/*"/",15*/
{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"0",16*/
{0x00,0x00,0x10,0x40,0x3F,0xC0,0x00,0x40,0x00,0x00,0x00,0x00},/*"1",17*/
{0x18,0xC0,0x21,0x40,0x22,0x40,0x24,0x40,0x18,0x40,0x00,0x00},/*"2",18*/
{0x10,0x80,0x20,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"3",19*/
{0x02,0x00,0x0D,0x00,0x11,0x00,0x3F,0xC0,0x01,0x40,0x00,0x00},/*"4",20*/
{0x3C,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x23,0x80,0x00,0x00},/*"5",21*/
{0x1F,0x80,0x24,0x40,0x24,0x40,0x34,0x40,0x03,0x80,0x00,0x00},/*"6",22*/
{0x30,0x00,0x20,0x00,0x27,0xC0,0x38,0x00,0x20,0x00,0x00,0x00},/*"7",23*/
{0x1B,0x80,0x24,0x40,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"8",24*/
{0x1C,0x00,0x22,0xC0,0x22,0x40,0x22,0x40,0x1F,0x80,0x00,0x00},/*"9",25*/
{0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
{0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
{0x00,0x00,0x04,0x00,0x0A,0x00,0x11,0x00,0x20,0x80,0x40,0x40},/*"<",28*/
{0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x09,0x00,0x00,0x00},/*"=",29*/
{0x00,0x00,0x40,0x40,0x20,0x80,0x11,0x00,0x0A,0x00,0x04,0x00},/*">",30*/
{0x18,0x00,0x20,0x00,0x23,0x40,0x24,0x00,0x18,0x00,0x00,0x00},/*"?",31*/
{0x1F,0x80,0x20,0x40,0x27,0x40,0x29,0x40,0x1F,0x40,0x00,0x00},/*"@",32*/
{0x00,0x40,0x07,0xC0,0x39,0x00,0x0F,0x00,0x01,0xC0,0x00,0x40},/*"A",33*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x40,0x1B,0x80,0x00,0x00},/*"B",34*/
{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x30,0x80,0x00,0x00},/*"C",35*/
{0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"D",36*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x40,0x30,0xC0,0x00,0x00},/*"E",37*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x2E,0x00,0x30,0x00,0x00,0x00},/*"F",38*/
{0x0F,0x00,0x10,0x80,0x20,0x40,0x22,0x40,0x33,0x80,0x02,0x00},/*"G",39*/
{0x20,0x40,0x3F,0xC0,0x04,0x00,0x04,0x00,0x3F,0xC0,0x20,0x40},/*"H",40*/
{0x20,0x40,0x20,0x40,0x3F,0xC0,0x20,0x40,0x20,0x40,0x00,0x00},/*"I",41*/
{0x00,0x60,0x20,0x20,0x20,0x20,0x3F,0xC0,0x20,0x00,0x20,0x00},/*"J",42*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x0B,0x00,0x30,0xC0,0x20,0x40},/*"K",43*/
{0x20,0x40,0x3F,0xC0,0x20,0x40,0x00,0x40,0x00,0x40,0x00,0xC0},/*"L",44*/
{0x3F,0xC0,0x3C,0x00,0x03,0xC0,0x3C,0x00,0x3F,0xC0,0x00,0x00},/*"M",45*/
{0x20,0x40,0x3F,0xC0,0x0C,0x40,0x23,0x00,0x3F,0xC0,0x20,0x00},/*"N",46*/
{0x1F,0x80,0x20,0x40,0x20,0x40,0x20,0x40,0x1F,0x80,0x00,0x00},/*"O",47*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x24,0x00,0x18,0x00,0x00,0x00},/*"P",48*/
{0x1F,0x80,0x21,0x40,0x21,0x40,0x20,0xE0,0x1F,0xA0,0x00,0x00},/*"Q",49*/
{0x20,0x40,0x3F,0xC0,0x24,0x40,0x26,0x00,0x19,0xC0,0x00,0x40},/*"R",50*/
{0x18,0xC0,0x24,0x40,0x24,0x40,0x22,0x40,0x31,0x80,0x00,0x00},/*"S",51*/
{0x30,0x00,0x20,0x40,0x3F,0xC0,0x20,0x40,0x30,0x00,0x00,0x00},/*"T",52*/
{0x20,0x00,0x3F,0x80,0x00,0x40,0x00,0x40,0x3F,0x80,0x20,0x00},/*"U",53*/
{0x20,0x00,0x3E,0x00,0x01,0xC0,0x07,0x00,0x38,0x00,0x20,0x00},/*"V",54*/
{0x38,0x00,0x07,0xC0,0x3C,0x00,0x07,0xC0,0x38,0x00,0x00,0x00},/*"W",55*/
{0x20,0x40,0x39,0xC0,0x06,0x00,0x39,0xC0,0x20,0x40,0x00,0x00},/*"X",56*/
{0x20,0x00,0x38,0x40,0x07,0xC0,0x38,0x40,0x20,0x00,0x00,0x00},/*"Y",57*/
{0x30,0x40,0x21,0xC0,0x26,0x40,0x38,0x40,0x20,0xC0,0x00,0x00},/*"Z",58*/
{0x00,0x00,0x00,0x00,0x7F,0xE0,0x40,0x20,0x40,0x20,0x00,0x00},/*"[",59*/
{0x00,0x00,0x70,0x00,0x0C,0x00,0x03,0x80,0x00,0x40,0x00,0x00},/*"\",60*/
{0x00,0x00,0x40,0x20,0x40,0x20,0x7F,0xE0,0x00,0x00,0x00,0x00},/*"]",61*/
{0x00,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
{0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10},/*"_",63*/
{0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
{0x00,0x00,0x02,0x80,0x05,0x40,0x05,0x40,0x03,0xC0,0x00,0x40},/*"a",65*/
{0x20,0x00,0x3F,0xC0,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00},/*"b",66*/
{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x06,0x40,0x00,0x00},/*"c",67*/
{0x00,0x00,0x03,0x80,0x04,0x40,0x24,0x40,0x3F,0xC0,0x00,0x40},/*"d",68*/
{0x00,0x00,0x03,0x80,0x05,0x40,0x05,0x40,0x03,0x40,0x00,0x00},/*"e",69*/
{0x00,0x00,0x04,0x40,0x1F,0xC0,0x24,0x40,0x24,0x40,0x20,0x00},/*"f",70*/
{0x00,0x00,0x02,0xE0,0x05,0x50,0x05,0x50,0x06,0x50,0x04,0x20},/*"g",71*/
{0x20,0x40,0x3F,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40},/*"h",72*/
{0x00,0x00,0x04,0x40,0x27,0xC0,0x00,0x40,0x00,0x00,0x00,0x00},/*"i",73*/
{0x00,0x10,0x00,0x10,0x04,0x10,0x27,0xE0,0x00,0x00,0x00,0x00},/*"j",74*/
{0x20,0x40,0x3F,0xC0,0x01,0x40,0x07,0x00,0x04,0xC0,0x04,0x40},/*"k",75*/
{0x20,0x40,0x20,0x40,0x3F,0xC0,0x00,0x40,0x00,0x40,0x00,0x00},/*"l",76*/
{0x07,0xC0,0x04,0x00,0x07,0xC0,0x04,0x00,0x03,0xC0,0x00,0x00},/*"m",77*/
{0x04,0x40,0x07,0xC0,0x04,0x40,0x04,0x00,0x03,0xC0,0x00,0x40},/*"n",78*/
{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x40,0x03,0x80,0x00,0x00},/*"o",79*/
{0x04,0x10,0x07,0xF0,0x04,0x50,0x04,0x40,0x03,0x80,0x00,0x00},/*"p",80*/
{0x00,0x00,0x03,0x80,0x04,0x40,0x04,0x50,0x07,0xF0,0x00,0x10},/*"q",81*/
{0x04,0x40,0x07,0xC0,0x02,0x40,0x04,0x00,0x04,0x00,0x00,0x00},/*"r",82*/
{0x00,0x00,0x06,0x40,0x05,0x40,0x05,0x40,0x04,0xC0,0x00,0x00},/*"s",83*/
{0x00,0x00,0x04,0x00,0x1F,0x80,0x04,0x40,0x00,0x40,0x00,0x00},/*"t",84*/
{0x04,0x00,0x07,0x80,0x00,0x40,0x04,0x40,0x07,0xC0,0x00,0x40},/*"u",85*/
{0x04,0x00,0x07,0x00,0x04,0xC0,0x01,0x80,0x06,0x00,0x04,0x00},/*"v",86*/
{0x06,0x00,0x01,0xC0,0x07,0x00,0x01,0xC0,0x06,0x00,0x00,0x00},/*"w",87*/
{0x04,0x40,0x06,0xC0,0x01,0x00,0x06,0xC0,0x04,0x40,0x00,0x00},/*"x",88*/
{0x04,0x10,0x07,0x10,0x04,0xE0,0x01,0x80,0x06,0x00,0x04,0x00},/*"y",89*/
{0x00,0x00,0x04,0x40,0x05,0xC0,0x06,0x40,0x04,0x40,0x00,0x00},/*"z",90*/
{0x00,0x00,0x00,0x00,0x04,0x00,0x7B,0xE0,0x40,0x20,0x00,0x00},/*"{",91*/
{0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xF0,0x00,0x00,0x00,0x00},/*"|",92*/
{0x00,0x00,0x40,0x20,0x7B,0xE0,0x04,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
{0x40,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x40,0x00},/*"~",94*/
};  
//16*16 ASCII字符集点阵
const unsigned char ascii_1608[95][16]={      
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xCC,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
{0x00,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x08,0x00,0x30,0x00,0x60,0x00,0x00,0x00},/*""",2*/
{0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x03,0xFC,0x1E,0x20,0x02,0x20,0x00,0x00},/*"#",3*/
{0x00,0x00,0x0E,0x18,0x11,0x04,0x3F,0xFF,0x10,0x84,0x0C,0x78,0x00,0x00,0x00,0x00},/*"$",4*/
{0x0F,0x00,0x10,0x84,0x0F,0x38,0x00,0xC0,0x07,0x78,0x18,0x84,0x00,0x78,0x00,0x00},/*"%",5*/
{0x00,0x78,0x0F,0x84,0x10,0xC4,0x11,0x24,0x0E,0x98,0x00,0xE4,0x00,0x84,0x00,0x08},/*"&",6*/
{0x08,0x00,0x68,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x18,0x18,0x20,0x04,0x40,0x02,0x00,0x00},/*"(",8*/
{0x00,0x00,0x40,0x02,0x20,0x04,0x18,0x18,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00},/*")",9*/
{0x02,0x40,0x02,0x40,0x01,0x80,0x0F,0xF0,0x01,0x80,0x02,0x40,0x02,0x40,0x00,0x00},/*"*",10*/
{0x00,0x80,0x00,0x80,0x00,0x80,0x0F,0xF8,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00},/*"+",11*/
{0x00,0x01,0x00,0x0D,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
{0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80},/*"-",13*/
{0x00,0x00,0x00,0x0C,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
{0x00,0x00,0x00,0x06,0x00,0x18,0x00,0x60,0x01,0x80,0x06,0x00,0x18,0x00,0x20,0x00},/*"/",15*/
{0x00,0x00,0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"0",16*/
{0x00,0x00,0x08,0x04,0x08,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"1",17*/
{0x00,0x00,0x0E,0x0C,0x10,0x14,0x10,0x24,0x10,0x44,0x11,0x84,0x0E,0x0C,0x00,0x00},/*"2",18*/
{0x00,0x00,0x0C,0x18,0x10,0x04,0x11,0x04,0x11,0x04,0x12,0x88,0x0C,0x70,0x00,0x00},/*"3",19*/
{0x00,0x00,0x00,0xE0,0x03,0x20,0x04,0x24,0x08,0x24,0x1F,0xFC,0x00,0x24,0x00,0x00},/*"4",20*/
{0x00,0x00,0x1F,0x98,0x10,0x84,0x11,0x04,0x11,0x04,0x10,0x88,0x10,0x70,0x00,0x00},/*"5",21*/
{0x00,0x00,0x07,0xF0,0x08,0x88,0x11,0x04,0x11,0x04,0x18,0x88,0x00,0x70,0x00,0x00},/*"6",22*/
{0x00,0x00,0x1C,0x00,0x10,0x00,0x10,0xFC,0x13,0x00,0x1C,0x00,0x10,0x00,0x00,0x00},/*"7",23*/
{0x00,0x00,0x0E,0x38,0x11,0x44,0x10,0x84,0x10,0x84,0x11,0x44,0x0E,0x38,0x00,0x00},/*"8",24*/
{0x00,0x00,0x07,0x00,0x08,0x8C,0x10,0x44,0x10,0x44,0x08,0x88,0x07,0xF0,0x00,0x00},/*"9",25*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,0x03,0x0C,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
{0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
{0x00,0x00,0x00,0x80,0x01,0x40,0x02,0x20,0x04,0x10,0x08,0x08,0x10,0x04,0x00,0x00},/*"<",28*/
{0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x00,0x00},/*"=",29*/
{0x00,0x00,0x10,0x04,0x08,0x08,0x04,0x10,0x02,0x20,0x01,0x40,0x00,0x80,0x00,0x00},/*">",30*/
{0x00,0x00,0x0E,0x00,0x12,0x00,0x10,0x0C,0x10,0x6C,0x10,0x80,0x0F,0x00,0x00,0x00},/*"?",31*/
{0x03,0xE0,0x0C,0x18,0x13,0xE4,0x14,0x24,0x17,0xC4,0x08,0x28,0x07,0xD0,0x00,0x00},/*"@",32*/
{0x00,0x04,0x00,0x3C,0x03,0xC4,0x1C,0x40,0x07,0x40,0x00,0xE4,0x00,0x1C,0x00,0x04},/*"A",33*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x11,0x04,0x0E,0x88,0x00,0x70,0x00,0x00},/*"B",34*/
{0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x08,0x1C,0x10,0x00,0x00},/*"C",35*/
{0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"D",36*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x04,0x17,0xC4,0x10,0x04,0x08,0x18,0x00,0x00},/*"E",37*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x17,0xC0,0x10,0x00,0x08,0x00,0x00,0x00},/*"F",38*/
{0x03,0xE0,0x0C,0x18,0x10,0x04,0x10,0x04,0x10,0x44,0x1C,0x78,0x00,0x40,0x00,0x00},/*"G",39*/
{0x10,0x04,0x1F,0xFC,0x10,0x84,0x00,0x80,0x00,0x80,0x10,0x84,0x1F,0xFC,0x10,0x04},/*"H",40*/
{0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x04,0x00,0x00,0x00,0x00},/*"I",41*/
{0x00,0x03,0x00,0x01,0x10,0x01,0x10,0x01,0x1F,0xFE,0x10,0x00,0x10,0x00,0x00,0x00},/*"J",42*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x03,0x80,0x14,0x64,0x18,0x1C,0x10,0x04,0x00,0x00},/*"K",43*/
{0x10,0x04,0x1F,0xFC,0x10,0x04,0x00,0x04,0x00,0x04,0x00,0x04,0x00,0x0C,0x00,0x00},/*"L",44*/
{0x10,0x04,0x1F,0xFC,0x1F,0x00,0x00,0xFC,0x1F,0x00,0x1F,0xFC,0x10,0x04,0x00,0x00},/*"M",45*/
{0x10,0x04,0x1F,0xFC,0x0C,0x04,0x03,0x00,0x00,0xE0,0x10,0x18,0x1F,0xFC,0x10,0x00},/*"N",46*/
{0x07,0xF0,0x08,0x08,0x10,0x04,0x10,0x04,0x10,0x04,0x08,0x08,0x07,0xF0,0x00,0x00},/*"O",47*/
{0x10,0x04,0x1F,0xFC,0x10,0x84,0x10,0x80,0x10,0x80,0x10,0x80,0x0F,0x00,0x00,0x00},/*"P",48*/
{0x07,0xF0,0x08,0x18,0x10,0x24,0x10,0x24,0x10,0x1C,0x08,0x0A,0x07,0xF2,0x00,0x00},/*"Q",49*/
{0x10,0x04,0x1F,0xFC,0x11,0x04,0x11,0x00,0x11,0xC0,0x11,0x30,0x0E,0x0C,0x00,0x04},/*"R",50*/
{0x00,0x00,0x0E,0x1C,0x11,0x04,0x10,0x84,0x10,0x84,0x10,0x44,0x1C,0x38,0x00,0x00},/*"S",51*/
{0x18,0x00,0x10,0x00,0x10,0x04,0x1F,0xFC,0x10,0x04,0x10,0x00,0x18,0x00,0x00,0x00},/*"T",52*/
{0x10,0x00,0x1F,0xF8,0x10,0x04,0x00,0x04,0x00,0x04,0x10,0x04,0x1F,0xF8,0x10,0x00},/*"U",53*/
{0x10,0x00,0x1E,0x00,0x11,0xE0,0x00,0x1C,0x00,0x70,0x13,0x80,0x1C,0x00,0x10,0x00},/*"V",54*/
{0x1F,0xC0,0x10,0x3C,0x00,0xE0,0x1F,0x00,0x00,0xE0,0x10,0x3C,0x1F,0xC0,0x00,0x00},/*"W",55*/
{0x10,0x04,0x18,0x0C,0x16,0x34,0x01,0xC0,0x01,0xC0,0x16,0x34,0x18,0x0C,0x10,0x04},/*"X",56*/
{0x10,0x00,0x1C,0x00,0x13,0x04,0x00,0xFC,0x13,0x04,0x1C,0x00,0x10,0x00,0x00,0x00},/*"Y",57*/
{0x08,0x04,0x10,0x1C,0x10,0x64,0x10,0x84,0x13,0x04,0x1C,0x04,0x10,0x18,0x00,0x00},/*"Z",58*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFE,0x40,0x02,0x40,0x02,0x40,0x02,0x00,0x00},/*"[",59*/
{0x00,0x00,0x30,0x00,0x0C,0x00,0x03,0x80,0x00,0x60,0x00,0x1C,0x00,0x03,0x00,0x00},/*"\",60*/
{0x00,0x00,0x40,0x02,0x40,0x02,0x40,0x02,0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00},/*"]",61*/
{0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00},/*"^",62*/
{0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01},/*"_",63*/
{0x00,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
{0x00,0x00,0x00,0x98,0x01,0x24,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xFC,0x00,0x04},/*"a",65*/
{0x10,0x00,0x1F,0xFC,0x00,0x88,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00},/*"b",66*/
{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x00},/*"c",67*/
{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x11,0x08,0x1F,0xFC,0x00,0x04},/*"d",68*/
{0x00,0x00,0x00,0xF8,0x01,0x44,0x01,0x44,0x01,0x44,0x01,0x44,0x00,0xC8,0x00,0x00},/*"e",69*/
{0x00,0x00,0x01,0x04,0x01,0x04,0x0F,0xFC,0x11,0x04,0x11,0x04,0x11,0x00,0x18,0x00},/*"f",70*/
{0x00,0x00,0x00,0xD6,0x01,0x29,0x01,0x29,0x01,0x29,0x01,0xC9,0x01,0x06,0x00,0x00},/*"g",71*/
{0x10,0x04,0x1F,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04},/*"h",72*/
{0x00,0x00,0x01,0x04,0x19,0x04,0x19,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"i",73*/
{0x00,0x00,0x00,0x03,0x00,0x01,0x01,0x01,0x19,0x01,0x19,0xFE,0x00,0x00,0x00,0x00},/*"j",74*/
{0x10,0x04,0x1F,0xFC,0x00,0x24,0x00,0x40,0x01,0xB4,0x01,0x0C,0x01,0x04,0x00,0x00},/*"k",75*/
{0x00,0x00,0x10,0x04,0x10,0x04,0x1F,0xFC,0x00,0x04,0x00,0x04,0x00,0x00,0x00,0x00},/*"l",76*/
{0x01,0x04,0x01,0xFC,0x01,0x04,0x01,0x00,0x01,0xFC,0x01,0x04,0x01,0x00,0x00,0xFC},/*"m",77*/
{0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x00,0x01,0x00,0x01,0x04,0x00,0xFC,0x00,0x04},/*"n",78*/
{0x00,0x00,0x00,0xF8,0x01,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x00,0xF8,0x00,0x00},/*"o",79*/
{0x01,0x01,0x01,0xFF,0x00,0x85,0x01,0x04,0x01,0x04,0x00,0x88,0x00,0x70,0x00,0x00},/*"p",80*/
{0x00,0x00,0x00,0x70,0x00,0x88,0x01,0x04,0x01,0x04,0x01,0x05,0x01,0xFF,0x00,0x01},/*"q",81*/
{0x01,0x04,0x01,0x04,0x01,0xFC,0x00,0x84,0x01,0x04,0x01,0x00,0x01,0x80,0x00,0x00},/*"r",82*/
{0x00,0x00,0x00,0xCC,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x24,0x01,0x98,0x00,0x00},/*"s",83*/
{0x00,0x00,0x01,0x00,0x01,0x00,0x07,0xF8,0x01,0x04,0x01,0x04,0x00,0x00,0x00,0x00},/*"t",84*/
{0x01,0x00,0x01,0xF8,0x00,0x04,0x00,0x04,0x00,0x04,0x01,0x08,0x01,0xFC,0x00,0x04},/*"u",85*/
{0x01,0x00,0x01,0x80,0x01,0x70,0x00,0x0C,0x00,0x10,0x01,0x60,0x01,0x80,0x01,0x00},/*"v",86*/
{0x01,0xF0,0x01,0x0C,0x00,0x30,0x01,0xC0,0x00,0x30,0x01,0x0C,0x01,0xF0,0x01,0x00},/*"w",87*/
{0x00,0x00,0x01,0x04,0x01,0x8C,0x00,0x74,0x01,0x70,0x01,0x8C,0x01,0x04,0x00,0x00},/*"x",88*/
{0x01,0x01,0x01,0x81,0x01,0x71,0x00,0x0E,0x00,0x18,0x01,0x60,0x01,0x80,0x01,0x00},/*"y",89*/
{0x00,0x00,0x01,0x84,0x01,0x0C,0x01,0x34,0x01,0x44,0x01,0x84,0x01,0x0C,0x00,0x00},/*"z",90*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x3E,0xFC,0x40,0x02,0x40,0x02},/*"{",91*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00},/*"|",92*/
{0x00,0x00,0x40,0x02,0x40,0x02,0x3E,0xFC,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
{0x00,0x00,0x60,0x00,0x80,0x00,0x80,0x00,0x40,0x00,0x40,0x00,0x20,0x00,0x20,0x00},/*"~",94*/
};  
//24*24 ASICII字符集点阵
const unsigned char ascii_2412[95][36]={      
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x80,0x38,0x0F,0xFE,0x38,0x0F,0x80,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x06,0x00,0x00,0x0C,0x00,0x00,0x38,0x00,0x00,0x31,0x00,0x00,0x06,0x00,0x00,0x0C,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00},/*""",2*/
{0x00,0x00,0x00,0x00,0x61,0x80,0x00,0x67,0xF8,0x07,0xF9,0x80,0x00,0x61,0x80,0x00,0x61,0x80,0x00,0x61,0x80,0x00,0x61,0x80,0x00,0x67,0xF8,0x07,0xF9,0x80,0x00,0x61,0x80,0x00,0x00,0x00},/*"#",3*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0xE0,0x03,0xE0,0xF0,0x06,0x30,0x08,0x04,0x18,0x08,0x1F,0xFF,0xFE,0x04,0x0E,0x08,0x07,0x87,0xF0,0x03,0x81,0xE0,0x00,0x00,0x00,0x00,0x00,0x00},/*"$",4*/
{0x01,0xF0,0x00,0x06,0x0C,0x00,0x04,0x04,0x08,0x06,0x0C,0x70,0x01,0xF9,0xC0,0x00,0x0E,0x00,0x00,0x3B,0xE0,0x00,0xEC,0x18,0x07,0x08,0x08,0x04,0x0C,0x18,0x00,0x03,0xE0,0x00,0x00,0x00},/*"%",5*/
{0x00,0x01,0xE0,0x00,0x07,0xF0,0x03,0xF8,0x18,0x04,0x1C,0x08,0x04,0x17,0x08,0x07,0xE1,0xD0,0x03,0xC0,0xE0,0x00,0x23,0xB0,0x00,0x3C,0x08,0x00,0x20,0x08,0x00,0x00,0x10,0x00,0x00,0x00},/*"&",6*/
{0x00,0x00,0x00,0x01,0x00,0x00,0x31,0x00,0x00,0x32,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x01,0xFF,0xC0,0x07,0x80,0xF0,0x0C,0x00,0x18,0x10,0x00,0x04,0x20,0x00,0x02,0x00,0x00,0x00},/*"(",8*/
{0x00,0x00,0x00,0x20,0x00,0x02,0x10,0x00,0x04,0x0C,0x00,0x18,0x07,0x80,0xF0,0x01,0xFF,0xC0,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*")",9*/
{0x00,0x00,0x00,0x00,0x42,0x00,0x00,0x66,0x00,0x00,0x66,0x00,0x00,0x3C,0x00,0x00,0x18,0x00,0x03,0xFF,0xC0,0x00,0x18,0x00,0x00,0x3C,0x00,0x00,0x66,0x00,0x00,0x66,0x00,0x00,0x42,0x00},/*"*",10*/
{0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x01,0xFF,0xC0,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00},/*"+",11*/
{0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x31,0x00,0x00,0x32,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
{0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00},/*"-",13*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
{0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x1C,0x00,0x00,0x70,0x00,0x01,0x80,0x00,0x0E,0x00,0x00,0x38,0x00,0x00,0xC0,0x00,0x07,0x00,0x00,0x1C,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00},/*"/",15*/
{0x00,0x00,0x00,0x00,0x7F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x06,0x00,0x18,0x04,0x00,0x08,0x04,0x00,0x08,0x06,0x00,0x18,0x03,0x80,0x70,0x01,0xFF,0xE0,0x00,0x7F,0x80,0x00,0x00,0x00},/*"0",16*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x08,0x01,0x00,0x08,0x01,0x00,0x08,0x03,0xFF,0xF8,0x07,0xFF,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},/*"1",17*/
{0x00,0x00,0x00,0x01,0xC0,0x38,0x02,0xC0,0x58,0x04,0x00,0x98,0x04,0x01,0x18,0x04,0x02,0x18,0x04,0x04,0x18,0x06,0x1C,0x18,0x03,0xF8,0x18,0x01,0xE0,0xF8,0x00,0x00,0x00,0x00,0x00,0x00},/*"2",18*/
{0x00,0x00,0x00,0x01,0xC0,0xE0,0x03,0xC0,0xF0,0x04,0x00,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x06,0x18,0x08,0x03,0xF4,0x18,0x01,0xE7,0xF0,0x00,0x01,0xE0,0x00,0x00,0x00,0x00,0x00,0x00},/*"3",19*/
{0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x0D,0x00,0x00,0x11,0x00,0x00,0x61,0x00,0x00,0x81,0x08,0x03,0x01,0x08,0x07,0xFF,0xF8,0x0F,0xFF,0xF8,0x00,0x01,0x08,0x00,0x01,0x08,0x00,0x00,0x00},/*"4",20*/
{0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0xFC,0xD0,0x06,0x08,0x08,0x06,0x10,0x08,0x06,0x10,0x08,0x06,0x10,0x08,0x06,0x18,0x38,0x06,0x0F,0xF0,0x06,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00},/*"5",21*/
{0x00,0x00,0x00,0x00,0x3F,0x80,0x01,0xFF,0xE0,0x03,0x84,0x30,0x02,0x08,0x18,0x04,0x10,0x08,0x04,0x10,0x08,0x04,0x10,0x08,0x07,0x18,0x10,0x03,0x0F,0xF0,0x00,0x07,0xC0,0x00,0x00,0x00},/*"6",22*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x00,0x07,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0xF8,0x06,0x07,0xF8,0x06,0x18,0x00,0x06,0xE0,0x00,0x07,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00},/*"7",23*/
{0x00,0x00,0x00,0x01,0xE1,0xE0,0x03,0xF7,0xF0,0x06,0x34,0x10,0x04,0x18,0x08,0x04,0x18,0x08,0x04,0x0C,0x08,0x04,0x0C,0x08,0x06,0x16,0x18,0x03,0xF3,0xF0,0x01,0xC1,0xE0,0x00,0x00,0x00},/*"8",24*/
{0x00,0x00,0x00,0x00,0xF8,0x00,0x03,0xFC,0x30,0x03,0x06,0x38,0x04,0x02,0x08,0x04,0x02,0x08,0x04,0x02,0x08,0x04,0x04,0x10,0x03,0x08,0xF0,0x01,0xFF,0xC0,0x00,0x7F,0x00,0x00,0x00,0x00},/*"9",25*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x38,0x00,0x70,0x38,0x00,0x70,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x1A,0x00,0x30,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x14,0x00,0x00,0x22,0x00,0x00,0x41,0x00,0x00,0x80,0x80,0x01,0x00,0x40,0x02,0x00,0x20,0x04,0x00,0x10,0x08,0x00,0x08,0x00,0x00,0x00},/*"<",28*/
{0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x21,0x00,0x00,0x00,0x00},/*"=",29*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x04,0x00,0x10,0x02,0x00,0x20,0x01,0x00,0x40,0x00,0x80,0x80,0x00,0x41,0x00,0x00,0x22,0x00,0x00,0x14,0x00,0x00,0x08,0x00,0x00,0x00,0x00},/*">",30*/
{0x00,0x00,0x00,0x03,0xC0,0x00,0x04,0xC0,0x00,0x04,0x00,0x00,0x08,0x00,0x38,0x08,0x0F,0x38,0x08,0x08,0x38,0x08,0x10,0x00,0x0C,0x30,0x00,0x07,0xE0,0x00,0x03,0xC0,0x00,0x00,0x00,0x00},/*"?",31*/
{0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0xFF,0xE0,0x03,0x80,0x70,0x02,0x0F,0x10,0x06,0x70,0x88,0x04,0xC0,0x88,0x04,0x83,0x08,0x04,0x7F,0x88,0x02,0xC0,0x90,0x03,0x01,0x20,0x00,0xFE,0x40},/*"@",32*/
{0x00,0x00,0x08,0x00,0x00,0x18,0x00,0x01,0xF8,0x00,0x3E,0x08,0x01,0xC2,0x00,0x07,0x02,0x00,0x07,0xE2,0x00,0x00,0xFE,0x00,0x00,0x1F,0xC8,0x00,0x01,0xF8,0x00,0x00,0x38,0x00,0x00,0x08},/*"A",33*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x06,0x18,0x08,0x03,0xF4,0x18,0x01,0xE7,0xF0,0x00,0x01,0xE0,0x00,0x00,0x00},/*"B",34*/
{0x00,0x00,0x00,0x00,0x3F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x02,0x00,0x18,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x10,0x06,0x00,0x20,0x07,0x80,0xC0,0x00,0x00,0x00},/*"C",35*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x18,0x02,0x00,0x10,0x03,0x80,0x70,0x01,0xFF,0xE0,0x00,0x7F,0x80,0x00,0x00,0x00},/*"D",36*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x08,0x08,0x04,0x3E,0x08,0x04,0x00,0x08,0x06,0x00,0x18,0x01,0x00,0x60,0x00,0x00,0x00},/*"E",37*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x04,0x08,0x00,0x04,0x08,0x00,0x04,0x08,0x00,0x04,0x3E,0x00,0x06,0x00,0x00,0x06,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00},/*"F",38*/
{0x00,0x00,0x00,0x00,0x3F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x06,0x00,0x18,0x04,0x00,0x08,0x04,0x02,0x08,0x04,0x02,0x08,0x02,0x03,0xF0,0x07,0x83,0xF0,0x00,0x02,0x00,0x00,0x02,0x00},/*"G",39*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x04,0x08,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08},/*"H",40*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},/*"I",41*/
{0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x07,0x00,0x00,0x01,0x04,0x00,0x01,0x04,0x00,0x01,0x04,0x00,0x03,0x07,0xFF,0xFE,0x07,0xFF,0xFC,0x04,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00},/*"J",42*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x0C,0x08,0x00,0x18,0x00,0x00,0x3E,0x00,0x04,0xC7,0x80,0x05,0x03,0xC8,0x06,0x00,0xF8,0x04,0x00,0x38,0x04,0x00,0x18,0x00,0x00,0x08},/*"K",43*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x18,0x00,0x00,0x60,0x00,0x00,0x00},/*"L",44*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0x80,0x08,0x07,0xFC,0x00,0x00,0x7F,0xC0,0x00,0x03,0xF8,0x00,0x07,0xC0,0x00,0x78,0x00,0x07,0x80,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08},/*"M",45*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0x00,0x08,0x03,0xC0,0x00,0x00,0xE0,0x00,0x00,0x38,0x00,0x00,0x1E,0x00,0x00,0x07,0x00,0x00,0x01,0xC0,0x04,0x00,0xF0,0x07,0xFF,0xF8,0x04,0x00,0x00},/*"N",46*/
{0x00,0x00,0x00,0x00,0x7F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x06,0x00,0x18,0x04,0x00,0x08,0x04,0x00,0x08,0x06,0x00,0x18,0x03,0x00,0x30,0x01,0xFF,0xE0,0x00,0x7F,0x80,0x00,0x00,0x00},/*"O",47*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x04,0x08,0x04,0x04,0x00,0x04,0x04,0x00,0x04,0x04,0x00,0x04,0x04,0x00,0x06,0x0C,0x00,0x03,0xF8,0x00,0x01,0xF0,0x00,0x00,0x00,0x00},/*"P",48*/
{0x00,0x00,0x00,0x00,0x7F,0x80,0x01,0xFF,0xE0,0x03,0x80,0x70,0x06,0x00,0x88,0x04,0x00,0x88,0x04,0x00,0xC8,0x06,0x00,0x3C,0x03,0x00,0x3E,0x01,0xFF,0xE6,0x00,0x7F,0x84,0x00,0x00,0x00},/*"Q",49*/
{0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x08,0x08,0x04,0x08,0x00,0x04,0x0C,0x00,0x04,0x0F,0x00,0x04,0x0B,0xC0,0x06,0x10,0xF0,0x03,0xF0,0x38,0x01,0xE0,0x08,0x00,0x00,0x08},/*"R",50*/
{0x00,0x00,0x00,0x01,0xE0,0xF8,0x03,0xF0,0x30,0x06,0x30,0x10,0x04,0x18,0x08,0x04,0x18,0x08,0x04,0x0C,0x08,0x04,0x0C,0x08,0x02,0x06,0x18,0x02,0x07,0xF0,0x07,0x81,0xE0,0x00,0x00,0x00},/*"S",51*/
{0x01,0x80,0x00,0x06,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x08,0x07,0xFF,0xF8,0x07,0xFF,0xF8,0x04,0x00,0x08,0x04,0x00,0x00,0x04,0x00,0x00,0x06,0x00,0x00,0x01,0x80,0x00},/*"T",52*/
{0x04,0x00,0x00,0x07,0xFF,0xE0,0x07,0xFF,0xF0,0x04,0x00,0x18,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x04,0x00,0x10,0x07,0xFF,0xE0,0x04,0x00,0x00},/*"U",53*/
{0x04,0x00,0x00,0x06,0x00,0x00,0x07,0xE0,0x00,0x07,0xFE,0x00,0x04,0x1F,0xE0,0x00,0x01,0xF8,0x00,0x00,0x38,0x00,0x01,0xE0,0x04,0x3E,0x00,0x07,0xC0,0x00,0x06,0x00,0x00,0x04,0x00,0x00},/*"V",54*/
{0x04,0x00,0x00,0x07,0xE0,0x00,0x07,0xFF,0xC0,0x04,0x1F,0xF8,0x00,0x07,0xC0,0x07,0xF8,0x00,0x07,0xFF,0x80,0x04,0x3F,0xF8,0x00,0x07,0xC0,0x04,0xF8,0x00,0x07,0x00,0x00,0x04,0x00,0x00},/*"W",55*/
{0x00,0x00,0x00,0x04,0x00,0x08,0x06,0x00,0x18,0x07,0xC0,0x78,0x05,0xF1,0xC8,0x00,0x3E,0x00,0x00,0x1F,0x80,0x04,0x63,0xE8,0x07,0x80,0xF8,0x06,0x00,0x18,0x04,0x00,0x08,0x00,0x00,0x00},/*"X",56*/
{0x04,0x00,0x00,0x06,0x00,0x00,0x07,0x80,0x00,0x07,0xE0,0x08,0x04,0x7C,0x08,0x00,0x1F,0xF8,0x00,0x07,0xF8,0x00,0x18,0x08,0x04,0xE0,0x08,0x07,0x00,0x00,0x06,0x00,0x00,0x04,0x00,0x00},/*"Y",57*/
{0x00,0x00,0x00,0x01,0x00,0x08,0x06,0x00,0x38,0x04,0x00,0xF8,0x04,0x03,0xE8,0x04,0x0F,0x08,0x04,0x7C,0x08,0x05,0xF0,0x08,0x07,0xC0,0x08,0x07,0x00,0x18,0x04,0x00,0x60,0x00,0x00,0x00},/*"Z",58*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xFE,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x00,0x00,0x00},/*"[",59*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x07,0x00,0x00,0x00,0xC0,0x00,0x00,0x38,0x00,0x00,0x06,0x00,0x00,0x01,0xC0,0x00,0x00,0x30,0x00,0x00,0x0E,0x00,0x00,0x01,0x00,0x00,0x00},/*"\",60*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x20,0x00,0x02,0x3F,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"]",61*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x10,0x00,0x00,0x30,0x00,0x00,0x20,0x00,0x00,0x30,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
{0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01},/*"_",63*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
{0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x19,0xF8,0x00,0x1B,0x18,0x00,0x22,0x08,0x00,0x26,0x08,0x00,0x24,0x08,0x00,0x24,0x10,0x00,0x3F,0xF8,0x00,0x1F,0xF8,0x00,0x00,0x08,0x00,0x00,0x18},/*"a",65*/
{0x00,0x00,0x00,0x04,0x00,0x00,0x07,0xFF,0xF8,0x0F,0xFF,0xF0,0x00,0x18,0x18,0x00,0x10,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x30,0x18,0x00,0x1F,0xF0,0x00,0x0F,0xC0,0x00,0x00,0x00},/*"b",66*/
{0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x1F,0xF0,0x00,0x18,0x30,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x3C,0x08,0x00,0x1C,0x10,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00},/*"c",67*/
{0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x1F,0xF0,0x00,0x38,0x18,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x04,0x10,0x10,0x07,0xFF,0xF8,0x0F,0xFF,0xF0,0x00,0x00,0x10,0x00,0x00,0x00},/*"d",68*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x1F,0xF0,0x00,0x12,0x30,0x00,0x22,0x18,0x00,0x22,0x08,0x00,0x22,0x08,0x00,0x32,0x08,0x00,0x1E,0x10,0x00,0x0E,0x20,0x00,0x00,0x00},/*"e",69*/
{0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x08,0x00,0x20,0x08,0x01,0xFF,0xF8,0x03,0xFF,0xF8,0x06,0x20,0x08,0x04,0x20,0x08,0x04,0x20,0x08,0x07,0x20,0x00,0x03,0x00,0x00,0x00,0x00,0x00},/*"f",70*/
{0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x0E,0x6E,0x00,0x1F,0xF3,0x00,0x31,0xB1,0x00,0x20,0xB1,0x00,0x20,0xB1,0x00,0x31,0x91,0x00,0x1F,0x13,0x00,0x2E,0x1E,0x00,0x20,0x0E,0x00,0x30,0x00},/*"g",71*/
{0x00,0x00,0x00,0x04,0x00,0x08,0x07,0xFF,0xF8,0x0F,0xFF,0xF8,0x00,0x10,0x08,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x1F,0xF8,0x00,0x00,0x08,0x00,0x00,0x00},/*"h",72*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x06,0x3F,0xF8,0x06,0x3F,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},/*"i",73*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x20,0x01,0x00,0x20,0x01,0x00,0x20,0x03,0x06,0x3F,0xFE,0x06,0x3F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"j",74*/
{0x00,0x00,0x00,0x04,0x00,0x08,0x07,0xFF,0xF8,0x0F,0xFF,0xF8,0x00,0x01,0x88,0x00,0x03,0x00,0x00,0x2F,0xC0,0x00,0x38,0xF8,0x00,0x20,0x38,0x00,0x20,0x08,0x00,0x00,0x08,0x00,0x00,0x00},/*"k",75*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x08,0x04,0x00,0x08,0x04,0x00,0x08,0x07,0xFF,0xF8,0x0F,0xFF,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00},/*"l",76*/
{0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x10,0x08,0x00,0x20,0x00,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x10,0x08,0x00,0x20,0x00,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x00,0x08},/*"m",77*/
{0x00,0x00,0x00,0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x10,0x08,0x00,0x10,0x00,0x00,0x20,0x00,0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x1F,0xF8,0x00,0x00,0x08,0x00,0x00,0x00},/*"n",78*/
{0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x0F,0xF0,0x00,0x18,0x30,0x00,0x30,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x30,0x08,0x00,0x18,0x30,0x00,0x0F,0xF0,0x00,0x07,0xC0,0x00,0x00,0x00},/*"o",79*/
{0x00,0x00,0x00,0x00,0x20,0x01,0x00,0x3F,0xFF,0x00,0x3F,0xFF,0x00,0x10,0x11,0x00,0x20,0x09,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x30,0x38,0x00,0x1F,0xF0,0x00,0x0F,0xC0,0x00,0x00,0x00},/*"p",80*/
{0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0x1F,0xF0,0x00,0x38,0x18,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x09,0x00,0x10,0x11,0x00,0x1F,0xFF,0x00,0x3F,0xFF,0x00,0x00,0x01,0x00,0x00,0x00},/*"q",81*/
{0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x3F,0xF8,0x00,0x3F,0xF8,0x00,0x08,0x08,0x00,0x10,0x08,0x00,0x20,0x08,0x00,0x20,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x00,0x00},/*"r",82*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x78,0x00,0x1E,0x18,0x00,0x33,0x08,0x00,0x23,0x08,0x00,0x21,0x08,0x00,0x21,0x88,0x00,0x21,0x98,0x00,0x30,0xF0,0x00,0x38,0x60,0x00,0x00,0x00},/*"s",83*/
{0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0xFF,0xF0,0x03,0xFF,0xF8,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00},/*"t",84*/
{0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x3F,0xF0,0x00,0x7F,0xF8,0x00,0x00,0x18,0x00,0x00,0x08,0x00,0x00,0x08,0x00,0x20,0x10,0x00,0x3F,0xF8,0x00,0x7F,0xF0,0x00,0x00,0x10,0x00,0x00,0x00},/*"u",85*/
{0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x30,0x00,0x00,0x3C,0x00,0x00,0x3F,0x80,0x00,0x23,0xF0,0x00,0x00,0x78,0x00,0x00,0x70,0x00,0x23,0x80,0x00,0x3C,0x00,0x00,0x30,0x00,0x00,0x20,0x00},/*"v",86*/
{0x00,0x20,0x00,0x00,0x3C,0x00,0x00,0x3F,0xE0,0x00,0x23,0xF8,0x00,0x00,0xE0,0x00,0x27,0x00,0x00,0x3E,0x00,0x00,0x3F,0xE0,0x00,0x21,0xF8,0x00,0x01,0xE0,0x00,0x3E,0x00,0x00,0x20,0x00},/*"w",87*/
{0x00,0x00,0x00,0x00,0x20,0x08,0x00,0x20,0x08,0x00,0x38,0x38,0x00,0x3E,0x68,0x00,0x27,0x80,0x00,0x03,0xC8,0x00,0x2C,0xF8,0x00,0x38,0x38,0x00,0x20,0x18,0x00,0x20,0x08,0x00,0x00,0x00},/*"x",88*/
{0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x30,0x03,0x00,0x3C,0x01,0x00,0x3F,0x83,0x00,0x23,0xEC,0x00,0x00,0x70,0x00,0x23,0x80,0x00,0x3C,0x00,0x00,0x20,0x00,0x00,0x20,0x00,0x00,0x00,0x00},/*"y",89*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x08,0x00,0x20,0x38,0x00,0x20,0xF8,0x00,0x23,0xE8,0x00,0x2F,0x88,0x00,0x3E,0x08,0x00,0x38,0x08,0x00,0x20,0x18,0x00,0x00,0x70,0x00,0x00,0x00},/*"z",90*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x14,0x00,0x1F,0xF7,0xFC,0x30,0x00,0x06,0x20,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00},/*"{",91*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"|",92*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x02,0x30,0x00,0x06,0x1F,0xF7,0xFC,0x00,0x14,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
{0x00,0x00,0x00,0x18,0x00,0x00,0x60,0x00,0x00,0x40,0x00,0x00,0x40,0x00,0x00,0x20,0x00,0x00,0x10,0x00,0x00,0x08,0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00,0x0C,0x00,0x00,0x10,0x00,0x00},/*"~",94*/
};
​
​
//取模软件PCtoLCD2002.exe,
//字模选项:阴码、顺向、逐列式、十六进制、C51格式、点阵大小16*16
//16号汉字字体
const unsigned char FontHzk[][32]={
{0x20,0x08,0x24,0x10,0x22,0x60,
0x21,0x80,0x26,0x41,0x39,0x32,
0x02,0x04,0x0C,0x18,0xF0,0x60,
0x13,0x80,0x10,0x60,0x10,0x18,
0x14,0x04,0x18,0x02,0x00,0x01,
0x00,0x00},/*"欢",0*/
{0x02,0x00,0x02,0x02,0x42,0x04,
0x33,0xF8,0x00,0x04,0x00,0x02,
0x3F,0xF2,0x20,0x22,0x40,0x42,
0x00,0x02,0x3F,0xFE,0x20,0x42,
0x20,0x22,0x3F,0xC2,0x00,0x02,
0x00,0x00},/*"迎",1*/
​
{0x08,0x20,0x06,0x20,0x40,0x7E,0x31,0x80,
0x00,0x02,0x00,0x7E,0x7F,0x42,0x49,0x42,
0x49,0x7E,0x49,0x42,0x49,0x7E,0x49,0x42,
0x7F,0x42,0x00,0x7E,0x00,0x02,0x00,0x00},/*"温",0*/
​
{0x00,0x02,0x00,0x0C,0x3F,0xF1,0x24,0x01,
0x24,0x21,0x24,0x32,0x3F,0xAA,0xA4,0xA4,0x64,
0xA4,0x24,0xA4,0x3F,0xAA,0x24,0x32,0x24,0x01,
0x24,0x01,0x20,0x01,0x00,0x00},/*"度",0*/
​
{0x08,0x20,0x06,0x20,0x40,0x7E,0x31,0x80,
0x00,0x22,0x7F,0x12,0x49,0x0A,0x49,0xFE,
0x49,0x02,0x49,0x02,0x49,0xFE,0x49,0x0A,
0x7F,0x12,0x00,0x22,0x00,0x02,0x00,0x00},/*"湿",0*/
​
};
​
#endif
4.6、main文件
#include "./SYSTEM/sys/sys.h"
#include "./SYSTEM/usart/usart.h"
#include "./SYSTEM/delay/delay.h"
#include "./BSP/LED/led.h"
#include "./BSP/SMG/smg.h"
#include "./BSP/DS18B20/ds18b20.h"
#include "./BSP/OLED/oled.h"
#include "./BSP/FENGMINGQI/fengmingqi.h"
#include "./BSP/DIANJI/dianji.h"
​
int main(void)
{
    HAL_Init(); /* 初始化HAL库 */
    sys_stm32_clock_init(RCC_PLL_MUL9); /* 设置时钟, 72Mhz */
    delay_init(72); /* 延时初始化 */
    usart_init(115200); /* 串口初始化为115200 */
    led_init(); /* 初始化LED */
    oled_init();
    //ds18b20_init();
    beep_init();
    dianji_init();
    
​
    while(ds18b20_init())
    {
        printf("DS18B20检测失败,请插好!\r\n");
        delay_ms(500);
    }
        printf("DS18B20检测成功!\r\n");
    
    char temp_str[20];
    while (1)
    {   
        int time=20;
        float temperature = ds18b20_get_temperature();  
        static int i = 0; 
        int temp=temperature;//强转成int类型假如说温度是26.1让他变成26
        int temp1=temperature*10-temp*10;//得到小数后边的数26.1乘10减去26乘10得到1
        if(i%300==0)
        {
            
            if(temperature<0)
            {
                sprintf(temp_str,"-%.1f",(float)(-temperature)/10);
            }
            else
            {
                sprintf(temp_str, "%.1f", (float)temperature/10);
            }
            
        }
        //led灯显示
        if(temperature>30)
        {
                LED(0);
                delay_ms(500);
                LED(1);
        }
        //蜂鸣器延时设置在200-660,数字越大越响1.5v-5v电压越大声音越响
        if(temperature>30)
        {
            while(time--)
            {
                BEEP(0);
                delay_us(100);
                BEEP(1);
                delay_us(400);
            }
        }   
        if(temperature>30)
        {
            DIANJI(1);
            delay_us(10);
        }else{
            DIANJI(0);
            delay_us(10);
        }
            //OLED_Clear();//清屏操作
            OLED_ShowFontHZ(15,24,2,16,1);//得到"温"字
            OLED_ShowFontHZ(31,24,3,16,1);//得到"度"字
            OLED_ShowString(46,24,":",16);//得到":"这个符号
            OLED_ShowNum(60,24,temperature,2,16);//得到一个整数温度
            OLED_ShowString(80,24,".",16);//得到"."这个符号
            OLED_ShowNum(90,24,temp1,1,16);//得到这个温度小数点后的数
            OLED_ShowFontHZ(100,24,3,16,1);//得到"度"这个字
            
            delay_ms(5);
            i++;
            OLED_Refresh_Gram();
    }
​
}     

五、总结

基于STM32F103C8T6主控芯片的汽车空调控温系统成功实现了对车内温度的实时监测与智能控制。该系统集成了温度传感器,能够精准地检测车内温度。一旦检测到温度超过预设的阈值,系统便会自动启动空调进行控温,有效降低车内温度,保障车内温度的舒适性。同时,当温度超出设定的阀值时,系统会进行告警提示,确保车内得到有效控制。

标签:0x40,hal,0x04,0x20,0x00,0x01,STM32,0x08,汽车空调
From: https://blog.csdn.net/m0_64618563/article/details/140799417

相关文章

  • 使用Nginx Proxy Manager配置Halo的反向代理和申请 SSL 证书
    本文介绍NginxProxyManager配置Halo的反向代理和申请SSL证书,如需要了解Halo2的安装,参考如何在Linux云服务器上通过DockerCompose部署安装Halo,搭建个人博客网站?。目录安装NginxProxyManagerNginxProxyManager安装新建docker-compose.yaml启动NPM配置Halo的反向代理申......
  • 在macOS开发stm32:CubeIDE+CubePro方案
    STM32CubeIDE和STM32CubeProgrammer都有Mac版。STM32CubeIDE用于创建项目和编写代码,编译出HEX文件。STM32CubeProgrammer用于连接ST-Linkv2和烧录程序,把HEX文件烧录到STM32单片机。在安装STM32CubeIDE和STM32CubeProgrammer时,会把相关驱动下载安装。所以,等我安装完这两个工具,......
  • [USACO1.5] 八皇后 Checker Challenge 题解
    [USACO1.5]八皇后CheckerChallenge题目描述一个如下的\(6\times6\)的跳棋棋盘,有六个棋子被放置在棋盘上,使得每行、每列有且只有一个,每条对角线(包括两条主对角线的所有平行线)上至多有一个棋子。上面的布局可以用序列\(2\4\6\1\3\5\)来描述,第\(i\)个数字表示在......
  • 1. STM32结构简介
    上面就是stm32F103系列的结构图。内核在stm32芯片中,其资源分为内核以及外设两个部分,所谓内核相当于电脑的CPU,负责进行数据处理。以stm32F103系列为例,其内核采用Cortex-M3内核,该内核由Arm公司设计授权给ST公司进行制造生产。总线结构总线(Bus)是指计算机组件间规范化的交......
  • hall 定理学习笔记
    万恶之源基本定义完美匹配是指最大匹配数为min(|X|,|Y|)也就是X或Y集合其中一个集合所有点都被匹配了。定理内容我们来假设X集合点少一点好了。X集合就当做有n个点。那么二分图G存在完美匹配,则取任意正整数1<=k<=n,均满足我从X集合选出k个不同的点,那么它们连向的y集合的点个......
  • Datawhale AI 夏令营:siRNA药物药效预测----Task 1
    Task1:赛题解析&背景入门思考引导(前言)RNA干扰(RNAi)RNA干扰(RNAi)是一种天然存在的基因表达调控机制,通过小干扰RNA(siRNA)等分子来沉默特定基因的表达。这一机制在细胞中起着重要作用,能精确地抑制目标基因的表达,从而减少相应蛋白质的产生。siRNA通过与靶mRNA结合,诱导RNA诱导沉默复......
  • 使用FreeRTOS官方移植,移植到STM32F1平台中
    本教程基本参照[野火]《FreeRTOS内核实现与应用开发实战指南》,本人相当推荐此教程,尤其是第一部分从0开始写内核,虽然比较晦涩,但是学完之后对FreeRTOS的运行原理还有框架的认识会有一个很大的提高。首先获取FreeRTOS的源码我们从官网下载9.0版本的压缩包解压后Plus中包含......
  • STM32第二十三课:GUI-Guider安装使用及项目移植(7.11版本)
    目录目标一、GUI-Guider获取与安装1.GUI-Guider获取2.安装二、使用步骤1.创建一个新项目2.快速使用三、项目移植注意事项目标1.安装GUI-guider。2.学会使用GUI-guider设计界面。3.学会将GUI-guider设计后的界面移植到项目工程中。一、GUI-Guider获取与安装 ......
  • STM32F103 SPI详解及示例代码
    1SPI协议详解 SPI是串行外设接口(SerialPeripheralInterface)的缩写,是美国摩托罗拉公司(Motorola)最先推出的一种同步串行传输规范,也是一种单片机外设芯片串行扩展接口,是一种高速、全双工、同步通信总线,所以可以在同一时间发送和接收数据,SPI没有定义速度限制,通常能达到甚至超过10......
  • 学习STM32的LED点阵显示
    学习STM32的LED点阵显示内容需要涉及到几个方面:硬件准备、软件工具、基本原理以及代码实例。下面我将详细介绍每个方面的内容。一、硬件准备选择合适的开发板:根据自己的需求和预算选择一款适合的开发板。常见的STM32开发板有STM32F103系列、STM32F407系列等。连接LED点阵:将LE......