当前位置: 首页 > news >正文

HNU小学期工训-STC15单片机模型大作业实验报告

STC15单片机模型大作业实验报告

全称:基于STC15单片机与OLED显示模块&PC端演示的多功能声光温振时钟智能手表模型

计科210X 甘晴void 202108010XXX
请注意:本作业入选优秀范例,直接照抄源码有很大风险
【建议理解原理之后作改动】
【演示视频:】
【讲解视频:】
在做之前,芜湖韩金轮学长的博客给了我一些启发。

目录

文章目录

  • STC15单片机模型大作业实验报告
    • 目录
    • 设计背景及目的
      • 设计背景
      • 设计目的
    • 设计模式与功能
      • 整体概览
      • 模式&功能图示
      • 模式功能详情
        • 如何切换模式:
        • 初上电:
        • 模式1:实时时钟。
        • 模式2:双秒表。
        • 模式3:定时器。
        • 模式4:光感。
        • 模式5:温感。
        • 模式6:FM收音机。
        • 模式7:音乐播放器。
        • 特殊模式:振动干扰。
    • 设计实现与代码
      • 主要函数概览
      • 主要状态变量设计
        • 用户程序全局变量定义
        • mode1:Clock实时时钟初始默认值
        • mode2:stopwatch秒表模式全局变量
        • mode3:timer定时器
        • mode4:light_intensity
        • mode5:temperature
        • mode6:FM收音机全局变量
        • 与计算机通信
      • 各分函数设计
        • void main() 主函数
        • void Initial_interface() 初始界面
        • void myKN_callback() 导航按键&K3按键的回调函数
        • void myKey_callback() Key按键触发回调函数
        • void my100mS_callback() 定时回调函数(用于显示数码管)
        • void myVib_callback() 震动事件回调函数
        • unsigned int tem_calculate(unsigned int tem_adc) 温度转换辅助函数
        • void oled_display() OLED显示屏切换
        • void uart_callback() 通信接收回调函数
        • void pc_preview() 计算机展示
      • OLED部分实现
        • OLED原理
        • 采购OLED显示屏
        • 采购杜邦线
        • OLED加入工程的组件
        • 本项目使用到的函数
        • OLED特性与处理
          • 1、ADC模块与OLED模块冲突,无法同时运行
          • 2、OLED会扰乱数码管与LED灯的正常显示
          • 3、OLED刷新新页面会使数码管与LED灯显示进入一段僵直
          • 4、OLED切换屏幕时有明显刷新感,连贯性不好
          • 5、基于上述特性,OLED适合单次改变
        • OLED取模
        • OLED代码实现
      • PC端用户界面展示实现
        • 串口通信(STC端)
        • 串口通信(PC端)
        • 可视化窗口创建
        • PC与STC通信&窗口信息更新
        • UI用户界面创作
    • 分模块难点与解决
    • 核心亮点
      • 1、实现了多功能的作用
      • 2、配置OLED显示屏
      • 3、拥有PC端引导程序
      • 4、数码管闪烁效果
      • 5、模式层次分明,初具OS功能
      • 6、广泛应用锁、临界区、信号量等概念
      • 7、BSP离散型模块化编程
      • 8、尽一切可能节约空间
      • 9、手敲了喜欢的音乐《TruE》
      • 10、OLED与PC端UI界面
    • 重要问题与解决
    • 总结
    • 致谢
    • 附录
      • 资料
      • python源码
      • μvision的C++源码
        • main.h
        • main.c
        • oled.h
        • oled.c
        • oledfont.h
        • resources.h
      • PC端UI用户界面图片(部分典型)展示
        • 欢迎界面
        • 模式指导界面
        • 选择模式界面
        • 震动恢复模式界面
        • 通信错误界面
      • STC模式图原稿

设计背景及目的

设计背景

当今时代,手表以其便携特性,深受大众喜爱。目前手表市场趋向两端化,其一端是以仅实现时钟查看、定时计时的基础功能为代表的普通手表,其另一端是搭载操作系统可以实现近乎手机功能的智能手表。前者以电子手表为代表,后者以市面上的智能手表为代表。注意到,在这两者中间存在大段空白,存在用户需求。选择该选题就是为了在普通手表的基础上增添特定的功能,以符合特定用户群体的需求。如热爱探险的青少年群体,其家长不希望智能手表有太多功能,以增加其沉迷游戏的可能。此时设计一款兼具基础环境参数监测功能与时间定时计时功能的手表就成了迫切的需要。

同时,我添加了OLED显示模块以更清晰地使用户确认现在处于的模式。未来可能的改进方向是更好的利用OLED显示模块。

为了防止刚接触此类手表模型的用户不能快速上手,我使用计算机串口通信来传递STC板的实时状态,并在PC端显示该模式下的使用提示。这个举措可以帮助用户快速上手了解该模型的使用。

设计目的

通过完成该模型的设计和实现,熟悉 STC 学习板的 BSP 库中各功能模块的使用,包括显示、按键、adc、串口通信、数码管显示、FM收音机模块、音乐播放模块、震动事件等。并进一步熟悉此类电子系统的设计、实现、测试等的过程,掌握相关方法和技能。

同时,我借此机会更进一步学习了OLED显示模块的相关接口参数,集成函数包等。在设计中更加了解OLED显示模块的原理与应用。

更进一步,我利用所学的python知识,在之前电子测试平台串口通信的基础之上,开发了附加系统。该系统能在PC端获取STC板目前所处的状态,并对用户作出使用指导与提示。通过这个项目增进对python的运用与串口通信的运用。

设计模式与功能

整体概览

该模型为一个具有8个功能在内的综合智能板。具有实时时钟、双秒表、定时器、光感、温感、FM收音机、音乐播放与正东监测的功能。

特别地,有一个OLED显示屏,功能是显示当前所在的模式状态。

特别地,STC智能板通过串口通信与PC相连,在任意模式下,用户可以在PC端查看目前STC板的状态以及该状态下可进行的操作。用这种方法学习该STC板的使用。

这两个功能为附加功能,可以选择使用。若选择启用OLED显示屏则需要正确连接EXT扩展口与OLED显示屏;若选择启用PC端显示则需要打开PC端的python可视化程序以及正确地设置串口。两个附加功能可以同时启用,也可以只启用其中一个,也可以都不启用,STC板的正常功能不受影响。

模式&功能图示

在这里插入图片描述

模式功能详情

如何切换模式:

使用K1键可以切换模式,切换模式时先进入下一模式预览界面,再按一次K1进入下一模式。

初上电:

数码管显示“HNU-CSEE”,流水灯以4个灯为组合向左流动。

切换模式:使用K1键切换模式,切换模式时先进入下一模式预览界面,再按一次K1进入下一模式。

模式1:实时时钟。

使用K2切换“时分秒”,“年月日”,“星期(英文+数字)”。

切换模式时,该显示界面将被记忆并被保留。

模式2:双秒表。

使用K3,K2键分别控制左右秒表开始/结束。

切换模式,计时不被中断,将继续计时,方便用户切屏在计时同时干别的事情。

模式3:定时器。

共有3个状态。正常态、change态与计时态。

正常态:正常态用来显示将要倒计时的时间。

Change态:正常态与change态通过K2转换。change态用来更改倒计时时间,通过左右导航键调整选中分/秒,通过上下导航按键调节大小,被选中的分/秒项闪烁,同时左边会有字母“C”闪烁。

计时态:正常态与计时态通过K3键转换。计时态即开始计时,同时左边有字母“P”闪烁,逐秒递减至0之后报警并切换至正常态,恢复初始的五分钟(默认)计时。

切换模式,定时器继续工作。

模式4:光感。

共有2个状态。正常态与change态。

正常态:最左边显示“E-4”,靠右边三位显示光照强度。

Change态:正常态与change态通过K2键转换。change态用来更改报警阈值,此时数码管显示模式为“MAAA-BBB”最左边一位“M”为模式mode,mode=0表示超出阈值不报警,mode=1表示超出阈值报警。紧临的三位“AAA”为低阈值,最右边的三位“BBB”为高阈值。通过左右导航键调节选中调节对象(“M”,“AAA”,“BBB”),被选中的调节对象会闪烁,通过上下导航键改变大小。通过程序判定能保证0<下阈值<上阈值<255。

注意三个状态之间的互斥关系。

切换模式,不在该模式下时,光感报警不工作。

模式5:温感。

共有2个状态。正常态与change态。

正常态:最左边显示“E-5”,靠右边三位显示温度。

Change态:正常态与change态通过K2键转换。change态用来更改报警阈值,此时数码管显示模式为“MAAA-BBB”最左边一位“M”为模式mode,mode=0表示超出阈值不报警,mode=1表示超出阈值报警。紧临的三位“AAA”为低阈值,最右边的三位“BBB”为高阈值。通过左右导航键调节选中调节对象(“M”,“AAA”,“BBB”),被选中的调节对象会闪烁,通过上下导航键改变大小。通过程序判定能保证0<下阈值<上阈值<255。

注意三个状态之间的互斥关系。

切换模式,不在该模式下时,温感报警不工作。

模式6:FM收音机。

共有3个调节状态。

正常态:左边显示音量大小Volume(0-15),右边显示FM频率(887-1080Hz)。

调节Volume态:与正常态通过K3键互相切换,该状态Volume值会闪烁,通过上下导航键改变值大小。

调节FM频率态:与正常态通过K2键互相切换,该状态FM频率值会闪烁,通过上下导航键改变值大小。

注意调节Volume态与调节FM频率态互斥,存在临界区。

切换模式,FM持续工作,该模式仅为调节FM频率及音量。

模式7:音乐播放器。

正常态:数码管最右边显示“E7-”。

播放态:正常态通过K2切换至播放态。该状态下数码管显示音高信息,下方灯打节拍。

暂停态:播放态通过K2与暂停态互相切换。该状态下数码管显示“Pause”

切换模式,音乐播放器自动停播,并重置回开头。

特殊模式:振动干扰。

在任意模式下,若存在振动干扰,可能损害机体,将进入特殊振动干扰模式,暂停一切服务并报警。此时按K1键恢复原模式。

设计实现与代码

主要函数概览

  • void main() 主函数
  • void Initial_interface() 初始界面
  • void myKN_callback() 导航按键&K3按键的回调函数
  • void myKey_callback() Key按键触发回调函数
  • void my100mS_callback() 定时回调函数(用于显示数码管)
  • void myVib_callback() 震动事件回调函数
  • unsigned int tem_calculate(unsigned int tem_adc) 温度转换辅助函数
  • void oled_display() OLED显示屏切换
  • void uart_callback() 通信接收回调函数
  • void pc_preview() 计算机展示

主要状态变量设计

用户程序全局变量定义

  • char state;//操作系统此时的状态
  • char previous_state;//陷入切换模式之前的状态
  • char vib_old_state;//陷入Vib之前的状态
  • (废止)char maxstate=10;//state的最大编号,修改该值之后需要在main.h内同时修改状态数组【为了节约空间,由于该数字只被使用了一次,故直接在程序中使用了,这个删去】
  • bit key_flag = 0;//一个信号量,用于标记切换模式两步中执行了多少。key_flag为0时执行第一步(进入切换模式),key_flag为1时执行第二步(进入下一模式)
  • bit transfer = 0;//OLED的信号量:state切换时为1,切换后OLED变化之后变为0,该信号量只用于初始的处理,即只作用一次
  • bit oled_change = 0;//OLED的信号量:oled_change为1时需要通知OLED改变屏幕显示以及PC端改变显示
  • char count=0;//用于计数分割时间,达成闪烁效果(后面会详细说明该思想)

mode1:Clock实时时钟初始默认值

  • code struct_DS1302_RTC rtc_origin = {0x30,0x32,0x11,0x25,0x7,0x2,0x23};//秒 分 时 日 月 星期 年
  • struct_DS1302_RTC rtc;//获取rtc结构,获取rtc结构后才可以分别取年月日分秒时星期等
  • char clock_mode = 0;//显示模式 0-时分秒 1-年月日 2-星期

mode2:stopwatch秒表模式全局变量

  • unsigned int time1=0,time2 = 0; //累积量:两个秒表分别计时的值。
  • bit stopwatch_1=0,stopwatch_2 = 0;//信号量:两个秒表的状态,是否开始计时。该信号量为1时,定时回调函数被调用时会累加时间。

mode3:timer定时器

  • unsigned int timer = 3481;//初始定时时间(默认值在这里设置)
  • bit timer_change = 0;//当前是否处于change态,初始不在change态
  • bit timer_minute = 0;//当前是否在change态的调节“分”
  • bit timer_second = 0;//当前是否在change态的调节“秒”
  • bit timer_run = 0;//当前是否处于“计时态”

mode4:light_intensity

  • char light_intensity_lowerlimit = 20;//光照报警值下阈值
  • char light_intensity_upperlimit = 100;//光照报警值上阈值
  • bit light_intensity_mode = 1;//光照报警模式(是否报警,默认报警)
  • bit light_intensity_change = 0;//当前是否处于change态
  • bit light_intensity_lowerlimit_change = 0;//当前是否处于change态的调节“下阈值”
  • bit light_intensity_upperlimit_change = 0;//当前是否处于change态的调节“上阈值”
  • bit light_intensity_mode_change = 0;//当前是否处于change态的调节“报警模式”

mode5:temperature

  • unsigned int temperature_lowerlimit = 200;//温度报警值下阈值
  • unsigned int temperature_upperlimit = 400;//温度报警值上阈值
  • bit temperature_mode = 1;//温感报警模式(是否报警,默认报警)
  • bit temperature_change = 0;//当前是否处于change态
  • bit temperature_lowerlimit_change = 0;//当前是否处于change态的调节“下阈值”
  • bit temperature_upperlimit_change = 0;//当前是否处于change态的调节“上阈值”
  • bit temperature_mode_change = 0;//当前是否处于change态的调节“报警模式”

mode6:FM收音机全局变量

  • code struct_FMRadio radio_origin = {886,3,0,1,1};//FM初始的频率与声音参数
  • bit FM_frequency = 0; //信号量:是否在调节频率
  • bit FM_volume = 0; //信号量:是否在调节音量
  • bit FM_mutex = 0; //对于导航按键访问的锁

与计算机通信

  • code char datahead[]={0xaa,0x55};//包头
  • char datanow[];//接收数据保存地址
  • code char back[]={0xaa,0x55,0xa1,0xa1,0xa1,0xa1};//初次通讯返回值

各分函数设计

void main() 主函数

函数作用:

  1. 加载初始化模块:包括Key、Beep、OLED、Adc、Displayer、DS1302、FMRadio、Vib、Uart1模块的初始化。
  2. 设置事件回调函数:按键触发事件、时间回调函数、导航&K3按键回调函数、震动事件回调函数、串口通信接收回调函数。
  3. 初始化用户程序变量:一些状态变量的初始化、调用初始界面展示函数Initial_interface(),(可选)系统时间初值设置。
  4. OS主循环(离散事件编程思维必须)

void Initial_interface() 初始界面

函数作用:

  1. 在OLED显示屏上显示初始欢迎界面“湖南大学”与“HUNAN UNIVERSITY”,将状态值赋为2(即数码管和LED灯进入欢迎界面)

void myKN_callback() 导航按键&K3按键的回调函数

函数作用:

  • 从ADC模块的按键与K3部分获取K3、up、down、left、right这五个按键的状态
  • 处理mode2双通道秒表模式下K3按键(左秒表)开始/结束计时
  • 处理mode3定时器模式下导航按键修改定时时间
  • 处理mode3定时器模式下正常状态与计时状态通过K3按键切换
  • 处理mode4光感模式下通过导航左右键切换调整对象以及上下键调整大小(值有范围限制)
  • 处理mode5温感模式下通过导航左右键切换调整对象以及上下键调整大小(值有范围限制)
  • 处理mode6FM收音机模式下通过K3键选择修改Volume值,赋予临界区锁与回收临界区锁
  • 处理mode6FM收音机模式导航按键调节,即通过上下导航键改变值大小

void myKey_callback() Key按键触发回调函数

函数作用:

  • 从Key模块分别获取K1、K2按键的状态(特别注意K3按键不是在这里)
  • 若K1触发,传递oled_change信号量(模式更迭,与OLED和PC通信,改变显示)
  • 处理由Vib震动引起强制切换模式后恢复原模式
  • 处理由K1按键主动触发切换模式
  • 处理mode1实时时钟模式下使用K2按键切换查看时分秒/年月日/星期
  • 处理mode2双通道秒表模式下K2按键(右秒表)开始/结束计时
  • 处理mode3定时器模式下正常态与change态通过K2按键切换(进入change态后默认先对“秒”而不是“分”进行改动)
  • 处理mode4光感模式正常态与change态通过K2按键切换(进入change态后默认先对“下阈值”而不是“上阈值”或“模式”进行改动)
  • 处理mode5温感模式正常态与change态通过K2按键切换(进入change态后默认先对“下阈值”而不是“上阈值”或“模式”进行改动)
  • 处理mode6FM收音机模式下通过K2键选择修改FM频率值,赋予临界区锁与回收临界区锁
  • 处理mode7MP3播放器模式下通过K2键开始/暂停/继续播放。具体分为:新开始、仍在播放突然暂停、暂停播放继续三个部分
  • 处理mode7MP3播放器模式下通过K1键切换模式时停止音乐的播放

void my100mS_callback() 定时回调函数(用于显示数码管)

函数作用:

​ 主要用于显示一直在刷新的数码管,同时也兼做一些一直需要判断的条件。

  • 处理oled_change信号量为1时,与OLED和PC通信改变屏幕显示,并将信号量还原
  • 处理mode2双通道秒表模式下秒表的计时累加(一旦开始,切换模式会继续进行)
  • 处理mode3定时器模式下定时器倒计时的继续(一旦开始,切换模式会继续进行)
  • 处理mode0Vib震动恢复模式的数码管界面显示
  • 处理切换模式时数码管界面显示“CHOOSE-X”,X为即将进入的新模式
  • 处理初始欢迎界面数码管显示“HNU-CSEE”以及LED灯的流水灯效果
  • 处理mode1实时时钟模式下根据clock_mode信号量选择不同的模式,显示时分秒/年月日/星期(英文+数字)
  • 处理mode2双通道秒表模式下左右秒表分别的累计时间显示
  • 处理mode3定时器模式下正常状态的显示,和【用计数分割时间,达成闪烁效果】方法下change态调节“分”、change态调节“秒”的闪烁显示效果
  • 处理mode4光感模式下正常状态的显示与超出上下阈值的报警;处理【用计数分割时间,达成闪烁效果】方法下的change态调节“模式”、change态调节“下阈值”、change态调节“上阈值”的闪烁显示效果
  • 处理mode5温感模式下正常状态的显示与超出上下阈值的报警;处理【用计数分割时间,达成闪烁效果】方法下的change态调节“模式”、change态调节“下阈值”、change态调节“上阈值”的闪烁显示效果
  • 处理mode6FM收音机模式下获取Volume和FM频率值,正常状态的显示;分别处理【用计数分割时间,达成闪烁效果】方法下的change态调节“volume”和“FM频率”的闪烁显示效果
  • 处理mode7MP3音乐播放器模式下暂停与终止状态的显示

void myVib_callback() 震动事件回调函数

函数作用:

  • 在震动发生时强制改变state信号量值为0,进入震动恢复模式,设置报警。

重点/创新点:

  • 通过添加判断条件防止连续撞击导致的state变为0而死锁无法跳出此状态。

unsigned int tem_calculate(unsigned int tem_adc) 温度转换辅助函数

函数作用:

  • 通过模拟函数算法将ADC温度值转换为摄氏温度值。

重点/创新点:

  • 数学原理的推导与数学公式的实现

void oled_display() OLED显示屏切换

函数作用:

  • 先清空屏幕并设置取消颜色反转
  • 显示mode0震动恢复模式下的警告图像
  • 显示选择模式下的图像
  • 显示mode1实时时钟模式下的图像
  • 显示mode2双通道秒表模式下的图像
  • 显示mode3定时器模式下的图像
  • 显示mode4光感监测与报警模式下的图像
  • 显示mode5温感监测与报警模式模式下的图像
  • 显示mode6收音机FM模式下的图像
  • 显示mode7MP3音乐播放器模式下的图像

重点/创新点:

  • 详见【图像取模与位图转换】,主要是怎么把图片导入进来能够在OLED上显示。

void uart_callback() 通信接收回调函数

函数作用:

  • PC端python串口处理函数初次打开时,由PC端向STC板发出通信请求,该函数处理该请求并返回通信成功码同时发出提示音。

重点/创新点

  • 保证串口通信通路正常运行

void pc_preview() 计算机展示

函数作用:

对于模型切换模式时,在OLED上显示模式信息的同时在PC端显示模式信息和操作指南。本函数承担向PC端传递模式信息参数的任务。

  • 对于震动恢复模式,这里将记录被强制进入震动恢复模式之前的原模式,一并上传至PC端,以便PC端显示之后将恢复到什么模式。
  • 对于选择模式,这里将记录即将进入的下一模式,一并上传至PC端,以便PC端显示下一模式是什么模式。
  • 对于普通模式,这里将模式代码上传至PC端,PC端将展示这一模式下可行的操作,以引导用户更全面地探索功能并上手。

重点:

  • 串口通信正确正常的进行,PC端正确读取发送的代码并正确地作出反应。

OLED部分实现

OLED原理

不再赘述,详见技术文档。

采购OLED显示屏

淘宝商城购买即可,略去不表。一定要记得问客服要相应的技术文档以及案例测试程序。买回来之后先跑一遍看看自己的是否正常。我购买的型号为0.96inch-OLED-MC096GX-V1.0

采购杜邦线

根据需求采购杜邦线(共有3种,公对母、公对公、母对母),我的OLED有排针,EXT是插口,所以购买了母对母的。因为OLED的排针与EXT口的排列不对应,不能直接插入,需要用杜邦线把对应的进行连接。连接顺序如下。

extOLED
GNDGND
P1.0SCL
P1.1SDA
VCCVCC

OLED加入工程的组件

  • OLED的具体实现参见oled.c文件,
  • OLED部分的函数封装在oled.h,
  • OLED的汉字部分字模在oledfont.h下的unsigned char code Hzk[][32]数组中

本项目使用到的函数

void OLED_ColorTurn(u8 i);//反显函数
void OLED_Clear(void);//清屏函数
void OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 sizey);
void OLED_ShowString(u8 x,u8 y,u8 *chr,u8 sizey);//★
void OLED_ShowCHinese(u8 x,u8 y,u8 no);//★
void OLED_DrawBMP(u8 x,u8 y,u8 sizex, u8 sizey,u8 BMP[]);//★
void OLED_DrawBMP1(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[]);
void OLED_Init(void);

主要用来实现图像、中文、数字的显示。

OLED特性与处理

1、ADC模块与OLED模块冲突,无法同时运行

解决办法:只需要以该参数AdcInit(ADCexpEXT);启动ADC模块即可。原来的问题是默认启动的ADC模块同时接管了EXT扩展,导致OLED无法接入。以该参数启动ADC模块可以释放EXT扩展供OLED启动。

2、OLED会扰乱数码管与LED灯的正常显示

推测原因:这个应该与底层原理有关,推测是它们共用了一些相同的寄存器,导致没法并行处理,大大减缓了OLED和数码管整体体系的显示速度。

目前尚无较好的解决办法,推测使用C重新分配寄存器应该可以解决或优化这一问题。

3、OLED刷新新页面会使数码管与LED灯显示进入一段僵直

与上面的问题相似。OLED模块加入后,在刷新OLED模块时,数码管和LED灯显示会停滞甚至乱码一段时间,然后恢复正常。推测原因与上一个问题相似。

目前尚无较好的解决办法。好在僵直时间较短,属于人可以接受的范围内,该问题可以暂时跳过。

4、OLED切换屏幕时有明显刷新感,连贯性不好

推测是买的OLED刷新率不够高,或者传输效率有限。为了省钱只能牺牲一些性能。

5、基于上述特性,OLED适合单次改变

基于上述的特性,倘若OLED的改变被写入定时回调函数,它将不断被复写,这个频率和数码管与LED灯的写频率是相同的,显然将很严重地影响数码管和LED灯的显示。这样的结果将是数码管和LED灯不显示,OLED灯正常显示。

这是一个教训!OLED灯只适合单次改变,例如在按键触发后改变模式时通知OLED进行改变,就这一次。这个时间与用户体验的整体时间相比是很短暂的,用户应该很愿意等待这么一小会儿。

OLED取模

除去内置的显示数字和字符是它自带写好的(实际上相关的内容也写在oledfont.h内),显示我们想要的图片或者汉字也是非常重要的一个需求。

OLED店家提供了取模软件(好像是XX大学本科生的毕设,都这么硬核的嘛),使用该软件可以很方便地取出图片和汉字的模。

需要调节设置参数如下,主要就是改为C51格式,然后使用列行式进行取模即可。

在这里插入图片描述

取模的结果存放进项目工程内即可,建议规范字模放在oledfont.h内,图片放在resources.h内。这种比较大的图片文件,跟音乐TruE放在一起。保存格式为unsigned char code 类型的二维数组unsigned char code Hzk[][32]

汉字取模比较简单,图片取模需要注意不要太大。图片取模,先用画图打开,重设大小为64*64像素,然后以双色位图bmp格式保存,再使用该取模软件。

OLED代码实现

元素在OLED上显示的位置:需要多调节位置,放到自己喜欢的位置上去。这个过程很繁琐

代码实现:之前分析过,OLED改变不适合放在定时回调函数内,这将使数码管和LED灯不能正常显示。我的解决办法是在按键触发后改变模式时通知OLED进行改变,就这一次,每次显示状态出现改变时才通知OLED进行改变。

具体代码直接调用oled.h包内的函数即可,不再赘述。

PC端用户界面展示实现

串口通信(STC端)

PC端能够知道STC板当前的状态,全靠串口通信,串口通信需要调用到BSP模块的uart1.h这一部分。

串口通信(PC端)

使用Python写串口读入函数,尝试建立串口通信部分代码如下

# 连接设备
ser = serial.Serial(list(serial.tools.list_ports.comports()[0])[0], 1200)
# 判断是否连接到设备
assert(ser != None)#第一次互相通信
startData = b'\xaa\x55\x00\x00\x00\x00'
while 1:ser.write(startData)print("向STC板发送通信申请")data = ser.read_all()sdata = b2s(data)print(sdata)if sdata[:12] == "AA55A1A1A1A1":print("通信成功")breakprint("通信失败")

可视化窗口创建

使用python的tkinter库与多线程来做可视化窗口

# 创建一个窗口
window = tk.Tk()
window.title("STC模型PC端用户端学习引导程序@甘晴void")
window.geometry("1200x800")  # 设置窗口大小# 创建一个标签用于显示数据
data_label = tk.Label(window, text="", font=("Helvetica", 16))
data_label.pack()# 创建一个标签用于显示图片
my_image = PhotoImage(file="welcome.png")
image_label = Label(window, image=my_image)
image_label.pack()# 创建一个线程来更新数据标签
update_thread = threading.Thread(target=update_data_label, args=(data_label, image_label))
update_thread.daemon = True
update_thread.start()window.mainloop()

该段代码创建了一个新的线程来进行与计算机的通信与该窗口的更新,主线程维持该窗口的显示。

PC与STC通信&窗口信息更新

使用如下线程实现PC与STC的通信并更新可视化窗口显示的信息。其中,对于图像进行了缩放,以适应窗口大小,这一部分使用了PIL库中的Image, ImageTk两个模块。

在接收到来自STC板的通信之后,PC端根据通信信号在窗口呈现出该状态对应的可视化界面。

其中,通信格式如下:

PC第一次向STC板发送申请 0xaa 0x55 0x00 0x00 0x00 0x00

STC板向计算机PC回应 0xaa 0x55 0xa1 0xa1 0xa1 0xa1

STC板状态变更后:

震动恢复模式 (第3字节不同值表示震动恢复模式之前所在模式的state值)

  • 0xaa,0x55,0x10,0x00,0x00,0x00
  • 0xaa,0x55,0x20,0x00,0x00,0x00
  • 0xaa,0x55,0x30,0x00,0x00,0x00
  • 0xaa,0x55,0x40,0x00,0x00,0x00
  • 0xaa,0x55,0x50,0x00,0x00,0x00
  • 0xaa,0x55,0x60,0x00,0x00,0x00
  • 0xaa,0x55,0x70,0x00,0x00,0x00
  • 0xaa,0x55,0x80,0x00,0x00,0x00
  • 0xaa,0x55,0x90,0x00,0x00,0x00

选择模式(第3字节的不同值表示即将进入下一模式的state值)

  • 0xaa,0x55,0x3a,0x00,0x00,0x00
  • 0xaa,0x55,0x4a,0x00,0x00,0x00
  • 0xaa,0x55,0x5a,0x00,0x00,0x00
  • 0xaa,0x55,0x6a,0x00,0x00,0x00
  • 0xaa,0x55,0x7a,0x00,0x00,0x00
  • 0xaa,0x55,0x8a,0x00,0x00,0x00
  • 0xaa,0x55,0x9a,0x00,0x00,0x00
  • 0xaa,0x55,0x3a,0x00,0x00,0x00

状态切换(在主动触发K1键产生状态切换时,STC向PC发送状态切换信号,第三字节的不同值表示当前的新状态是什么)

  • 0xaa,0x55,0x01,0x00,0x00,0x00
  • 0xaa,0x55,0x02,0x00,0x00,0x00
  • 0xaa,0x55,0x03,0x00,0x00,0x00
  • 0xaa,0x55,0x04,0x00,0x00,0x00
  • 0xaa,0x55,0x05,0x00,0x00,0x00
  • 0xaa,0x55,0x06,0x00,0x00,0x00
  • 0xaa,0x55,0x07,0x00,0x00,0x00

下面是该部分的python代码

# 线程,用于在通信成功时更新可视化窗口的数据
def update_data_label(data_label, image_label):while True:time.sleep(1)data = ser.read_all()sdata = b2s(data)if sdata[:4] == "AA55":print("通信成功")print(sdata)fifth_value = sdata[4]sixth_value = sdata[5]data_label.config(text=f"通信正常,模式信息{fifth_value,sixth_value}", font=("Helvetica", 16))# 设置图像文件路径image_path = ""#正常模式if fifth_value == '0':if sixth_value == '1':image_path = "mode1.png"elif sixth_value == '2':image_path = "mode2.png"elif sixth_value == '3':image_path = "mode3.png"elif sixth_value == '4':image_path = "mode4.png"elif sixth_value == '5':image_path = "mode5.png"elif sixth_value == '6':image_path = "mode6.png"elif sixth_value == '7':image_path = "mode7.png"#震动恢复模式elif sixth_value == '0':if fifth_value == '1':image_path = "vib_choose_mode.png"elif fifth_value == '2':image_path = "vib_welcome.png"elif fifth_value == '3':image_path = "vib_mode1.png"elif fifth_value == '4':image_path = "vib_mode2.png"elif fifth_value == '5':image_path = "vib_mode3.png"elif fifth_value == '6':image_path = "vib_mode4.png"elif fifth_value == '7':image_path = "vib_mode5.png"elif fifth_value == '8':image_path = "vib_mode6.png"elif fifth_value == '9':image_path = "vib_mode7.png"#选择模式elif sixth_value == 'A':if fifth_value == '3':image_path = "choose_mode1.png"elif fifth_value == '4':image_path = "choose_mode2.png"elif fifth_value == '5':image_path = "choose_mode3.png"elif fifth_value == '6':image_path = "choose_mode4.png"elif fifth_value == '7':image_path = "choose_mode5.png"elif fifth_value == '8':image_path = "choose_mode6.png"elif fifth_value == '9':image_path = "choose_mode7.png"if image_path:# 使用PIL库加载图像image = Image.open(image_path)# 获取窗口大小window_width = 1200 #window.winfo_width()window_height = 800 #window.winfo_height()# 根据窗口大小调整图像大小并保持比例image.thumbnail((window_width, window_height))# 将图像转换为Tkinter PhotoImage对象tk_image = ImageTk.PhotoImage(image)# 更新图像标签image_label.config(image=tk_image)image_label.image = tk_imageelse:# 清空图片print("通信出错")my_image = PhotoImage(file="error.png")image_label.config(image=my_image)

UI用户界面创作

为了节省工作量,我采取将用户界面做成图片并在可视化窗口上显示图片的形式进行。UI界面创作随通信信号分为三类,分别采用不同的背景,在此之外,新增welcome欢迎页面和error通信错误处理页面。详情请见附录。

用户界面较为美观,能够达到教学的功能。欢迎界面展示作者信息与湖大Logo,较好地体现了交互性与展示性。

分模块难点与解决

核心亮点

1、实现了多功能的作用

尽可能多地使用了BSP库的函数。

实现了包括实时时钟、秒表、定时器、温感、光感、震动监测、FM收音机、音乐播放器在内的基础功能。

在基础功能之上还实现了增值功能。包括用户调节定时器时间,调节报警阈值大小,调节FM收音机频率与音量大小,暂停播放与继续播放的功能。

2、配置OLED显示屏

OLED显示屏更加贴切现代生活中用户对于可视化的需求,更加贴近用户群体。通过OLED显示屏,用户可以知道当前STC的具体状态。

3、拥有PC端引导程序

初次使用,用户可能对繁杂的功能一头雾水。此时打开引导程序,计算机将实时获知STC的状态并给予用户充分的引导,将当前模式的具体信息与可能的操作呈现在用户面前。这一段使用python写了可视化的窗口。

4、数码管闪烁效果

使用【用计数分割时间,达成闪烁效果】思想。人为地将时间分割成两段,对于其中的一段时间,目标对象不显示,对于其中的另一段时间,目标对象显示。这样可以达成目标对象闪烁的效果。

5、模式层次分明,初具OS功能

主要模式由“模式”与“选择模式”的状态组成,分别为功能的实现与模式的预告。这两种模式依次间隔排列。

在此之外还有优先级更高的“震动恢复模式”,由震动事件触发,可以从任意模式强制转换。

模式层次结构初具规模,各功能分散合理,初具简单单一作用小型操作系统的规模。

6、广泛应用锁、临界区、信号量等概念

在很多模式都有的子状态“change态”中,当前选择调节的对象是一个临界区,进入临界区需要持有锁或者信号量。

  • 例如在处理mode6:FM模块时,对于FM频率与Volume的调节应用到了临界区的概念,一次只能选定一种,Nav的调节按键是一个临界区,一次只能以一种调节方式访问该临界区。
  • 再如处理mode4光感、mode5温感等的“change态”时,占1bit的信号量控制是否是在调节自己的子状态。给“下阈值”、“上阈值”、“模式”都分配了一个信号量。只有自己的信号量被点亮,才是自己的子状态时间。通过信号量来控制子状态。

7、BSP离散型模块化编程

充分利用BSP离散的事件回调函数进行编程。

  • 设定定时回调函数,该函数负责数码管的呈现,以及一些随时间进行而继续的进程,如秒表计时,定时器等。
  • 设定导航按键&K3按键、Key按键回调函数,这两个函数负责对按键作出回应。这是交互性的灵魂所在。
  • 设定通信接收事件回调函数,该函数对PC请求通信作出回应。
  • 设定震动事件发生回调函数,该函数对外界震动的操作作出回应,强制抓换模式并保存原模式。

8、尽一切可能节约空间

第一次大手大脚地用int和double之后被狠狠地报错。查询资料得知,STC板分配给变量的空间真的很少很少。后来渐渐学会了尽一切可能节约空间。一般来说,能容忍data段大约到127的大小。一些常见的方法如下:

  • 出现次数较少的常量:直接写
  • 比较小的数:用char(1字节)替代int(2字节)
  • 信号量:用bit代替int
  • 非负数:用unsigned int代替int可以提升两倍的范围
  • 常量:添加code关键字修饰使其脱离变量空间进入代码空间(音乐、图片等一定要这样操作)

9、手敲了喜欢的音乐《TruE》

对着简谱将喜欢的乐曲手敲进STC板BSP包识别的格式,最终能播放自己喜欢的音乐。满满的成就感。

该部分单独录制已经制上传B站,有近千播放量。

链接如下:
让单片机唱出TruE!
单片机也能唱TruE(动画版)
在这里插入图片描述

10、OLED与PC端UI界面

OLED与PC端的UI界面均为自己制作,耗费较多的时间,也是希望能给用户带来较好的体验。

OLED显示屏的UI界面需要先画出图片或找到合适的图片,根据复杂的取模操作,最后导出并放在resource.h头文件内,较为复杂。

PC端的UI界面根据模式不同用不同的底色,同时用不同的配色方案配以不同的文字说明。

重要问题与解决

1、ADC模块与OLED模块冲突,无法同时运行。

解决办法:只需要以该参数AdcInit(ADCexpEXT);启动ADC模块即可。原来的问题是默认启动的ADC模块同时接管了EXT扩展,导致OLED无法接入。以该参数启动ADC模块可以释放EXT扩展供OLED启动。

2、ERROR L107: ADDRESS SPACE OVERFLOW keil错误的解决方法:

https://blog.csdn.net/haigear/article/details/121150632

3、ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL

为了遵循某个规则,规定所有的全局变量都视为大写(uppercase),所以除了大小写都一样的变量或函数(全局的)在一个工程中出现时,就会发生这样的错误.

4、error C300: unterminated comment

注释/**/配对不完全

5、使用char K3=GetKeyAct(enumKey3);不能得到K3键的事件结果

adc模块说明中有,由于Nav与K3公用了接口,故K3必须从Nav事件而不是Key事件中回调。

这点很重要!!!花 了好多时间!!

6、*ERROR 248:aggregate initialization needs curly braces

所有的组合变量(数组/结构或联合)初始化时要用花括号括起来

7、*** ERROR L107: ADDRESS SPACE OVERFLOW

原理解释:https://blog.csdn.net/qq_41673920/article/details/86688772

data段不得大于128,否则无法通过

解决方法来源:http://eeskill.com/group/topic/id/2803

【ADDRESS SPACE OVERFLOW】

//----AT89C52-----//

地址空间溢出,简而言之就是RAM空间不够用,通常是由于全局变量过多引起:

解决方法一:
在部分变量定义时加上 [idata]。(系统默认寻址是0-128字节直接寻址区,加上 idata后可增加128-256的间接寻址区)

解决方法二:
在部分只读变量定义时增加关键字[code]

解决方法三:(慎)
在部分变量定义时添加关键字[xdata],需要注意的是这个区域的数据不稳定,在一些需要经常改变的变量中用此关键词定义可能出现程序异常。

解决方法四:
减少全局变量或其大小,可通过减少全局变量,将int型变量在允许情况下改成char型,或把char型改成bit型,以减少全局变量所占空间。

总结

通过完成该模型的设计和实现,我熟悉 STC 学习板的 BSP 库中各功能模块的使用,包括显示、按键、adc、串口通信、数码管显示、FM收音机模块、音乐播放模块、震动事件等。并进一步熟悉此类电子系统的设计、实现、测试等的过程,掌握相关方法和技能。

同时,我借此机会更进一步学习了OLED显示模块的相关接口参数,集成函数包等。在设计中更加了解OLED显示模块的原理与应用。

更进一步,我利用所学的python知识,在之前电子测试平台串口通信的基础之上,开发了附加系统。该系统能在PC端获取STC板目前所处的状态,并对用户作出使用指导与提示。通过这个项目增进对python的运用与串口通信的运用。

前前后后我大约能花上10天左右的时间,断断续续的时间不计入内。从初识BSP和STC板,到逐渐深入了解,到最后有了兴趣,主动深入了解更多的应用知识。我觉得这真的是一个很值得的过程。最后成品出来的时候,真的十分感动。总结来说,我对代码的了解更加深入,特别是事件类型的离散编程。这使得我能轻松地帮同学找到错误,甚至能在很短时间内上手帮同学实现他们想要的功能。当然受限于时间,我还有很多想法没有具体实现,我想,如果有更多的时间,我一定能实现它们。经过夏季学期开发这个项目的经历,今后的日子,我会更加认真地对待工程项目,因为这真的很有成就感。

致谢

从最初的学习探索到后面的模块化编写与调优,许多老师指导了我,如徐成老师、刘峰老师、张洪杰老师、刘三一老师等老师,他们认真负责,在工程项目的总体搭建与具体细节实现上给予了我很多的帮助。徐成老师在BSP模块的编写上给予了我许多的建议,张洪杰老师在温度转换的电阻计算上给予了我帮助,刘峰老师帮助我发现了许多问题,其中有很多是关键性的致命问题,刘三一老师也给予了许多指导。

需要指出的是,老师们在暑假期间放弃自己的休息时间,给予我在迷茫时很多指导,我十分感动。感谢老师们!

附录

资料

OLED显示屏技术文档:

http://www.lcdwiki.com/zh/0.96inch_OLED_Module_MC096GX#.E4.BD.BF.E7.94.A8.E8.AF.B4.E6.98.8E

μvision错误表:

https://wenku.baidu.com/view/2c4cf4125b0216fc700abb68a98271fe910eafa7.html?wkts=1690203184513&bdQuery=source%5Cmain.c%28193%29%3A+error+C248%3A+aggregate+initialization+needs+curly+braces

A橙资料:

https://blog.csdn.net/Aaron503/article/details/126534320

《TruE》:

https://www.bilibili.com/read/cv18073684

红外空调板译码表:

http://nick.txtcc.com/index.php/scm/1956

python源码

import time
import serial
import serial.tools.list_ports
import tkinter as tk
from tkinter import Label, PhotoImage
import threading
from PIL import Image, ImageTk  # 导入PIL库中的Image和ImageTk模块# 字节转字符串
def b2s(data):return ''.join([f'{ch:0>2x}' for ch in data]).upper()# 连接设备
ser = serial.Serial(list(serial.tools.list_ports.comports()[0])[0], 1200)
# 判断是否连接到设备
assert(ser != None)#第一次互相通信
startData = b'\xaa\x55\x00\x00\x00\x00'
while 1:ser.write(startData)print("向STC板发送通信申请")data = ser.read_all()sdata = b2s(data)print(sdata)if sdata[:12] == "AA55A1A1A1A1":print("通信成功")breakprint("通信失败")# 线程,用于在通信成功时更新可视化窗口的数据
def update_data_label(data_label, image_label):while True:time.sleep(1)data = ser.read_all()sdata = b2s(data)if sdata[:4] == "AA55":print("通信成功")print(sdata)fifth_value = sdata[4]sixth_value = sdata[5]data_label.config(text=f"通信正常,模式信息{fifth_value,sixth_value}", font=("Helvetica", 16))# 设置图像文件路径image_path = ""#正常模式if fifth_value == '0':if sixth_value == '1':image_path = "mode1.png"elif sixth_value == '2':image_path = "mode2.png"elif sixth_value == '3':image_path = "mode3.png"elif sixth_value == '4':image_path = "mode4.png"elif sixth_value == '5':image_path = "mode5.png"elif sixth_value == '6':image_path = "mode6.png"elif sixth_value == '7':image_path = "mode7.png"#震动恢复模式elif sixth_value == '0':if fifth_value == '1':image_path = "vib_choose_mode.png"elif fifth_value == '2':image_path = "vib_welcome.png"elif fifth_value == '3':image_path = "vib_mode1.png"elif fifth_value == '4':image_path = "vib_mode2.png"elif fifth_value == '5':image_path = "vib_mode3.png"elif fifth_value == '6':image_path = "vib_mode4.png"elif fifth_value == '7':image_path = "vib_mode5.png"elif fifth_value == '8':image_path = "vib_mode6.png"elif fifth_value == '9':image_path = "vib_mode7.png"#选择模式elif sixth_value == 'A':if fifth_value == '3':image_path = "choose_mode1.png"elif fifth_value == '4':image_path = "choose_mode2.png"elif fifth_value == '5':image_path = "choose_mode3.png"elif fifth_value == '6':image_path = "choose_mode4.png"elif fifth_value == '7':image_path = "choose_mode5.png"elif fifth_value == '8':image_path = "choose_mode6.png"elif fifth_value == '9':image_path = "choose_mode7.png"if image_path:# 使用PIL库加载图像image = Image.open(image_path)# 获取窗口大小window_width = 1200 #window.winfo_width()window_height = 800 #window.winfo_height()# 根据窗口大小调整图像大小并保持比例image.thumbnail((window_width, window_height))# 将图像转换为Tkinter PhotoImage对象tk_image = ImageTk.PhotoImage(image)# 更新图像标签image_label.config(image=tk_image)image_label.image = tk_imageelse:# 清空图片print("通信出错")my_image = PhotoImage(file="error.png")image_label.config(image=my_image)# 创建一个窗口
window = tk.Tk()
window.title("STC模型PC端用户端学习引导程序@甘晴void")
window.geometry("1200x800")  # 设置窗口大小# 创建一个标签用于显示数据
data_label = tk.Label(window, text="", font=("Helvetica", 16))
data_label.pack()# 创建一个标签用于显示图片
my_image = PhotoImage(file="welcome.png")
image_label = Label(window, image=my_image)
image_label.pack()# 创建一个线程来更新数据标签
update_thread = threading.Thread(target=update_data_label, args=(data_label, image_label))
update_thread.daemon = True
update_thread.start()window.mainloop()

μvision的C++源码

main.h

#include "STC15F2K60S2.h"       //芯片头文件
#include "sys.h"                //系统头文件
#include "displayer.h" 				  //数码管显示模块
#include "adc.h"								//导航按键/K3键/热敏电阻/光敏电阻
#include "uart1.h"							//与计算机通信
#include "Beep.h"								//蜂鸣器
#include "music.h"							//音乐
#include "Vib.h"								//震动传感器
#include "key.h"								//K1/K2按键
//#include "IR.h"									//红外按键(该功能废止)
#include "DS1302.h"							//实时时钟模块
#include "FM_Radio.h"						//收音机模块
#include "oled.h"								//OLED显示屏模块
#include "resources.h"					//
#include "math.h"								//调用ln函数code unsigned long SysClock=11059200;         //必须。定义系统工作时钟频率(Hz),用户必须修改成与实际工作频率(下载时选择的)一致
#ifdef _displayer_H_                          //显示模块选用时必须。(数码管显示译码表,用戶可修改、增加等) 
code char decode_table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x08,0x40,0x01,0x41,0x48,0x76,0x00,0x00,0x00,/* 序号:   0  1    2	   3    4	   5    6	   7    8	   9	  10	 11		12   13   14   15   16   17   18   19  *//* 显示:   0  1    2    3    4    5    6    7    8    9   (无)  下-  中-  上-  上中-  中下-                 */  0x3f|0x80,0x06|0x80,0x5b|0x80,0x4f|0x80,0x66|0x80,0x6d|0x80,0x7d|0x80,0x07|0x80,0x7f|0x80,0x6f|0x80,  /* 序号:   20        21        22        23        24        25        26         27        28        29     *//* 带小数点 0         1         2         3         4         5         6          7         8         9      */0x77,0x7c,0x39,0x5E,0x79,0x71,0x3D,0x76,0x30,0x1E,0x75,0x38,0x15,0x37,0x3F,0x73,0x6B,0x33,0x6D,0x31,0x3E,0x3E,0x2A,0x76,0x66,0x5B,/* 序号:30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   51   52   53   54   55   *//*字母		A		 B    C    D    E    F    G    H    I    J    K    L    M    N    O    P    Q    R    S    T    U    V    W    X    Y    Z    */0x37|0x80,0x79|0x80,0x5E|0x80,0x6D|0x80,0x30|0x80,0x31|0x80,0x37|0x80/* 序号:    56        57        58        59        60        61        62    */  /*字母      N.        E.        d.        s.        I.        t.        n.    *//*对应简写 Mon.      TuE.      Wed.     Thurs.     FrI.      Sat.      Sun.   */
};code int mode[]={0,0,0,1,2,3,4,5,6,7};
code int next_mode[]={0,0,1,2,3,4,5,6,7,1};//code unsigned char controller[]={0,1,1,2,1,2,1,10,1,6,1,1,1,3,1,2,1,14,1,1,1,4};#endif

main.c

#include "main.h"//静音测试:用于在图书馆等安静的地方做测试
//方法:注释掉下面的BeepInit();并解除该句void SetBeep(char a,char b);的注释
//void SetBeep(char a,char b);//用户自定义函数声明
void Initial_interface();//初始界面
void myKey_callback();//Key按键触发回调函数
void my100mS_callback();//定时回调函数(用于显示数码管)
void myKN_callback();//导航按键&K3按键的回调函数
void myVib_callback();//震动事件回调函数
unsigned int tem_calculate(unsigned int tem_adc);//温度转换辅助函数
void oled_display();//OLED显示屏切换
void uart_callback();//通信接收回调函数
void pc_preview();//计算机展示//用户程序全局变量定义
char state;//操作系统此时的状态
char previous_state;//陷入切换模式之前的状态
char vib_old_state;//陷入Vib之前的状态
//char maxstate=10;//state的最大编号,修改这个之后需要同时在main.h中修改两个数组//为节省空间,直接在程序里改
bit key_flag = 0;
bit transfer = 0;//state切换时为1,切换后OLED变化后归为0。
//这里是因为OLED若一直刷新,将导致LED闪烁,无法正常显示,OLED短时间内只能设置一次
bit oled_change = 0;char count=0;//用于计数分割时间,达成闪烁效果//mode1:Clock实时时钟初始默认值
code struct_DS1302_RTC rtc_origin = {0x30,0x32,0x11,0x25,0x7,0x2,0x23};//  秒 分 时 日 月 星期 年
struct_DS1302_RTC rtc;
char clock_mode = 0;//0-时分秒  1-年月日   2-星期//mode2:stopwatch秒表模式全局变量
unsigned int time1=0,time2 = 0;//累积量:两个秒表分别计时的值。
bit stopwatch_1=0,stopwatch_2 = 0;//信号量:两个秒表的状态,是否开始计时。该信号量为1时,定时回调函数被调用时会累加时间。//mode3:timer定时器
int timer = 3481;//注意这里为什么不能用unsigned int
//初始定时时间(默认值在这里设置)
bit timer_change = 0;//当前是否处于change态,初始不在change态
bit timer_minute = 0;//当前是否在change态的调节“分”
bit timer_second = 0;//当前是否在change态的调节“秒”
bit timer_run = 0;//当前是否处于“计时态”//mode4:light_intensity
char light_intensity_lowerlimit = 20;//光照报警值下阈值
char light_intensity_upperlimit = 100;//光照报警值上阈值
bit light_intensity_mode = 1;//光照报警模式(是否报警,默认报警)
bit light_intensity_change = 0;//当前是否处于change态
bit light_intensity_lowerlimit_change = 0;//当前是否处于change态的调节“下阈值”
bit light_intensity_upperlimit_change = 0;//当前是否处于change态的调节“上阈值”
bit light_intensity_mode_change = 0;//当前是否处于change态的调节“报警模式”//mode5:temperature
unsigned int temperature_lowerlimit = 200;//温度报警值下阈值
unsigned int temperature_upperlimit = 400;//温度报警值上阈值
bit temperature_mode = 1;//温感报警模式(是否报警,默认报警)
bit temperature_change = 0;//当前是否处于change态
bit temperature_lowerlimit_change = 0;//当前是否处于change态的调节“下阈值”
bit temperature_upperlimit_change = 0;//当前是否处于change态的调节“上阈值”
bit temperature_mode_change = 0;//当前是否处于change态的调节“报警模式”//mode6:FM收音机全局变量
code struct_FMRadio radio_origin = {886,3,0,1,1};//频率*10 音量 灯 灯 灯 (0亮1灭)
//107.0浙江广播 96.8浙江音乐广播
//88.6长沙音乐广播 89.3湖南音乐之声
bit FM_frequency = 0; //是否在调节频率
bit FM_volume = 0;    //是否在调节音量
bit FM_mutex = 0; //对于导航按键访问的锁//mode7:Mp3//mode8:RemoteControl//与计算机通信
code char datahead[]={0xaa,0x55};//包头
char datanow[];//接收数据保存地址
code char back[]={0xaa,0x55,0xa1,0xa1,0xa1,0xa1};//初次通讯返回值//主函数
void main()
{//加载模块//InitializationKeyInit();BeepInit();//静音测试时注释此句OLED_Init();//启动OLED模块AdcInit(ADCexpEXT);//由于ADC模块自带对EXT口的控制,以该参数启动以解除控制,释放EXT口给OLEDDisplayerInit();DS1302Init(rtc_origin);FMRadioInit(radio_origin);//FM收音机模块MusicPlayerInit();//IrInit(NEC_R05d);VibInit();Uart1Init(1200);SetUart1Rxd(datanow,6,datahead,0);//设置事件回调函数SetEventCallBack(enumEventKey, myKey_callback);SetEventCallBack(enumEventSys100mS, my100mS_callback);SetEventCallBack(enumEventNav, myKN_callback);//负责导航键和K3键★★★的回调SetEventCallBack(enumEventVib, myVib_callback);SetEventCallBack(enumEventUart1Rxd,uart_callback);//用户程序状态初始化//用户程序变量初始化state = 0;previous_state = 0;vib_old_state = 0;Initial_interface();SetDisplayerArea(0,7);//RTC_Write(rtc_origin);  //修改系统时//OS主循环MySTC_Init();while(1){MySTC_OS();//用户主循环程序}
}//初始界面
void Initial_interface()
{OLED_DrawBMP(0, 0, 128, 8, BMP0);OLED_ShowString(0, 6, "HUNAN UNIVERSITY", 16);state=2;
}//导航按键和K3按键的回调函数
void myKN_callback()
{char K3=GetAdcNavAct(enumAdcNavKey3);char up=GetAdcNavAct(enumAdcNavKeyUp);char down=GetAdcNavAct(enumAdcNavKeyDown);char left=GetAdcNavAct(enumAdcNavKeyLeft);char right=GetAdcNavAct(enumAdcNavKeyRight);//mode2: stopwatch1  秒表模式1if (state == 4){if (K3 == enumKeyPress){stopwatch_1 =~stopwatch_1;if (stopwatch_1) time1=0;SetBeep(1000,20);}}//mode3: timer-nav  定时器模式导航按键调节if (state == 5 && timer_change == 1){if (up == enumKeyPress){if (timer_minute == 1) timer += 600;else if (timer_second == 1) timer += 10;SetBeep(1000,20);}else if (down == enumKeyPress){if (timer_minute == 1) if (timer-600 > 0) timer -= 600; else timer = 0;else if (timer_second == 1) if (timer-10 > 0) timer -= 10; else timer = 0;SetBeep(1000,20);}if (left == enumKeyPress){if (timer_second == 1) {timer_second = 0; timer_minute = 1;}SetBeep(1000,20);}if (right == enumKeyPress){if (timer_minute == 1) {timer_minute = 0; timer_second = 1;}SetBeep(1000,20);}}//mode3: timer 定时器模式(正常状态与计时状态转换)if (state == 5 && timer_change == 0){if (K3  == enumKeyPress){timer_run = ~timer_run;}}//mode4: light_intensity_changeif (state == 6 && light_intensity_change == 1){if (up == enumKeyPress){if (light_intensity_lowerlimit_change == 1) //下限增大{if (light_intensity_lowerlimit+1 < light_intensity_upperlimit) light_intensity_lowerlimit++;}else if (light_intensity_upperlimit_change == 1) //上限增大{if (light_intensity_upperlimit+1 < 255) light_intensity_upperlimit++;}else if (light_intensity_mode_change == 1) //修改模式{light_intensity_mode = ~light_intensity_mode;}SetBeep(1000,20);}else if (down == enumKeyPress){if (light_intensity_lowerlimit_change == 1) //下限减小{if (light_intensity_lowerlimit-1 > 0) light_intensity_lowerlimit--;}else if (light_intensity_upperlimit_change == 1) //上限减小{if (light_intensity_upperlimit-1 > light_intensity_lowerlimit) light_intensity_upperlimit--;}else if (light_intensity_mode_change == 1) //修改模式{light_intensity_mode = ~light_intensity_mode;}SetBeep(1000,20);}if (left == enumKeyPress){if (light_intensity_lowerlimit_change == 1){light_intensity_lowerlimit_change = 0;light_intensity_mode_change = 1;}if (light_intensity_upperlimit_change == 1){light_intensity_upperlimit_change = 0;light_intensity_lowerlimit_change = 1;}SetBeep(1000,20);}if (right == enumKeyPress){if (light_intensity_lowerlimit_change == 1){light_intensity_lowerlimit_change = 0;light_intensity_upperlimit_change = 1;}if (light_intensity_mode_change == 1){light_intensity_mode_change = 0;light_intensity_lowerlimit_change = 1;}SetBeep(1000,20);}}//mode5: temperature_changeif (state == 7 && temperature_change == 1){if (up == enumKeyPress){if (temperature_lowerlimit_change == 1) //下限增大{if (temperature_lowerlimit+1 < temperature_upperlimit) temperature_lowerlimit++;}else if (temperature_upperlimit_change == 1) //上限增大{if (temperature_upperlimit+1 < 999) temperature_upperlimit++;}else if (temperature_mode_change == 1) //修改模式{temperature_mode = ~temperature_mode;}SetBeep(1000,20);}else if (down == enumKeyPress){if (temperature_lowerlimit_change == 1) //下限减小{if (temperature_lowerlimit-1 > 0) temperature_lowerlimit--;}else if (temperature_upperlimit_change == 1) //上限减小{if (temperature_upperlimit-1 > temperature_lowerlimit) temperature_upperlimit--;}else if (temperature_mode_change == 1) //修改模式{temperature_mode = ~temperature_mode;}SetBeep(1000,20);}if (left == enumKeyPress){if (temperature_lowerlimit_change == 1){temperature_lowerlimit_change = 0;temperature_mode_change = 1;}if (temperature_upperlimit_change == 1){temperature_upperlimit_change = 0;temperature_lowerlimit_change = 1;}SetBeep(1000,20);}if (right == enumKeyPress){if (temperature_lowerlimit_change == 1){temperature_lowerlimit_change = 0;temperature_upperlimit_change = 1;}if (temperature_mode_change == 1){temperature_mode_change = 0;temperature_lowerlimit_change = 1;}SetBeep(1000,20);}}//mode6: FM收音机模式(K3)if (state == 8){if (K3 == enumKeyPress && FM_mutex == 0)//未选中状态进入选中状态{FM_mutex = 1;//获取锁FM_volume = 1;SetBeep(1500,20);}else if (K3 == enumKeyPress && FM_mutex == 1 && FM_volume == 1)//选中状态恢复未选中状态{FM_mutex = 0;//释放锁FM_volume = 0;SetBeep(1500,20);}}//mode6: FM收音机模式导航按键调节if (state == 8){struct_FMRadio radio;radio.frequency = GetFMRadio().frequency;radio.volume = GetFMRadio().volume;radio.GP1 = GetFMRadio().GP1;radio.GP2 = GetFMRadio().GP2;radio.GP3 = GetFMRadio().GP3;if (up == enumKeyPress){if (FM_frequency == 1) radio.frequency += 1;else if (FM_volume == 1) radio.volume += 1;SetBeep(1000,20);}else if (down == enumKeyPress){if (FM_frequency == 1) radio.frequency -= 1;else if (FM_volume == 1) radio.volume -= 1;SetBeep(1000,20);}SetFMRadio(radio);}}//Key 按键触发回调函数
void myKey_callback()
{char K1=GetKeyAct(enumKey1);char K2=GetKeyAct(enumKey2);//char K3=GetKeyAct(enumKey3);//char K3=GetAdcNavAct(enumAdcNavKey3);//特别注意://由于导航按键与K3键共用了单片机同一个端口(P1.7),//启用ADC模块后,P1.7口IO功能失效,//只能用GetAdcNavAct(char Nav_button)函数获取K3按键的事件或状态。if (K1 == enumKeyPress){oled_change = 1;}//切换模式if (state != 0)//排除Vib模式{if (key_flag == 0 && K1 == enumKeyPress){previous_state=state;//保存原状态state=1;key_flag=1;}else if (key_flag == 1 && K1 == enumKeyPress){if (previous_state < 9){SetBeep(600,10);state=previous_state+1;//切换到下一个模式transfer=1;}else{SetBeep(600,10);state=3;//模式到尽头,切换回开头transfer=1;}key_flag=0;}}else if (state == 0){if (K1 == enumKeyPress){state = vib_old_state;}}//mode1: 实时时钟模式-切换查看 时分秒/年月日/星期if (state == 3){if (K2 == enumKeyPress){if (clock_mode<2) clock_mode++;else clock_mode = 0;}}//mode2: 秒表模式2if (state == 4){if (K2 == enumKeyPress){stopwatch_2 =~stopwatch_2;if (stopwatch_2) time2=0;SetBeep(1500,20);}}//mode3: 定时器模式(normal state <=> change state)if (state == 5 && timer_run == 0){if (K2 == enumKeyPress){if (timer_change == 0) timer_second = 1;timer_change = ~timer_change;}}//mode4: 光感模式(normal state <=> change state)if (state == 6){if (K2 == enumKeyPress){light_intensity_change = ~light_intensity_change;light_intensity_lowerlimit_change = 1;}}//mode5: 温感模式(normal state <=> change state)if (state == 7){if (K2 == enumKeyPress){temperature_change = ~temperature_change;temperature_lowerlimit_change = 1;}}//mode6: FM收音机模式(K2)if (state == 8){if (K2 == enumKeyPress && FM_mutex == 0)//未选中状态进入选中状态{FM_mutex = 1;//获取锁FM_frequency = 1;SetBeep(1500,20);}else if (K2 == enumKeyPress && FM_mutex == 1 && FM_frequency == 1)//选中状态恢复未选中状态{FM_mutex = 0;//释放锁FM_frequency = 0;SetBeep(1500,20);}}//mode7: MP3播放器if (state == 9){if (K2 == enumKeyPress && GetPlayerMode() == enumModeStop)//停止状态,初次按下K2开始{SetMusic(90,0xFA,&song_TruE,sizeof(song_TruE),enumMscNull);//改动时注意两个要一起改动SetPlayerMode(enumModePlay);}else if (K2 == enumKeyPress && GetPlayerMode() == enumModePlay)//仍在播放,按下K2暂停{SetPlayerMode(enumModePause);}else if (K2 == enumKeyPress && GetPlayerMode() == enumModePause)//暂停状态,按下K2继续{SetPlayerMode(enumModePlay);}}//mode7(end): 离开音乐播放模式,自动停止播放if (state != 9 && (GetPlayerMode() == enumModePause || GetPlayerMode() == enumModePlay))SetPlayerMode(enumModeStop);/*该功能废止//mode8: 遥控模式if (state == 10){if (K2 == enumKeyPress){if(IrTxdSet(&controller,22) == enumIrTxOK) SetBeep(1500,20);}}*/}//定时回调函数(用于显示数码管)
void my100mS_callback()
{if (oled_change == 1){oled_display();pc_preview();oled_change = 0;}//秒表模式,在秒表模式之外也计时if(stopwatch_1 ==1)  time1++;if(stopwatch_2 ==1)  time2++;//定时器模式,在定时器之外也进行if (timer_run == 1 ) timer--;if (timer == 0 && timer_change != 1){timer_run = 0;SetBeep(1400,200);timer = 3000;}switch(state){//Vib处理模式界面case 0:{Seg7Print(30,13,1,11,11,1,13,30);break;}//切换模式界面case 1:{if (transfer == 1)//state转移,需要改变屏幕{//OLED_ShowString(0, 6, "Next Mode:", 16);//中间步骤使用transfer=0;oled_change=1;}Seg7Print(32,37,44,44,48,34,12,next_mode[previous_state]);LedPrint(0);break;}//初始欢迎界面:HNU-CSEE+流水灯case 2:{unsigned char a;Seg7Print(37,43,50,12,32,48,34,34);if( a != 0) a=a<<1;else a=0x01;LedPrint(a);break;}//Mode1:实时时钟//初始显示时间,使用K2键依次切换显示 时分秒/年月日/星期(英文+数字)case 3:{rtc = RTC_Read();switch(clock_mode){case 0:{Seg7Print(rtc.hour/16,rtc.hour%16,12,rtc.minute/16,rtc.minute%16,12,rtc.second/16,rtc.second%16);break;}case 1:{Seg7Print(rtc.year/16,rtc.year%16,12,rtc.month/16,rtc.month%16,12,rtc.day/16,rtc.day%16);break;}case 2:{unsigned char weekday = rtc.week;switch(weekday){case 1:{Seg7Print(43,43,44,56,10,10,12,1); break;}case 2:{Seg7Print(49,50,57,10,10,10,12,2); break;}case 3:{Seg7Print(50,50,34,58,10,10,12,3); break;}case 4:{Seg7Print(49,37,50,47,59,10,12,4); break;}case 5:{Seg7Print(35,47,60,10,10,10,12,4); break;}case 6:{Seg7Print(48,30,61,10,10,10,12,4); break;}case 7:{Seg7Print(48,50,62,10,10,10,12,4); break;}}break;}}break;}//Mode2:双通道秒表//使用K3/K2键分别独立记两个表,切换模式不影响计时,将在后台继续case 4:{unsigned char d0,d1,d2,d3,d4,d5,d6,d7;d7 = (time1/1000)%10;	if (d7 == 0) d7 = 10;d6 = (time1/100)%10;	if (d6 == 0) d6 = 10;d5 = (time1/10)%10+20;//这里要显示小数点d4 = (time1%10);d3 = (time2/1000)%10;	if (d3 == 0) d3 = 10;d2 = (time2/100)%10;	if (d2 == 0) d2 = 10;d1 = (time2/10)%10+20;//这里要显示小数点d0 = (time2%10);Seg7Print(d7,d6,d5,d4,d3,d2,d1,d0);break;}//Mode3:定时器case 5:{count++;if (count<=3)//用计数分割时间,达成闪烁效果{Seg7Print(10,10,timer/10/60/10,timer/10/60%10,12,timer/10%60/10,timer/10%60%10+20,timer%10);}else{if (timer_change == 0)//正常状态 或 计数模式{if (timer_run == 0) Seg7Print(10,10,timer/10/60/10,timer/10/60%10,12,timer/10%60/10,timer/10%60%10+20,timer%10);else if (timer_run == 1) Seg7Print(45,10,timer/10/60/10,timer/10/60%10,12,timer/10%60/10,timer/10%60%10+20,timer%10);}else if (timer_minute == 1)//调节分钟,分钟闪烁{Seg7Print(32,10,10,10,12,timer/10%60/10,timer/10%60%10+20,timer%10);}else if (timer_second == 1)//调节秒钟,秒钟闪烁{Seg7Print(32,10,timer/10/60/10,timer/10/60%10,12,10,10,10);}}if (count > 5) count=0;break;}//Mode4:光照监测与报警case 6:{unsigned int num = GetADC().Rop;if (light_intensity_change == 0)//正常模式{Seg7Print(34,4,12,10,10,num/100,num/10%10,num%10);if (light_intensity_mode == 1){if (num < light_intensity_lowerlimit){SetBeep(1200,200);}else if (num > light_intensity_upperlimit){SetBeep(2000,200);}}}else if (light_intensity_change == 1)//change模式{count++;if (count<=3)//用计数分割时间,达成闪烁效果{Seg7Print(light_intensity_mode,light_intensity_lowerlimit/100%10,light_intensity_lowerlimit/10%10,light_intensity_lowerlimit%10,12,light_intensity_upperlimit/100%10,light_intensity_upperlimit/10%10,light_intensity_upperlimit%10);}else{if (light_intensity_lowerlimit_change == 1) //下限改动{Seg7Print(light_intensity_mode,10,10,10,12,light_intensity_upperlimit/100%10,light_intensity_upperlimit/10%10,light_intensity_upperlimit%10);}else if (light_intensity_upperlimit_change == 1) //上限改动{Seg7Print(light_intensity_mode,light_intensity_lowerlimit/100%10,light_intensity_lowerlimit/10%10,light_intensity_lowerlimit%10,12,10,10,10);}else if (light_intensity_mode_change == 1) //模式改动{Seg7Print(10,light_intensity_lowerlimit/100%10,light_intensity_lowerlimit/10%10,light_intensity_lowerlimit%10,12,light_intensity_upperlimit/100%10,light_intensity_upperlimit/10%10,light_intensity_upperlimit%10);}}if (count > 5) count=0;}break;}//Mode5:温度监测与报警case 7:{unsigned int tem_adc = GetADC().Rt;unsigned int tem = tem_calculate(tem_adc);if (temperature_change == 0)//正常模式{Seg7Print(34,5,12,10,10,tem/100%10,20+tem/10%10,tem%10);//第二位显示小数点if (temperature_mode == 1){if (tem/10 < 20){SetBeep(1200,200);}else if (tem/10 > 40){SetBeep(2000,200);}}}else if (temperature_change == 1)//change模式{count++;if (count<=3)//用计数分割时间,达成闪烁效果{Seg7Print(temperature_mode,temperature_lowerlimit/100%10,20+temperature_lowerlimit/10%10,temperature_lowerlimit%10,12,temperature_upperlimit/100%10,20+temperature_upperlimit/10%10,temperature_upperlimit%10);}else{if (temperature_lowerlimit_change == 1) //下限改动{Seg7Print(temperature_mode,10,10,10,12,temperature_upperlimit/100%10,20+temperature_upperlimit/10%10,temperature_upperlimit%10);}else if (temperature_upperlimit_change == 1) //上限改动{Seg7Print(temperature_mode,temperature_lowerlimit/100%10,20+temperature_lowerlimit/10%10,temperature_lowerlimit%10,12,10,10,10);}else if (temperature_mode_change == 1) //模式改动{Seg7Print(10,temperature_lowerlimit/100%10,20+temperature_lowerlimit/10%10,temperature_lowerlimit%10,12,temperature_upperlimit/100%10,20+temperature_upperlimit/10%10,temperature_upperlimit%10);}}if (count > 5) count=0;}break;}//Mode6:FM收音机//按K1或K2进入选中状态,分别调节音量和频率,按上下导航键调节值大小case 8:{unsigned int frequency = GetFMRadio().frequency;unsigned char volume = GetFMRadio().volume;unsigned char fre0,fre1,fre2,vol0,vol1;fre0 = frequency%10;fre1 = frequency/10%10+20;fre2 = frequency/100%10; if (fre2 == 0) fre2 = 10;vol0 = volume%10;vol1 = volume/10%10;count++;if (count<=3)//用计数分割时间,达成闪烁效果{Seg7Print(50,vol1,vol0,10,35,fre2,fre1,fre0);}else{if (FM_frequency == 0 && FM_volume == 0)//正常情况{Seg7Print(50,vol1,vol0,10,35,fre2,fre1,fre0);}else if (FM_frequency == 1)//调节频率,频率闪烁{Seg7Print(50,vol1,vol0,10,35,10,10,10);}else if (FM_volume == 1)//调节音量,音量闪烁{Seg7Print(50,10,10,10,35,fre2,fre1,fre0);}}if (count > 5) count=0;break;}//Mode7:MP3case 9:{if (GetPlayerMode() == enumModeStop) Seg7Print(34,7,12,10,10,10,10,10);if (GetPlayerMode() == enumModePause) Seg7Print(45,30,50,48,34,10,10,10);break;}/*该功能最后没有实现//Mode8:(格力)空调遥控case 10:{Seg7Print(12,12,43,44,12,8,12,12);break;}*/default:{//do nothingbreak;}};}//震动事件回调函数
void myVib_callback()
{if (state != 0) vib_old_state = state;//加判断条件防止连续撞击导致state变为0,锁死出不去state = 0;SetBeep(600,10);oled_change = 1;
}//温度转换辅助函数
unsigned int tem_calculate(unsigned int tem_adc)
{float vccx=tem_adc/1000.0;float lnx=log(vccx/(1-vccx));float tem=1/((lnx/3950)+(1/298.15))-273.15;float tem10=tem*10;unsigned int ans=(int)tem10;return ans;
}//oled显示屏切换
void oled_display()
{OLED_Clear();//OLED_ColorTurn(0);switch(state){case 0:{//震动警告OLED_DrawBMP1(0, 0, 64, 64, vib_avater);OLED_ShowString(0, 0, "  Vib Detected  ", 16);OLED_ShowCHinese(64, 3, 29);OLED_ShowCHinese(80, 3, 30);OLED_ShowCHinese(96, 3, 31);OLED_ShowCHinese(112, 3, 32);break;}case 1:{//选择模式OLED_DrawBMP1(0, 0, 64, 64, choose_avater);OLED_ShowString(0, 0, "CHOOSE YOUR MODE", 16);OLED_ShowCHinese(64, 3, 33);OLED_ShowCHinese(80, 3, 34);OLED_ShowCHinese(96, 3, 35);OLED_ShowCHinese(112, 3, 36);break;}case 2:{//由初始化函数代为处理,此处不作操作break;}case 3:{//MODE-1 实时时钟OLED_DrawBMP1(0, 0, 64, 64, clock_avater);OLED_ShowString(0, 0, " MODE:01  CLOCK ", 16);OLED_ShowCHinese(64, 3, 0);OLED_ShowCHinese(80, 3, 1);OLED_ShowCHinese(96, 3, 2);OLED_ShowCHinese(112, 3, 3);break;}case 4:{//MODE-2 双通道秒表OLED_DrawBMP1(0, 0, 64, 64, stopwatch_avater);OLED_ShowString(0, 0, "MODE:02STOPWATCH", 16);OLED_ShowCHinese(64, 3, 4);OLED_ShowCHinese(80, 3, 5);OLED_ShowCHinese(96, 3, 6);OLED_ShowCHinese(64, 5, 7);OLED_ShowCHinese(80, 5, 8);break;}case 5:{//MODE-3 定时器OLED_DrawBMP1(0, 0, 64, 64, timer_avater);OLED_ShowString(0, 0, " MODE:03  TIMER ", 16);OLED_ShowCHinese(64, 3, 9);OLED_ShowCHinese(80, 3, 10);OLED_ShowCHinese(96, 3, 11);break;}case 6:{//MODE-4 光感监测与报警OLED_DrawBMP1(0, 0, 64, 64, light_avater);OLED_ShowString(0, 0, " MODE:04 light  ", 16);OLED_ShowCHinese(64, 3, 12);OLED_ShowCHinese(80, 3, 13);OLED_ShowCHinese(96, 3, 14);OLED_ShowCHinese(112, 3, 15);OLED_ShowCHinese(64, 5, 16);OLED_ShowCHinese(80, 5, 17);OLED_ShowCHinese(96, 5, 18);break;}case 7:{//MODE-5 温度监测与报警OLED_DrawBMP1(0, 0, 64, 64, temperature_avater);OLED_ShowString(0, 0, " MODE:05  Temp  ", 16);OLED_ShowCHinese(64, 3, 19);OLED_ShowCHinese(80, 3, 20);OLED_ShowCHinese(96, 3, 21);OLED_ShowCHinese(112, 3, 22);OLED_ShowCHinese(64, 5, 23);OLED_ShowCHinese(80, 5, 24);OLED_ShowCHinese(96, 5, 25);break;}case 8:{//MODE-6 收音机FMOLED_DrawBMP1(0, 0, 64, 64, FM_avater);OLED_ShowString(0, 0, " MODE:06   FM   ", 16);OLED_ShowCHinese(64, 3, 26);OLED_ShowCHinese(80, 3, 27);OLED_ShowCHinese(96, 3, 28);break;}case 9:{//MODE-7 音乐//OLED_ColorTurn(1);OLED_DrawBMP1(0, 0, 64, 64, music_avater);OLED_ShowString(0, 0, " MODE:07  MUSIC ", 16);break;}default:{//do nothingbreak;}}
}//通信接收回调函数
void uart_callback()
{//if (datanow[2] == 0x00) SetBeep(200,10);Uart1Print(back,6);SetBeep(2000,10);
}//计算机展示
void pc_preview()
{switch(state){case 0:{//震动警告code char vib_pc_1[]={0xaa,0x55,0x10,0x00,0x00,0x00};code char vib_pc_2[]={0xaa,0x55,0x20,0x00,0x00,0x00};code char vib_pc_3[]={0xaa,0x55,0x30,0x00,0x00,0x00};code char vib_pc_4[]={0xaa,0x55,0x40,0x00,0x00,0x00};code char vib_pc_5[]={0xaa,0x55,0x50,0x00,0x00,0x00};code char vib_pc_6[]={0xaa,0x55,0x60,0x00,0x00,0x00};code char vib_pc_7[]={0xaa,0x55,0x70,0x00,0x00,0x00};code char vib_pc_8[]={0xaa,0x55,0x80,0x00,0x00,0x00};code char vib_pc_9[]={0xaa,0x55,0x90,0x00,0x00,0x00};switch (vib_old_state){case 1: {Uart1Print(vib_pc_1,6); break; }case 2: {Uart1Print(vib_pc_2,6); break; }case 3: {Uart1Print(vib_pc_3,6); break; }case 4: {Uart1Print(vib_pc_4,6); break; }case 5: {Uart1Print(vib_pc_5,6); break; }case 6: {Uart1Print(vib_pc_6,6); break; }case 7: {Uart1Print(vib_pc_7,6); break; }case 8: {Uart1Print(vib_pc_8,6); break; }case 9: {Uart1Print(vib_pc_9,6); break; }default: {break;}}break;}case 1:{//选择模式code char choose_pc_2[]={0xaa,0x55,0x3a,0x00,0x00,0x00};code char choose_pc_3[]={0xaa,0x55,0x4a,0x00,0x00,0x00};code char choose_pc_4[]={0xaa,0x55,0x5a,0x00,0x00,0x00};code char choose_pc_5[]={0xaa,0x55,0x6a,0x00,0x00,0x00};code char choose_pc_6[]={0xaa,0x55,0x7a,0x00,0x00,0x00};code char choose_pc_7[]={0xaa,0x55,0x8a,0x00,0x00,0x00};code char choose_pc_8[]={0xaa,0x55,0x9a,0x00,0x00,0x00};code char choose_pc_9[]={0xaa,0x55,0x3a,0x00,0x00,0x00};switch (previous_state){case 2: {Uart1Print(choose_pc_2,6); break; }case 3: {Uart1Print(choose_pc_3,6); break; }case 4: {Uart1Print(choose_pc_4,6); break; }case 5: {Uart1Print(choose_pc_5,6); break; }case 6: {Uart1Print(choose_pc_6,6); break; }case 7: {Uart1Print(choose_pc_7,6); break; }case 8: {Uart1Print(choose_pc_8,6); break; }case 9: {Uart1Print(choose_pc_9,6); break; }default: {break;}}break;}case 2:{code char welcome_pc[]={0xaa,0x55,0xa1,0xa1,0xa1,0xa1};Uart1Print(welcome_pc,6);break;}case 3:{//MODE-1 实时时钟code char clock_pc[]={0xaa,0x55,0x01,0x00,0x00,0x00};Uart1Print(clock_pc,6);break;}case 4:{//MODE-2 双通道秒表code char stopwatch_pc[]={0xaa,0x55,0x02,0x00,0x00,0x00};Uart1Print(stopwatch_pc,6);break;}case 5:{//MODE-3 定时器code char timer_pc[]={0xaa,0x55,0x03,0x00,0x00,0x00};Uart1Print(timer_pc,6);break;}case 6:{//MODE-4 光感监测与报警code char light_pc[]={0xaa,0x55,0x04,0x00,0x00,0x00};Uart1Print(light_pc,6);break;}case 7:{//MODE-5 温度监测与报警code char temperature_pc[]={0xaa,0x55,0x05,0x00,0x00,0x00};Uart1Print(temperature_pc,6);break;}case 8:{//MODE-6 收音机FMcode char FM_pc[]={0xaa,0x55,0x06,0x00,0x00,0x00};Uart1Print(FM_pc,6);break;}case 9:{//MODE-7 音乐code char music_pc[]={0xaa,0x55,0x07,0x00,0x00,0x00};Uart1Print(music_pc,6);break;}default:{//do nothingbreak;}}
}

oled.h

#ifndef __OLED_H
#define __OLED_H#include <STC15F2K60S2.H>		  	 #define  u8 unsigned char 
#define  u16 unsigned int
#define  u32 unsigned int#define OLED_CMD  0	//
#define OLED_DATA 1	//sbit OLED_SCL=P1^0;//SCL
sbit OLED_SDA=P1^1;//SDA
sbit OLED_RES =P1^2;//RES//-----------------OLED----------------#define OLED_SCL_Clr() OLED_SCL=0
#define OLED_SCL_Set() OLED_SCL=1#define OLED_SDA_Clr() OLED_SDA=0
#define OLED_SDA_Set() OLED_SDA=1#define OLED_RES_Clr() OLED_RES=0
#define OLED_RES_Set() OLED_RES=1//OLED
void OLED_Write_GRAM(u8 x,u8 y,bit value);//
void OLED_Refresh(void);//
void delay_ms(unsigned int ms);//
void OLED_ColorTurn(u8 i);//
void OLED_DisplayTurn(u8 i);//
void OLED_WR_Byte(u8 dat,u8 cmd);//
void OLED_Set_Pos(u8 x, u8 y);
void OLED_Display_On(void);
void OLED_Display_Off(void);
void OLED_Clear(void);//
void OLED_ShowChar(u8 x,u8 y,u8 chr,u8 sizey);
u32 oled_pow(u8 m,u8 n);
void OLED_ShowNum(u8 x,u8 y,u32 num,u8 len,u8 sizey);
void OLED_ShowString(u8 x,u8 y,u8 *chr,u8 sizey);//
void OLED_ShowCHinese(u8 x,u8 y,u8 no);//
void OLED_DrawBMP(u8 x,u8 y,u8 sizex, u8 sizey,u8 BMP[]);//
void OLED_DrawBMP1(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[]);
void OLED_Init(void);
#endif  

oled.c

#include "oled.h"
#include "oledfont.h"
// OLED的显存
//存放格式如下.
//[0]0 1 2 3 ... 127
//[1]0 1 2 3 ... 127
//[2]0 1 2 3 ... 127
//[3]0 1 2 3 ... 127
//[4]0 1 2 3 ... 127
//[5]0 1 2 3 ... 127
//[6]0 1 2 3 ... 127
//[7]0 1 2 3 ... 127
xdata unsigned char OLED_GRAM[64][8] = {0};/*****************************************************************/
//显示地图上的点
//我设置的是y轴向下的坐标系
void OLED_Write_GRAM(u8 x, u8 y, bit value)
{u8 OLED_page = y / 8;u8 OLED_page_value = 1 << y % 8;if (x >= 64)return;if (value)OLED_GRAM[x][OLED_page] |= OLED_page_value;elseOLED_GRAM[x][OLED_page] &= ~OLED_page_value;
}
/*****************************************************************/
//向OLED传输显存数据
//更新显存到OLED
void OLED_Refresh(void)
{unsigned char i, n;for (i = 0; i < 8; i++){OLED_WR_Byte(0xb0 + i, OLED_CMD); //设置行起始地址OLED_WR_Byte(0x00, OLED_CMD);	  //设置低列起始地址OLED_WR_Byte(0x10, OLED_CMD);	  //设置高列起始地址for (n = 0; n < 64; n++){OLED_WR_Byte(OLED_GRAM[n][i], OLED_DATA);// delay_ms(1);}}for (i = 0; i < 64; i++)OLED_WR_Byte(0x00, OLED_DATA);
}
void delay_ms(unsigned int ms)
{unsigned int a;while (ms){a = 1800;while (a--);ms--;}return;
}//反显函数
void OLED_ColorTurn(u8 i)
{if (i == 0){OLED_WR_Byte(0xA6, OLED_CMD); //正常显示}if (i == 1){OLED_WR_Byte(0xA7, OLED_CMD); //反色显示}
}//屏幕旋转180度
void OLED_DisplayTurn(u8 i)
{if (i == 0){OLED_WR_Byte(0xC8, OLED_CMD); //正常显示OLED_WR_Byte(0xA1, OLED_CMD);}if (i == 1){OLED_WR_Byte(0xC0, OLED_CMD); //反转显示OLED_WR_Byte(0xA0, OLED_CMD);}
}//延时
void IIC_delay(void)
{u8 t = 1;while (t--);
}//起始信号
void I2C_Start(void)
{OLED_SDA_Set();OLED_SCL_Set();IIC_delay();OLED_SDA_Clr();IIC_delay();OLED_SCL_Clr();
}//结束信号
void I2C_Stop(void)
{OLED_SDA_Clr();OLED_SCL_Set();IIC_delay();OLED_SDA_Set();
}//等待信号响应
void I2C_WaitAck(void) //测数据信号的电平
{OLED_SDA_Set();IIC_delay();OLED_SCL_Set();IIC_delay();OLED_SCL_Clr();IIC_delay();
}//写入一个字节
void Send_Byte(u8 dat)
{u8 i;for (i = 0; i < 8; i++){OLED_SCL_Clr(); //将时钟信号设置为低电平if (dat & 0x80) //将dat的8位从最高位依次写入{OLED_SDA_Set();}else{OLED_SDA_Clr();}IIC_delay();OLED_SCL_Set();IIC_delay();OLED_SCL_Clr();dat <<= 1;}
}//发送一个字节
//向SSD1306写入一个字节。
// mode:数据/命令标志 0,表示命令;1,表示数据;
void OLED_WR_Byte(u8 dat, u8 mode)
{I2C_Start();Send_Byte(0x78);I2C_WaitAck();if (mode){Send_Byte(0x40);}else{Send_Byte(0x00);}I2C_WaitAck();Send_Byte(dat);I2C_WaitAck();I2C_Stop();
}//坐标设置void OLED_Set_Pos(u8 x, u8 y)
{OLED_WR_Byte(0xb0 + y, OLED_CMD);OLED_WR_Byte(((x & 0xf0) >> 4) | 0x10, OLED_CMD);OLED_WR_Byte((x & 0x0f), OLED_CMD);
}
//开启OLED显示
void OLED_Display_On(void)
{OLED_WR_Byte(0X8D, OLED_CMD); // SET DCDC命令OLED_WR_Byte(0X14, OLED_CMD); // DCDC ONOLED_WR_Byte(0XAF, OLED_CMD); // DISPLAY ON
}
//关闭OLED显示
void OLED_Display_Off(void)
{OLED_WR_Byte(0X8D, OLED_CMD); // SET DCDC命令OLED_WR_Byte(0X10, OLED_CMD); // DCDC OFFOLED_WR_Byte(0XAE, OLED_CMD); // DISPLAY OFF
}
//清屏函数,清完屏,整个屏幕是黑色的!和没点亮一样!!!
void OLED_Clear(void)
{u8 i, n;for (i = 0; i < 8; i++){OLED_WR_Byte(0xb0 + i, OLED_CMD); //设置页地址(0~7)OLED_WR_Byte(0x00, OLED_CMD);	  //设置显示位置—列低地址OLED_WR_Byte(0x10, OLED_CMD);	  //设置显示位置—列高地址for (n = 0; n < 128; n++)OLED_WR_Byte(0, OLED_DATA);} //更新显示
}//在指定位置显示一个字符,包括部分字符
// x:0~127
// y:0~63
// sizey:选择字体 6x8  8x16
void OLED_ShowChar(u8 x, u8 y, u8 chr, u8 sizey)
{u8 c = 0, sizex = sizey / 2;u16 i = 0, size1;if (sizey == 8)size1 = 6;elsesize1 = (sizey / 8 + ((sizey % 8) ? 1 : 0)) * (sizey / 2);c = chr - ' '; //得到偏移后的值OLED_Set_Pos(x, y);for (i = 0; i < size1; i++){if (i % sizex == 0 && sizey != 8)OLED_Set_Pos(x, y++);if (sizey == 8)OLED_WR_Byte(asc2_0806[c][i], OLED_DATA); // 6X8字号else if (sizey == 16)OLED_WR_Byte(asc2_1608[c][i], OLED_DATA); // 8x16字号//		else if(sizey==xx) OLED_WR_Byte(asc2_xxxx[c][i],OLED_DATA);//用户添加字号elsereturn;}
}
// m^n函数
u32 oled_pow(u8 m, u8 n)
{u32 result = 1;while (n--)result *= m;return result;
}
//显示数字
// x,y :起点坐标
// num:要显示的数字
// len :数字的位数
// sizey:字体大小
void OLED_ShowNum(u8 x, u8 y, u32 num, u8 len, u8 sizey)
{u8 t, temp, m = 0;u8 enshow = 0;if (sizey == 8)m = 2;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 + (sizey / 2 + m) * t, y, ' ', sizey);continue;}elseenshow = 1;}OLED_ShowChar(x + (sizey / 2 + m) * t, y, temp + '0', sizey);}
}
//显示一个字符号串
void OLED_ShowString(u8 x, u8 y, u8 *chr, u8 sizey)
{u8 j = 0;while (chr[j] != '\0'){OLED_ShowChar(x, y, chr[j++], sizey);if (sizey == 8)x += 6;elsex += sizey / 2;}
}
//显示汉字
void OLED_ShowCHinese(u8 x, u8 y, u8 no)
{u8 t, adder = 0;OLED_Set_Pos(x, y);for (t = 0; t < 16; t++){OLED_WR_Byte(Hzk[2 * no][t], OLED_DATA);adder += 1;}OLED_Set_Pos(x, y + 1);for (t = 0; t < 16; t++){OLED_WR_Byte(Hzk[2 * no + 1][t], OLED_DATA);adder += 1;}
}//显示图片
// x,y显示坐标
// sizex,sizey,图片长宽
// BMP:要显示的图片
/***********功能描述:显示显示BMP图片128×64起始点坐标(x,y),x的范围0~127,y为页的范围0~7*****************/
void OLED_DrawBMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[])
{ 	unsigned int j=0;unsigned char 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);	    	}}
}//????
//x,y????
//sizex,sizey,????
//BMP:??????
void OLED_DrawBMP1(u8 x,u8 y,u8 sizex, u8 sizey,u8 BMP[])
{ 	u16 j=0;u8 i,m;sizey=sizey/8+((sizey%8)?1:0);for(i=0;i<sizey;i++){OLED_Set_Pos(x,i+y);for(m=0;m<sizex;m++){      OLED_WR_Byte(BMP[j++],OLED_DATA);	    	}}
} //初始化
void OLED_Init(void)
{OLED_RES_Clr();delay_ms(200);OLED_RES_Set();OLED_WR_Byte(0xAE, OLED_CMD); //--turn off oled panelOLED_WR_Byte(0x00, OLED_CMD); //---set low column addressOLED_WR_Byte(0x10, OLED_CMD); //---set high column addressOLED_WR_Byte(0x40, OLED_CMD); //--set start line address  Set Mapping RAM Display Start Line (0x00~0x3F)OLED_WR_Byte(0x81, OLED_CMD); //--set contrast control registerOLED_WR_Byte(0xCF, OLED_CMD); // Set SEG Output Current BrightnessOLED_WR_Byte(0xA1, OLED_CMD); //--Set SEG/Column Mapping     0xa0左右反置 0xa1正常OLED_WR_Byte(0xC8, OLED_CMD); // Set COM/Row Scan Direction   0xc0上下反置 0xc8正常OLED_WR_Byte(0xA6, OLED_CMD); //--set normal displayOLED_WR_Byte(0xA8, OLED_CMD); //--set multiplex ratio(1 to 64)OLED_WR_Byte(0x3f, OLED_CMD); //--1/64 dutyOLED_WR_Byte(0xD3, OLED_CMD); //-set display offset	Shift Mapping RAM Counter (0x00~0x3F)OLED_WR_Byte(0x00, OLED_CMD); //-not offsetOLED_WR_Byte(0xd5, OLED_CMD); //--set display clock divide ratio/oscillator frequencyOLED_WR_Byte(0x80, OLED_CMD); //--set divide ratio, Set Clock as 100 Frames/SecOLED_WR_Byte(0xD9, OLED_CMD); //--set pre-charge periodOLED_WR_Byte(0xF1, OLED_CMD); // Set Pre-Charge as 15 Clocks & Discharge as 1 ClockOLED_WR_Byte(0xDA, OLED_CMD); //--set com pins hardware configurationOLED_WR_Byte(0x12, OLED_CMD);OLED_WR_Byte(0xDB, OLED_CMD); //--set vcomhOLED_WR_Byte(0x40, OLED_CMD); // Set VCOM Deselect LevelOLED_WR_Byte(0x20, OLED_CMD); //-Set Page Addressing Mode (0x00/0x01/0x02)OLED_WR_Byte(0x02, OLED_CMD); //OLED_WR_Byte(0x8D, OLED_CMD); //--set Charge Pump enable/disableOLED_WR_Byte(0x14, OLED_CMD); //--set(0x10) disableOLED_WR_Byte(0xA4, OLED_CMD); // Disable Entire Display On (0xa4/0xa5)OLED_WR_Byte(0xA6, OLED_CMD); // Disable Inverse Display On (0xa6/a7)OLED_Clear();OLED_WR_Byte(0xAF, OLED_CMD); /*display ON*/
}

oledfont.h

#ifndef __OLEDFONT_H
#define __OLEDFONT_H 	   /************************************6*8�ĵ���************************************/
unsigned char code asc2_0806[][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};//16*16 ASCII�ַ�������
unsigned char code asc2_1608[][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*/
};  
unsigned char code Hzk[][32]={
{0x10,0x0C,0x04,0x84,0x14,0x64,0x05,0x06,0xF4,0x04,0x04,0x04,0x04,0x14,0x0C,0x00},
{0x04,0x84,0x84,0x44,0x47,0x24,0x14,0x0C,0x07,0x0C,0x14,0x24,0x44,0x84,0x04,0x00},/*"实",0*/
{0x00,0xFC,0x84,0x84,0x84,0xFC,0x00,0x10,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x00},
{0x00,0x3F,0x10,0x10,0x10,0x3F,0x00,0x00,0x01,0x06,0x40,0x80,0x7F,0x00,0x00,0x00},/*"时",1*/
{0x00,0xFC,0x84,0x84,0x84,0xFC,0x00,0x10,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x00},
{0x00,0x3F,0x10,0x10,0x10,0x3F,0x00,0x00,0x01,0x06,0x40,0x80,0x7F,0x00,0x00,0x00},/*"时",2*/
{0x20,0x10,0x2C,0xE7,0x24,0x24,0x00,0xF0,0x10,0x10,0xFF,0x10,0x10,0xF0,0x00,0x00},
{0x01,0x01,0x01,0x7F,0x21,0x11,0x00,0x07,0x02,0x02,0xFF,0x02,0x02,0x07,0x00,0x00},/*"钟",3*/
{0x04,0x34,0xC4,0x04,0xC4,0x3C,0x00,0x04,0xFC,0x04,0x04,0x04,0xC4,0x3C,0x00,0x00},
{0x40,0x30,0x0C,0x03,0x0C,0x30,0x80,0x40,0x20,0x13,0x0C,0x13,0x20,0x40,0x80,0x00},/*"双",4*/
{0x40,0x42,0xCC,0x00,0x00,0xE2,0x22,0x2A,0x2A,0xF2,0x2A,0x26,0x22,0xE0,0x00,0x00},
{0x80,0x40,0x3F,0x40,0x80,0xFF,0x89,0x89,0x89,0xBF,0x89,0xA9,0xC9,0xBF,0x80,0x00},/*"通",5*/
{0x40,0x40,0x42,0xCC,0x00,0x08,0xE9,0xAA,0xB8,0xA8,0xA8,0xAA,0xE9,0x08,0x00,0x00},
{0x00,0x40,0x20,0x1F,0x20,0x40,0x5F,0x4A,0x4A,0x4A,0x4A,0x4A,0x5F,0x40,0x40,0x00},/*"道",6*/
{0x24,0x24,0xA4,0xFE,0x23,0x22,0x00,0xC0,0x38,0x00,0xFF,0x00,0x08,0x10,0x60,0x00},
{0x08,0x06,0x01,0xFF,0x01,0x06,0x81,0x80,0x40,0x40,0x27,0x10,0x0C,0x03,0x00,0x00},/*"秒",7*/
{0x00,0x04,0x24,0x24,0x24,0x24,0x24,0xFF,0x24,0x24,0x24,0x24,0x24,0x04,0x00,0x00},
{0x21,0x21,0x11,0x09,0xFD,0x83,0x41,0x23,0x05,0x09,0x11,0x29,0x25,0x41,0x41,0x00},/*"表",8*/
{0x10,0x0C,0x44,0x44,0x44,0x44,0x45,0xC6,0x44,0x44,0x44,0x44,0x44,0x14,0x0C,0x00},
{0x80,0x40,0x20,0x1E,0x20,0x40,0x40,0x7F,0x44,0x44,0x44,0x44,0x44,0x40,0x40,0x00},/*"定",9*/
{0x00,0xFC,0x84,0x84,0x84,0xFC,0x00,0x10,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x00},
{0x00,0x3F,0x10,0x10,0x10,0x3F,0x00,0x00,0x01,0x06,0x40,0x80,0x7F,0x00,0x00,0x00},/*"时",10*/
{0x80,0x80,0x9E,0x92,0x92,0x92,0x9E,0xE0,0x80,0x9E,0xB2,0xD2,0x92,0x9E,0x80,0x00},
{0x08,0x08,0xF4,0x94,0x92,0x92,0xF1,0x00,0x01,0xF2,0x92,0x94,0x94,0xF8,0x08,0x00},/*"器",11*/
{0x40,0x40,0x42,0x44,0x58,0xC0,0x40,0x7F,0x40,0xC0,0x50,0x48,0x46,0x40,0x40,0x00},
{0x80,0x80,0x40,0x20,0x18,0x07,0x00,0x00,0x00,0x3F,0x40,0x40,0x40,0x40,0x78,0x00},/*"光",12*/
{0x00,0x00,0xFC,0x04,0xD4,0x54,0x54,0x54,0xD4,0x04,0x7F,0x84,0xC5,0x36,0x04,0x00},
{0x88,0x66,0x01,0x00,0x63,0x82,0x82,0x92,0xAB,0x84,0x82,0xC1,0x02,0x24,0xCF,0x00},/*"感",13*/
{0x00,0x00,0x7E,0x00,0x00,0xFF,0x00,0x40,0x30,0x0F,0x04,0x14,0x64,0x04,0x00,0x00},
{0x40,0x40,0x7E,0x42,0x42,0x7E,0x42,0x42,0x42,0x7E,0x42,0x42,0x7E,0x40,0x40,0x00},/*"监",14*/
{0x10,0x60,0x02,0x8C,0x00,0xFE,0x02,0xF2,0x02,0xFE,0x00,0xF8,0x00,0xFF,0x00,0x00},
{0x04,0x04,0x7E,0x01,0x80,0x47,0x30,0x0F,0x10,0x27,0x00,0x47,0x80,0x7F,0x00,0x00},/*"测",15*/
{0x00,0x00,0xE0,0x9F,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x08,0x00,0x00},
{0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x48,0x80,0x40,0x3F,0x00,0x00,0x00},/*"与",16*/
{0x10,0x10,0x10,0xFF,0x10,0x90,0x00,0xFE,0x82,0x82,0x82,0x92,0xA2,0x9E,0x00,0x00},
{0x04,0x44,0x82,0x7F,0x01,0x00,0x00,0xFF,0x80,0x43,0x2C,0x10,0x2C,0x43,0x80,0x00},/*"报",17*/
{0x12,0xEA,0xAF,0xAA,0xEA,0x0F,0xFA,0x02,0x88,0x8C,0x57,0x24,0x54,0x8C,0x84,0x00},
{0x02,0x02,0xEA,0xAA,0xAA,0xAB,0xAA,0xAB,0xAA,0xAA,0xAA,0xAA,0xEA,0x02,0x02,0x00},/*"警",18*/
{0x10,0x60,0x02,0x8C,0x00,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00},
{0x04,0x04,0x7E,0x01,0x40,0x7E,0x42,0x42,0x7E,0x42,0x7E,0x42,0x42,0x7E,0x40,0x00},/*"温",19*/
{0x00,0x00,0xFC,0x24,0x24,0x24,0xFC,0x25,0x26,0x24,0xFC,0x24,0x24,0x24,0x04,0x00},
{0x40,0x30,0x8F,0x80,0x84,0x4C,0x55,0x25,0x25,0x25,0x55,0x4C,0x80,0x80,0x80,0x00},/*"度",20*/
{0x00,0x00,0x7E,0x00,0x00,0xFF,0x00,0x40,0x30,0x0F,0x04,0x14,0x64,0x04,0x00,0x00},
{0x40,0x40,0x7E,0x42,0x42,0x7E,0x42,0x42,0x42,0x7E,0x42,0x42,0x7E,0x40,0x40,0x00},/*"监",21*/
{0x10,0x60,0x02,0x8C,0x00,0xFE,0x02,0xF2,0x02,0xFE,0x00,0xF8,0x00,0xFF,0x00,0x00},
{0x04,0x04,0x7E,0x01,0x80,0x47,0x30,0x0F,0x10,0x27,0x00,0x47,0x80,0x7F,0x00,0x00},/*"测",22*/
{0x00,0x00,0xE0,0x9F,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x08,0x00,0x00},
{0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x48,0x80,0x40,0x3F,0x00,0x00,0x00},/*"与",23*/
{0x10,0x10,0x10,0xFF,0x10,0x90,0x00,0xFE,0x82,0x82,0x82,0x92,0xA2,0x9E,0x00,0x00},
{0x04,0x44,0x82,0x7F,0x01,0x00,0x00,0xFF,0x80,0x43,0x2C,0x10,0x2C,0x43,0x80,0x00},/*"报",24*/
{0x12,0xEA,0xAF,0xAA,0xEA,0x0F,0xFA,0x02,0x88,0x8C,0x57,0x24,0x54,0x8C,0x84,0x00},
{0x02,0x02,0xEA,0xAA,0xAA,0xAB,0xAA,0xAB,0xAA,0xAA,0xAA,0xAA,0xEA,0x02,0x02,0x00},/*"警",25*/
{0x00,0xFC,0x00,0x00,0xFF,0x00,0x40,0x20,0xD8,0x17,0x10,0x10,0xF0,0x10,0x10,0x00},
{0x00,0x0F,0x04,0x02,0xFF,0x00,0x80,0x40,0x21,0x16,0x08,0x16,0x21,0x40,0x80,0x00},/*"收",26*/
{0x40,0x40,0x44,0x44,0x54,0x64,0x45,0x46,0x44,0x64,0x54,0x44,0x44,0x40,0x40,0x00},
{0x00,0x00,0x00,0xFF,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0xFF,0x00,0x00,0x00,0x00},/*"音",27*/
{0x10,0x10,0xD0,0xFF,0x90,0x10,0x00,0xFE,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00},
{0x04,0x03,0x00,0xFF,0x00,0x83,0x60,0x1F,0x00,0x00,0x00,0x3F,0x40,0x40,0x78,0x00},/*"机",28*/
{0x10,0x0C,0x05,0x55,0x55,0x55,0x05,0x7F,0x05,0x55,0x55,0x55,0x05,0x14,0x0C,0x00},
{0x80,0x40,0x3F,0x11,0x15,0xF5,0x95,0x15,0x15,0x35,0x55,0x55,0xB5,0x91,0x80,0x00},/*"震",29*/
{0x40,0x44,0xC4,0x44,0x44,0x44,0x40,0x10,0x10,0xFF,0x10,0x10,0x10,0xF0,0x00,0x00},
{0x10,0x3C,0x13,0x10,0x14,0xB8,0x40,0x30,0x0E,0x01,0x40,0x80,0x40,0x3F,0x00,0x00},/*"动",30*/
{0x12,0xEA,0xAF,0xAA,0xEA,0x0F,0xFA,0x02,0x88,0x8C,0x57,0x24,0x54,0x8C,0x84,0x00},
{0x02,0x02,0xEA,0xAA,0xAA,0xAB,0xAA,0xAB,0xAA,0xAA,0xAA,0xAA,0xEA,0x02,0x02,0x00},/*"警",31*/
{0x80,0xA0,0x90,0x8E,0x88,0x88,0x88,0xFF,0x88,0x88,0x88,0x88,0x88,0x80,0x80,0x00},
{0x00,0x00,0x00,0xFC,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xFC,0x00,0x00,0x00,0x00},/*"告",32*/
{0x40,0x40,0x42,0xCC,0x00,0x50,0x4E,0xC8,0x48,0x7F,0xC8,0x48,0x48,0x40,0x00,0x00},
{0x00,0x40,0x20,0x1F,0x20,0x50,0x4C,0x43,0x40,0x40,0x4F,0x50,0x50,0x5C,0x40,0x00},/*"选",33*/
{0x10,0x10,0xFF,0x10,0x00,0x82,0x86,0x4A,0x52,0xA2,0x52,0x4A,0x86,0x80,0x80,0x00},
{0x42,0x82,0x7F,0x01,0x00,0x10,0x12,0x12,0x12,0xFF,0x12,0x12,0x12,0x10,0x00,0x00},/*"择",34*/
{0x10,0x10,0xD0,0xFF,0x90,0x14,0xE4,0xAF,0xA4,0xA4,0xA4,0xAF,0xE4,0x04,0x00,0x00},
{0x04,0x03,0x00,0xFF,0x00,0x89,0x4B,0x2A,0x1A,0x0E,0x1A,0x2A,0x4B,0x88,0x80,0x00},/*"模",35*/
{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},/*"式",36*/
};#endif

resources.h

//BMP
unsigned char code BMP0[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0xE4,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x3F,0x00,0x00,
0x00,0x00,0x00,0x00,0xF8,0xFE,0xFE,0x88,0xF0,0xE0,0xC0,0x00,0x00,0x80,0xC0,0xC0,
0xE0,0xF0,0xF0,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0xF8,0xFC,0x80,0x80,0xE0,0x40,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,
0xFC,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x60,0xC0,0x00,0x10,0x30,0x10,0x98,0xDE,
0xF3,0x70,0x30,0x90,0x18,0x08,0x88,0xC4,0x74,0x3C,0x0E,0x04,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,
0x70,0x78,0x7C,0x3F,0x1F,0x0F,0x07,0x03,0x03,0xC1,0xD0,0x72,0xE3,0xC1,0x00,0xC0,
0xFF,0x3F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x30,0x30,
0x18,0x98,0xDC,0xEC,0x7E,0xB7,0x93,0x9B,0x09,0x0C,0x04,0x06,0xEE,0x0E,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFF,
0xC7,0xC0,0x60,0x72,0x38,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x3C,0x70,0x1B,0x0F,0x04,0x12,0x8D,0x87,0x83,
0xD0,0x48,0x77,0xF3,0xFC,0xF6,0x33,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xE0,0x00,0xC0,0xF8,0x1F,0x01,0x00,
0xC0,0xE0,0x30,0x8C,0xE6,0xFE,0x30,0x18,0xC6,0xFF,0x01,0x1E,0x33,0x01,0x00,0xFF,
0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x08,0x04,0x07,
0x03,0x07,0x84,0xCE,0xFF,0xFB,0x31,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0xC6,0x7E,0x3F,0x07,0x01,
0x01,0x10,0x20,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x82,0x81,0xC1,0xF1,0x48,
0x4C,0x26,0x27,0xE3,0xE1,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFF,0xFF,0x3F,0x0F,0x01,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x03,0x00,0x00,0xE0,0xFF,0x1F,0x00,0x04,0x08,0x10,0x30,0x7F,
0x7F,0x4F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0x01,0x00,0x07,0x00,0x00,0x00,0x08,0x18,0x18,0x0F,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x03,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x07,0x06,0x06,0x02,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x08,0x08,0x0C,0x0E,0x06,0x07,0x03,0x03,0x01,0x01,0x00,0x01,0xFC,
0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,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,0x02,0x02,0x06,0x06,0x06,0x07,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\??\??3\4.bmp",0*/
};//song
code unsigned char song[]={         //《歌唱祖国》
enumMscDrvSeg7andLed,
enumMscSetTone, 0xFA,             //设置音调
0x25, 0x04,
0x25, 0x04,
0x25, 0x18,	
0x25, 0x04,
0x25, 0x04,
0x25, 0x18,	
0x25, 0x04,
0x25, 0x04,
0x25, 0x08,	
0x24, 0x08,
0x23, 0x08,	
0x22, 0x08,
0x21, 0x10,enumMscRepeatBegin,   	
0x15, 0x0c,
0x15, 0x04,0x21, 0x10,
0x15, 0x10,	
0x23, 0x10,
0x21, 0x10,		
0x25, 0x18,
0x26, 0x08,	
0x25, 0x10,0x25, 0x0c,
0x25, 0x04,
0x31, 0x10,
0x31, 0x10,
0x26, 0x0c,
0x25, 0x04,
0x24, 0x08,
0x26, 0x08,
0x25, 0x30,0x25, 0x0c,
0x25, 0x04,
0x26, 0x10,
0x26, 0x10,
0x22, 0x10,
0x22, 0x0c,
0x22, 0x04,
0x25, 0x18,
0x24, 0x08,
0x23, 0x10,0x15, 0x0c,
0x15, 0x04,
0x25, 0x10,
0x25, 0x08,
0x26, 0x08,
0x25, 0x08,
0x24, 0x08,
0x23, 0x08,
0x22, 0x08,
0x21, 0x30,0x25, 0x0c,
0x25, 0x04,
0x31, 0x10,
0x31, 0x10,
0x26, 0x10,
0x26, 0x0c,
0x25, 0x04,
0x24, 0x18,
0x25, 0x08,
0x26, 0x10,0x22, 0x0c,
0x22, 0x04,
0x25, 0x10,
0x25, 0x08,
0x26, 0x08,
0x25, 0x08,
0x24, 0x08,
0x23, 0x08,
0x22, 0x08,
0x21, 0x38,
0x00, 0x08,0x21, 0x0c,
0x15, 0x08,
0x23, 0x10,
0x23, 0x18,
0x00, 0x08,0x23, 0x0c,
0x21, 0x04,
0x26, 0x10,
0x26, 0x18,
0x00, 0x08,0x16, 0x18,
0x16, 0x08,
0x22, 0x10,
0x22, 0x0c,
0x23, 0x04,
0x22, 0x08,
0x21, 0x08,
0x27, 0x08,
0x26, 0x08,
0x15, 0x20,0x21, 0x10,
0x15, 0x10,
0x16, 0x08,
0x16, 0x10,
0x15, 0x08,
0x21, 0x10,
0x22, 0x10,
0x23, 0x10,
0x00, 0x10,0x22, 0x10,
0x26, 0x08,
0x26, 0x08,
0x25, 0x08,
0x25, 0x10,
0x23, 0x08,
0x22, 0x10,
0x26, 0x10,
0x25, 0x10,0x00, 0x08,
0x21, 0x08,
0x31, 0x0c,
0x31, 0x04,
0x31, 0x08,
0x25, 0x08,
0x26, 0x18,
0x31, 0x08,
0x26, 0x0c,
0x25, 0x04,
0x24, 0x08,
0x25, 0x08,
0x25, 0x10,
0x00, 0x10,0x31, 0x0c,
0x31, 0x04,
0x31, 0x08,
0x31, 0x08,
0x25, 0x10,
0x25, 0x08,
0x26, 0x08,
0x25, 0x08,
0x24, 0x08,
0x23, 0x08,
0x22, 0x08,
0x21, 0x10,enumMscSetTone, 0xFB,             //设置音调
enumMscSetBeatsPM,100,            //设置节拍
enumMscRepeatEnd		              //设置重复结束};code unsigned char song_TruE[]={         //TruE
enumMscDrvSeg7andLed,
enumMscSetTone, 0xFA,             //设置音调
enumMscSetBeatsPM,80,            //设置节拍//Line_1(??)
0x00,  0x10,
0x00,  0x10,
0x00,  0x10,
0x00,  0x10,0x36,  0x08,
0x31,  0x08, 
0x35,  0x08,
0x36,  0x08,
0x33,  0x0c,
0x35,  0x04,
0x35,  0x08,
0x32,  0x08,0x33,  0x10,
0x00,  0x10,
0x36,  0x08,
0x35,  0x08,
0x00,  0x10,0x00,  0x08,
0x35,  0x08,
0x36,  0x08,
0x00,  0x08,
0x36,  0x04,
0x33,  0x04,
0x31,  0x08,
0x36,  0x04,
0x32,  0x04,
0x33,  0x08,0x00,  0x08,
0x35,  0x08,
0x36,  0x08,
0x00,  0x08,
0x36,  0x04,
0x35,  0x04,
0x33,  0x08,
0x36,  0x04,
0x33,  0x04,
0x33,  0x08,0x00,  0x10,
0x00,  0x10,
0x00,  0x10,
0x00,  0x10,//Line_2
0x23,  0x08,
0x22,  0x04,
0x23,  0x04,
0x23,  0x10,
0x00,  0x10,
0x00,  0x0c,
0x22,  0x04,0x21,  0x08,
0x16,  0x08,
0x16,  0x10,
0x00,  0x10,
0x21,  0x08,
0x22,  0x08,0x23,  0x08,
0x22,  0x04,
0x23,  0x04,
0x23,  0x10,
0x00,  0x10,
0x00,  0x08,
0x22,  0x04,
0x21,  0x04,0x17,  0x04,
0x21,  0x04,
0x17,  0x08,
0x00,  0x10,
0x00,  0x10,
0x27,  0x08,
0x31,  0x04,
0x27,  0x04,//Line3
0x26,  0x18,
0x25,  0x08,
0x23,  0x08,
0x21,  0x04,
0x21,  0x04,
0x21,  0x04,
0x25,  0x0c,0x23,  0x08,
0x21,  0x04,
0x22,  0x04,
0x22,  0x10,
0x00,  0x0c,
0x21,  0x04,
0x21,  0x08,
0x22,  0x08,0x23,  0x08,
0x22,  0x04,
0x23,  0x04,
0x23,  0x10,
0x00,  0x10,
0x25,  0x08,
0x25,  0x04,
0x26,  0x04,0x25,  0x08,
0x22,  0x04,
0x23,  0x04,
0x22,  0x10,
0x00,  0x10,
0x27,  0x08,
0x31,  0x04,
0x27,  0x04,//Line4
0x26,  0x18,
0x25,  0x08,
0x23,  0x08,
0x21,  0x04,
0x21,  0x04,
0x21,  0x04,
0x25,  0x0c,0x23,  0x08,
0x21,  0x04,
0x22,  0x04,
0x22,  0x10,
0x00,  0x08,
0x31,  0x08,
0x32,  0x08,
0x32,  0x04,
0x33,  0x04,0x32,  0x08,
0x31,  0x04,
0x26,  0x04,
0x26,  0x10,
0x00,  0x0c,
0x22,  0x04,
0x32,  0x08,
0x31,  0x08,0x32,  0x10,
0x32,  0x10,
0x00,  0x10,
0x00,  0x10,//Repeat
0x33,  0x10,
0x33,  0x10,
0x32,  0x10,
0x31,  0x08,
0x27,  0x08,0x26,  0x08,
0x25,  0x04,
0x26,  0x04,
0x26,  0x10,
0x00,  0x10,
0x25,  0x08,
0x31,  0x08,0x33,  0x08,
0x32,  0x04,
0x33,  0x04,
0x33,  0x10,
0x00,  0x0c,
0x25,  0x04,
0x34,  0x0c,
0x33,  0x04,0x32,  0x08,
0x31,  0x04,
0x32,  0x04,
0x32,  0x10,
0x00,  0x08,
0x33,  0x08,
0x32,  0x08,
0x31,  0x08,0x31,  0x10,
0x31,  0x10,
0x33,  0x10,
0x33,  0x10,0x34,  0x08,
0x33,  0x08,
0x31,  0x10,
0x00,  0x10,
0x25,  0x08,
0x31,  0x08,0x32,  0x08,
0x31,  0x04,
0x32,  0x04,
0x32,  0x10,
0x00,  0x10,
0x26,  0x08,
0x32,  0x08,//Part1
0x33,  0x08,
0x32,  0x04,
0x33,  0x04,
0x33,  0x10,
0x00,  0x10,
0x00,  0x10,//Part1+line2
0x36,  0x10,
0x36,  0x04,
0x00,  0x02,
0x32,  0x02,  
0x36,  0x02,
0x33,  0x02,
0x32,  0x02,
0x26,  0x02,
0x26,  0x10,
0x26,  0x10,0x36,  0x02,
0x35,  0x02,
0x31,  0x04,
0x31,  0x04,
0x31,  0x04,
0x32,  0x04,
0x32,  0x04,
0x32,  0x08,
0x32,  0x08,
0x33,  0x08,
0x00,  0x10,0x23,  0x08,
0x22,  0x04,
0x23,  0x04,
0x23,  0x10,
0x00,  0x10,
0x00,  0x08,
0x22,  0x08,0x21,  0x04,
0x16,  0x04,
0x16,  0x08,
0x16,  0x10,
0x00,  0x10,
0x21,  0x08,
0x22,  0x08,//Part1+line3
0x23,  0x08,
0x22,  0x04,
0x23,  0x04,
0x23,  0x10,
0x00,  0x0c,
0x15,  0x04,
0x22,  0x08,
0x21,  0x04,
0x17,  0x04,0x17,  0x04,
0x21,  0x04,
0x17,  0x08,
0x00,  0x10,
0x00,  0x10,
0x27,  0x05,
0x31,  0x05,
0x27,  0x06,//how to express 1/3 ?0x26,  0x10,
0x00,  0x0c,
0x25,  0x04,
0x23,  0x08,
0x21,  0x04,
0x21,  0x04,
0x21,  0x08,
0x25,  0x08,0x23,  0x08,
0x21,  0x04,
0x22,  0x04,
0x22,  0x10,
0x20,  0x10,
0x21,  0x08,
0x22,  0x08,//Part1+line4
0x23,  0x08,
0x22,  0x04,
0x23,  0x04,
0x23,  0x10,
0x00,  0x10,
0x25,  0x08,
0x25,  0x04,
0x26,  0x04,0x25,  0x08,
0x22,  0x04,
0x23,  0x04,
0x22,  0x10,
0x00,  0x10,
0x27,  0x08,
0x31,  0x04,
0x27,  0x04,0x26,  0x08,
0x26,  0x10,
0x26,  0x04,
0x25,  0x04,
0x23,  0x08,
0x21,  0x04,
0x21,  0x04,
0x21,  0x08,
0x25,  0x08,0x23,  0x08,
0x21,  0x04,
0x22,  0x04,
0x22,  0x10,
0x00,  0x08,
0x31,  0x08,
0x32,  0x08,
0x32,  0x04,
0x33,  0x04,//Part1+line5
0x32,  0x08,
0x31,  0x04,
0x26,  0x04,
0x26,  0x10,
0x00,  0x0c,
0x22,  0x04,
0x32,  0x08,
0x31,  0x08,0x32,  0x10,
0x32,  0x10,
0x00,  0x10,
0x00,  0x10,//Repeat
0x33,  0x10,
0x33,  0x10,
0x32,  0x10,
0x31,  0x08,
0x27,  0x08,0x26,  0x08,
0x25,  0x04,
0x26,  0x04,
0x26,  0x10,
0x00,  0x10,
0x25,  0x08,
0x31,  0x08,0x33,  0x08,
0x32,  0x04,
0x33,  0x04,
0x33,  0x10,
0x00,  0x0c,
0x25,  0x04,
0x34,  0x0c,
0x33,  0x04,0x32,  0x08,
0x31,  0x04,
0x32,  0x04,
0x32,  0x10,
0x00,  0x08,
0x33,  0x08,
0x32,  0x08,
0x31,  0x08,0x31,  0x10,
0x31,  0x10,
0x33,  0x10,
0x33,  0x10,0x34,  0x08,
0x33,  0x08,
0x31,  0x10,
0x00,  0x10,
0x25,  0x08,
0x31,  0x08,0x32,  0x08,
0x31,  0x04,
0x32,  0x04,
0x32,  0x10,
0x00,  0x10,
0x26,  0x08,
0x32,  0x08,//Part2
0x33,  0x08,
0x32,  0x04,
0x33,  0x04,
0x33,  0x10,
0x33,  0x10,
0x33,  0x10,0x00,  0x10,
0x00,  0x10,//Part2+line1
0x26,  0x10,
0x26,  0x10,
0x27,  0x10,
0x27,  0x10,0x31,  0x10,
0x31,  0x10,
0x32,  0x10,
0x32,  0x10,0x34,  0x10,
0x34,  0x10,
0x35,  0x10,
0x36,  0x08,
0x35,  0x08,0x36,  0x10,
0x36,  0x10,
0x36,  0x10,
0x36,  0x10,0x36,  0x10,
0x36,  0x10,
0x00,  0x10,
0x00,  0x10,//Part2+line2
0x33,  0x10,
0x33,  0x10,
0x32,  0x10,
0x31,  0x08,
0x27,  0x04,
0x27,  0x04,0x26,  0x08,
0x25,  0x04,
0x26,  0x04,
0x26,  0x10,
0x00,  0x0c,
0x25,  0x04,
0x25,  0x08,
0x31,  0x08,0x33,  0x08,
0x32,  0x04,
0x33,  0x04,
0x33,  0x10,
0x00,  0x10,
0x34,  0x10,0x32,  0x08,
0x31,  0x04,
0x32,  0x04,
0x32,  0x10,
0x00,  0x08,
0x33,  0x08,
0x32,  0x08,
0x31,  0x08,//Part2+line3
0x31,  0x1c,
0x31,  0x04,
0x33,  0x10,
0x33,  0x10,0x34,  0x08,
0x33,  0x04,
0x31,  0x04,
0x31,  0x10,
0x00,  0x0c,
0x25,  0x04,
0x25,  0x08,
0x31,  0x08,0x32,  0x08,
0x31,  0x04,
0x32,  0x04,
0x32,  0x10,
0x00,  0x10,
0x26,  0x08,
0x32,  0x08,0x33,  0x08,
0x32,  0x04,
0x32,  0x04,
0x33,  0x10,
0x33,  0x10,
0x33,  0x10,};//mode picture
unsigned char code clock_avater[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,
0xE0,0xF0,0xF0,0xF8,0xF8,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xF8,0xF0,0x80,0xC0,0xDE,
0xFF,0xFF,0xFF,0xFF,0xDE,0x80,0xF0,0xF8,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xF8,
0xF8,0xF0,0xE0,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,0x1F,
0x9F,0xCF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F,0x1F,0x1F,0x0F,0x0F,0x07,0x07,0x07,
0x1F,0x1F,0x07,0x07,0x07,0x0F,0x0F,0x0F,0x1F,0x3F,0xBF,0x7F,0xFF,0xFF,0xFF,0xF7,
0xEF,0xCF,0x1F,0x1F,0x03,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,0xF8,0xFE,
0xFF,0xFF,0x3F,0x0F,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0xC0,0xE0,0xF0,0x78,0x38,0x1C,0x06,0x03,0x01,0x00,0x00,0x01,0x07,0x1F,
0xFF,0xFF,0xFF,0xFC,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,0x1F,0xFF,0xFF,
0xFF,0xFF,0xC6,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0F,
0x0F,0x0F,0x0F,0x1D,0x18,0x30,0x70,0x60,0xC0,0x80,0x00,0x00,0x00,0x00,0x06,0x86,
0xFF,0xFF,0xFF,0xFF,0x7F,0x00,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,0x0F,
0x1F,0x7F,0xFF,0xFF,0xFC,0xF0,0xE0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xE0,0xF0,0xF8,0xFE,0xFF,
0x7F,0x3F,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x03,0x33,0x3F,0x3F,0x1F,0x1F,0x1F,0x1F,0x3F,0x3E,0x3E,0x3E,
0x3F,0x3F,0x3E,0x3E,0x3E,0x3E,0x1F,0x1F,0x1F,0x3F,0x3F,0x37,0x07,0x03,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\y\Desktop\??\??2.bmp",0*/
};unsigned char code temperature_avater[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xF8,0xFC,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0xFC,0xF8,0x00,
0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0xE0,0xE0,0x00,0x00,0xFF,0xFF,0x00,
0x00,0x40,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x00,
0x00,0x00,0x0C,0x08,0x08,0x08,0x08,0x08,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x80,0xC0,0xC0,0x7F,0x7F,0x00,0x00,0xFF,0xFF,0x00,0x20,0x7F,0x7F,0xC0,
0xC0,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,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,0xFC,
0xFE,0x07,0x01,0x01,0x78,0xFC,0xFE,0xFE,0xFE,0xFF,0xFF,0xFF,0xFE,0xFE,0xFC,0x38,
0x01,0x01,0x07,0xFE,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x0E,0x0C,0x18,0x18,0x30,0x30,0x21,0x21,0x21,0x21,0x21,0x21,0x30,0x30,0x18,
0x18,0x0C,0x0E,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\y\Desktop\??\??.bmp",0*/
};unsigned char code stopwatch_avater[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x80,0x80,0x00,0x00,0x00,0x00,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,
0xFC,0xFC,0xFC,0xFC,0x00,0x00,0x00,0x00,0x80,0x80,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,0x00,0x00,
0x06,0x9F,0xFF,0xFF,0xFF,0xFF,0xFF,0xF6,0x78,0x78,0x78,0x3C,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3C,0x78,0x78,0x78,0xFE,0xFF,0xFF,0xFF,0xDF,0xFF,0x9F,0x0E,0x00,0x00,
0x00,0x00,0x00,0x00,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,0xE0,0xF8,0xFE,
0xFF,0x3F,0x0F,0x07,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFF,0xFF,
0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x3F,0xFF,0xFE,0xF8,
0xF0,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,0xFF,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0xFF,0xFF,0xFF,
0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEF,0xFF,
0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0F,0x3F,0xFF,
0xFE,0xF8,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xFE,0xFF,0x7F,
0x1F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,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,0x03,0x07,0x0F,0x0F,0x1F,0x1E,0x3E,0x3C,0x3C,0x78,0x78,0x78,0x78,0x78,0x78,
0x78,0x78,0x78,0x78,0x3C,0x3C,0x3E,0x1E,0x1F,0x0F,0x0F,0x07,0x03,0x01,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\y\Desktop\??\??.bmp",0*/
};unsigned char code light_avater[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,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,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x80,0x00,0x38,0x78,0x70,0x80,0xCF,0xDF,0xF8,0x60,0x60,0x6F,0x60,
0x60,0xE8,0xDF,0xCF,0x80,0x70,0x78,0x38,0x00,0x80,0x80,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,0x00,
0x30,0x30,0x71,0x63,0x03,0xFB,0xFE,0x1F,0x07,0x01,0x81,0xC0,0xE0,0xE0,0xC0,0xE0,
0xE0,0xC0,0x80,0x01,0x03,0x1F,0xFE,0xFB,0x03,0x63,0x71,0x30,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x0C,0x0C,0xCE,0xC6,0xE0,0x6F,0x3F,0xF8,0xE0,0x80,0x03,0x0F,0xFE,0xF9,0xC1,0xF9,
0xFE,0x0F,0x03,0x80,0xE0,0xF8,0x7F,0x7F,0xE0,0xC6,0xCE,0x8E,0x0C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x01,0x00,0x00,0x00,0x00,0x03,0x1F,0xFE,0xF8,0xE0,0xEF,0xEF,0xEF,
0xE0,0xF0,0xFE,0x1F,0x03,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,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,0x1F,0x1F,0x1F,0x1F,0x17,
0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\y\Desktop\??\??.bmp",0*/
};unsigned char code timer_avater[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x06,0x0F,0x0F,0xFF,0xFF,0xFF,0x0F,0x8F,0x8F,0x8F,0x8F,0x8F,0x0F,0x0F,0x0F,0x0F,
0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0xFF,0xFF,0xFF,0x0F,0x0F,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,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0F,0x3F,0x7F,0xFC,0xF7,0xF7,0xEF,0xDF,0xBF,0x7F,0xFF,0xFE,0xFE,
0xFC,0x7C,0xBC,0xD8,0xE8,0xF0,0xF8,0x7C,0x7F,0x3F,0x0F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0xC0,0xE0,0xF1,0xFB,0xFF,0x7F,0x3F,0x00,0xFD,0xFD,
0x0C,0x3F,0x7F,0xFF,0xFB,0xF1,0xE0,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,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xFE,0xFF,0xFF,0xE7,0xF3,0xF1,0xF8,0xF8,0xFC,0xFC,0xFE,0xFF,0xFF,
0xFE,0xFC,0xFC,0xF8,0xF8,0xF1,0xE3,0xEF,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x1C,0x1C,0x1C,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1C,0x1C,0x08,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\y\Desktop\??\???.bmp",0*/
};unsigned char code music_avater[]={
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0x7F,0x0F,0x1F,0x9F,0xDF,0xDF,0xEF,0xEF,0xEF,0xFF,0xFF,0xFF,
0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0x1F,0xFF,
0x7F,0xC3,0xF0,0xF8,0xFC,0xFE,0xFF,0xFF,0x01,0xFB,0xFB,0xFB,0xFF,0x7F,0xFF,0xFF,
0xFF,0xFF,0xFF,0xF7,0xFB,0xFD,0xFD,0xFC,0xF8,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xF3,0xB0,0x30,0x1F,
0x1E,0x0F,0x0F,0xFF,0xF7,0xFF,0xFB,0xFB,0xFF,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFC,0xFF,0xFF,0x7F,0x3E,0xDE,0xFE,0xBF,0x3F,0xFF,0xFE,0xDE,
0xCE,0xE0,0xF0,0xF8,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0xF3,0xE1,0x81,0x83,0x03,
0x1F,0x7E,0xFE,0xDE,0xFC,0xFD,0xFD,0x1D,0xC3,0xFB,0xFF,0xFD,0xFD,0xFD,0xF9,0xF9,
0xF8,0xFC,0x0F,0xC1,0xE0,0xEC,0xDC,0x3E,0x3F,0x3F,0x7F,0x7F,0x7F,0x7E,0x31,0x07,
0x1F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xF6,0x0F,0x8F,0xFF,0xFF,0x03,0x00,0x1F,0x3F,0x3F,0x3F,0x1F,0x8F,0xC7,0xE7,
0xF1,0xF8,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0x7F,0x7E,0x3E,0x1E,0x9C,0xCC,0xEC,0xF8,
0xF8,0xF8,0xF1,0xF7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,0xF0,0xF8,0xFC,0xFC,0xFE,0xFF,0xFB,0xF9,0xF8,
0xF8,0xF9,0xF8,0xF8,0xF0,0xF0,0xFC,0xFC,0xFE,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,/*"C:\Users\y\Desktop\??\music1.bmp",0*/
};unsigned char code FM_avater[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0xF0,0xF0,0xC0,0xC0,0xC0,0x80,0x80,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,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,
0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE1,0xE1,0xE0,0xE0,0xE1,0xE1,0xE1,0xE3,0xE3,0xE3,
0xE3,0xE7,0xE7,0xE6,0xEE,0xEE,0xEC,0xEC,0xFC,0xFC,0xF8,0xF8,0xF8,0xF8,0xF8,0xFC,
0xFC,0xF8,0xF0,0xE0,0xE0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0x7F,0x3F,0x3F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC7,
0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xC7,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,
0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFD,0xF9,0xF9,0xF1,0xF1,0xE1,0xF1,0xF1,0xF1,0xF9,0xF9,0xFD,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF9,0xF0,0xF1,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
0x07,0x07,0x07,0x07,0x07,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\y\Desktop\??\FM.bmp",0*/
};unsigned char code vib_avater[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,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,0xF0,
0x3C,0x1E,0x07,0x03,0xC0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xC0,0x83,0x07,0x1E,0x3C,
0xF0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFE,0x0F,0x01,
0x00,0xE0,0xFC,0x0F,0x03,0x00,0xE0,0x78,0x18,0x00,0x00,0x00,0xC0,0x60,0x30,0x10,
0x30,0x20,0x60,0xC0,0x00,0x00,0x00,0x1C,0x7C,0xE0,0x00,0x01,0x0F,0xFC,0xE0,0x00,
0x01,0x0F,0xFE,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,0x7F,0xFF,0x00,0x00,
0x00,0x7F,0xFF,0x00,0x00,0x00,0x7F,0xE0,0x00,0x00,0x00,0x0F,0x3B,0x40,0xC0,0x80,
0x80,0x80,0x60,0x3F,0x0F,0x00,0x00,0x80,0xF0,0x7F,0x00,0x00,0x00,0xF0,0x7F,0x00,
0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x3F,0xF0,
0xC0,0x00,0x07,0x1F,0x3C,0x70,0x40,0x01,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x00,0x60,0x38,0x1E,0x07,0x00,0xC0,
0xF0,0x3F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x07,0x0E,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0A,0x07,0x03,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\y\Desktop\??\??.bmp",0*/
};unsigned char code choose_avater[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,
0x0E,0x0E,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0x7E,0x3E,0x1E,
0x1E,0x3E,0x7E,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0x0E,0x0E,
0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
0x0E,0x0E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC1,0xE0,0xF0,0x00,0x00,
0x00,0x00,0xF0,0xE0,0xEF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0E,0x0E,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
0x0E,0x0E,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,
0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0E,0x0E,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
0x0F,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,
0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0x0F,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,
0x0E,0x0E,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0E,0x0E,
0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\y\Desktop\??\choose.bmp",0*/
};

PC端UI用户界面图片(部分典型)展示

欢迎界面

在这里插入图片描述

模式指导界面

在这里插入图片描述

在这里插入图片描述

选择模式界面

在这里插入图片描述

震动恢复模式界面

在这里插入图片描述

通信错误界面

在这里插入图片描述

STC模式图原稿

STC设计的模式图以及操作指南原稿如下:

在这里插入图片描述

相关文章:

HNU小学期工训-STC15单片机模型大作业实验报告

STC15单片机模型大作业实验报告 全称&#xff1a;基于STC15单片机与OLED显示模块&PC端演示的多功能声光温振时钟智能手表模型 计科210X 甘晴void 202108010XXX 【请注意&#xff1a;本作业入选优秀范例&#xff0c;直接照抄源码有很大风险】 【建议理解原理之后作改动】 …...

【计算机网络】 TCP协议头相关知识点

文章目录 TCP协议头 TCP协议头 我们来看一下TCP协议头里都有什么东西&#xff0c;研究一下为什么TCP协议是可靠的呢 TCP协议可靠是因为在协议头里带着一些校验的数据 首先是源端口和目的端口&#xff0c;这两个是UDP中也有的&#xff0c;但是UDP中只有这两个&#xff0c;没有…...

深度学习相关VO梳理

相关论文 基于学习的VO 相关&#xff1a; DeepVO Towards End-to-End Visual Odometry with Deep Recurrent Convolutional Neural Networks&#xff08;ICRA&#xff0c;2017&#xff09; TartanVO: A Generalizable Learning-based VO(CoRL2021) SimVODIS: Simultaneous Vis…...

SpringMVC---CRUD实现

思路分析 搭建环境逆向生层对应的类&#xff08;model、mapper.xml、mapper.java&#xff09;编写业务逻辑层编写web层&#xff08;控制器&#xff09;前端页面 一、环境搭建 1.1、导入项目所需依赖(pom.xml) <project xmlns"http://maven.apache.org/POM/4.0.0"…...

vue+elementUI el-select 自定义搜索逻辑(filter-method)

下拉列表的默认搜索是搜索label显示label,我司要求输入id显示label名称 <el-form-item label"部门&#xff1a;"><el-select v-model"form.region1" placeholder"请选择部门" filterable clearable:filter-method"dataFilter&qu…...

数据库——事务

事务是指作为一个整体被执行的一系列操作。在数据库管理系统中&#xff0c;事务是指一组数据库操作&#xff08;如插入、更新、删除等&#xff09;的逻辑单元&#xff0c;也就是说事务的本质是把多个操作打包成一个操作&#xff0c;并且它要么完全执行&#xff0c;要么完全不执…...

echarts折线图每段显示不同的颜色

效果图 配置项&#xff1a; zqChartFour: {title: {text: "一天用电量分布",subtext: "纯属虚构",},tooltip: {trigger: "axis",axisPointer: {type: "cross",},},toolbox: {show: true,feature: {saveAsImage: {},},},xAxis: {type:…...

设计模式-单例模式(Singleton)

文章目录 前言一、单例模式的概念二、单例模式的实现三、单例模式的应用场景四、单例模式优缺点优点&#xff1a;缺点&#xff1a;总结 前言 单例模式&#xff08;Singleton Pattern&#xff09;是一种创建型设计模式&#xff0c;它确保一个类只有一个实例&#xff0c;并提供一…...

优漫动游 常见的AI视频生成网站的官方网站:

1、Lumen5 Lumen5是一款在线视频制作工具&#xff0c;利用人工智能技术能够迅速将文本、和音乐转换为视频。它可以帮助你把博客文章、社交媒体内容等转化为吸引人的视频&#xff0c;从而提高你的品牌曝光率和社交媒体的参与度。 2.Animoto Animoto是一个视频制作平台&…...

Vue中数据可视化关系图展示与关系图分析

Vue中数据可视化关系图展示与关系图分析 数据可视化是现代Web应用程序的重要组成部分之一&#xff0c;它可以帮助我们以图形的方式呈现和分析复杂的数据关系。Vue.js是一个流行的JavaScript框架&#xff0c;它提供了强大的工具来构建数据可视化应用。本文将介绍如何使用Vue.js…...

【启扬方案】基于启扬安卓屏一体机的医疗手推车解决方案

医疗手推车作为医院基础设施的一部分&#xff0c;被广泛应用于医院内部&#xff0c;包括急诊室、手术室、病房和其他临床部门。伴随着互联网技术的发展和行业的渗透&#xff0c;智慧医疗受到越来越多的青睐&#xff0c;这也使得很多医疗设施得到了改进&#xff0c;医疗手推车也…...

JavaScript实现MD5加密的6种方式

关于MD5&#xff1a; MD5.js是通过前台js加密的方式对用户信息&#xff0c;密码等私密信息进行加密处理的工具&#xff0c;也可称为插件。 在本案例中 可以看到MD5共有6种加密方法&#xff1a; 1&#xff0c; hex_md5(value) 2&#xff0c; b64_md5(value) 3&#xff0c; …...

腾讯云和阿里云2核2G服务器租用价格表对比

2核2G云服务器可以选择阿里云服务器或腾讯云服务器&#xff0c;腾讯云轻量2核2G3M带宽服务器95元一年&#xff0c;阿里云轻量2核2G3M带宽优惠价108元一年&#xff0c;不只是轻量应用服务器&#xff0c;阿里云还可以选择ECS云服务器u1&#xff0c;腾讯云也可以选择CVM标准型S5云…...

抖音无需API开发连接Stable Diffusion,实现自动根据评论区的指令生成图像并返回

抖音用户使用场景&#xff1a; 随着AI绘图的热度不断升高&#xff0c;许多抖音达人通过录制视频介绍不同的AI工具&#xff0c;包括产品背景、使用方法以及价格等&#xff0c;以吸引更多的用户。其中&#xff0c;Stable Diffusion这款产品受到了许多博主达人的青睐。在介绍这款产…...

MySQL(三)

DDL&#xff08;数据定义语言&#xff09; 库 /* 创建数据库testone */ create database testone; /* 查询数据库testone */ show databases; /* 选择数据库testone */ use testone; /* 删除数据库testone */ drop database testone; 表 创建表 create table table_name (…...

汽车级肖特基二极管DSS220-Q 200V 2A

DSS220-Q是什么二极管&#xff1f;贵司有生产吗&#xff1f; 肖特基二极管DSS220-Q符合汽车级AEC Q101标准吗&#xff1f; DSS220-Q贴片肖特基二极管参数是什么封装&#xff1f;正向电流和反向电压是多大&#xff1f; DSS220-Q肖特基二极管需要100KK&#xff0c;有现货吗&#…...

maven jetty post 上传长度设置

maven jetty post 上传长度设置 <plugin><groupId>org.eclipse.jetty</groupId><artifactId>jetty-maven-plugin</artifactId><version>9.4.8.v20171121</version><configuration><scanIntervalSeconds>1</scanInter…...

LeetCode 面试题 03.03. 堆盘子

文章目录 一、题目二、C# 题解 一、题目 堆盘子。设想有一堆盘子&#xff0c;堆太高可能会倒下来。因此&#xff0c;在现实生活中&#xff0c;盘子堆到一定高度时&#xff0c;我们就会另外堆一堆盘子。请实现数据结构 SetOfStacks&#xff0c;模拟这种行为。SetOfStacks 应该由…...

Python-函数进阶

函数的多返回值 按照返回值的顺序&#xff0c; 写对应顺序的多个变量接受即可&#xff0c; 变量之间用逗号隔开&#xff0c;支持不同类型的数据return def test_return():return 1, 2, 3x, y, z test_return()print(x) print(y) print(z)函数参数种类 使用方式上的不同&am…...

实操Hadoop大数据高可用集群搭建(hadoop3.1.3+zookeeper3.5.7+hbase3.1.3+kafka2.12)

前言 纯实操&#xff0c;无理论&#xff0c;本文是给公司搭建测试环境时记录的&#xff0c;已经按照这一套搭了四五遍大数据集群了&#xff0c;目前使用还未发现问题。 有问题麻烦指出&#xff0c;万分感谢&#xff01; PS&#xff1a;Centos7.9、Rocky9.1可用 集群配置 iph…...

如何在 Ubuntu 上安装和使用 Nginx?

ginx&#xff08;发音为“engine-x”&#xff09;是一种流行的 Web 服务器软件&#xff0c;以其高性能和可靠性而闻名。它是许多流行网站使用的开源软件&#xff0c;包括 Netflix、GitHub 和 WordPress。Nginx 可以用作 Web 服务器、负载均衡器、反向代理和 HTTP 缓存等。 它以…...

seatunnel win idea 本地调试

调试FakeSource&#xff0c;LocalFile # Set the basic configuration of the task to be performed env {execution.parallelism 1job.mode "BATCH" }# Create a source to connect to Mongodb source {# This is a example source plugin **only for test and d…...

链路追踪Skywalking快速入门

目录 1 Skywalking概述1.1 微服务系统监控三要素1.2 什么是链路追踪1.2.1 链路追踪1.2.2 OpenTracing1、数据模型&#xff1a;2、核心接口语义 1.3 常见APM系统1.4 Skywalking介绍1、SkyWalking 核心功能&#xff1a;2、SkyWalking 特点&#xff1a;3、Skywalking架构图&#x…...

全开源影视APP源码带后台 苍穹影视APP源码 免受权带安装教程

苍穹影视 V20 全新后台七彩视界免受权开源源码此版本为天穹公益版开源无解密安装教程 全新后台很是都雅,源码全开源无加密。 PC 端对接教程&#xff1a; 建议在浮图下操作 正常安装前后端 然后安装米酷 cms 根据教程安装即可 米酷 cms 对接部门已被我改动&#xff0c;只要在安装…...

Qt+C++自建网页浏览器-Chrome blink最新内核基础上搭建-改进版本

程序示例精选 QtC自建网页浏览器-Chrome blink最新内核基础上搭建-改进版本 如需安装运行环境或远程调试&#xff0c;见文章底部个人QQ名片&#xff0c;由专业技术人员远程协助&#xff01; 前言 这篇博客针对<<QtC自建网页浏览器-Chrome blink最新内核基础上搭建-改进版…...

这场科技巨变,有生之年有希望

见到一文&#xff0c;遂分享欲爆棚&#xff0c;总结如下。 具有人类水平的人工智能大约什么时候可以出现&#xff1f; 人类水平的人工智能&#xff0c;指的是&#xff0c;不需要借助人类&#xff0c;机器能够比人类更好地完成每项任务。 针对这个问题&#xff0c;有家机构在201…...

zemax优化功能

1、三种优化方法 zemax的三种优化方法中&#xff0c;局部优化会找到局部的极小值点&#xff0c;全局优化会找到整体的最小值点。 锤形优化适用于先用全局优化找到大概值后&#xff0c;进一步完善光学系统 对于评价函数单调或者局部最小值就是全局最小值的情况&#xff0c;使…...

Centos8关闭IPV6

编辑 /etc/sysctl.conf 文件。 vi /etc/sysctl.conf 放置以下条目以禁用所有适配器的 IPv6。 net.ipv6.conf.all.disable_ipv6 1 net.ipv6.conf.default.disable_ipv6 1 您可以使用以下条目为特定网络接口禁用 IPv6。 &#xff08;假设网卡名称是enp0s3&#xff09;。 n…...

华为OD七日集训第4期 - 按算法分类,由易到难,循序渐进,玩转OD

目录 一、适合人群二、本期训练时间三、如何参加四、7日集训第4期五、精心挑选21道高频100分经典题目&#xff0c;作为入门。第1天、数据结构第2天、滑动窗口第3天、贪心算法第4天、二分查找第5天、分治递归第6天、深度优先搜索dfs算法第7天、宽度优选算法&#xff0c;回溯法 六…...

flutter 抓包工具charles

本来的代码是忽略证书 ///忽略https证书校验&#xff0c;也就是能请求https的地址了(_dio?.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate (HttpClient client) {client.badCertificateCallback (X509Certificate cert, String host, int port) > tr…...

如何做ppt课件/seo代理计费系统

1.虚拟IP 在 TCP/IP 的架构下&#xff0c;所有想上网的电脑&#xff0c;不论是用何种方式连上网路&#xff0c;都必须要有一个唯一的 IP-address。事实上IP地址是主机硬件地址的一种抽象&#xff0c;简单的说&#xff0c;MAC地址是物理地址&#xff0c;IP地址是逻辑地址。 虚拟…...

上海企业网站设计制作/销售网站排名

hash赋能前言一、缺失的第一个正数二、hash赋能1、hashSet2、原地数组hash总结参考文献前言 hash赋能可以为后面的工作大大减少搜索的时间&#xff0c;可用hash数组、hashSet、hashMap、原地数组hash。 一、缺失的第一个正数 二、hash赋能 1、hashSet //hash赋能//Time:O(n…...

个体工商户做网站/seo专员是什么意思

按照先后顺序&#xff1a;1&#xff0c;静态先于非静态代码库执行&#xff08;静态代码块随着类的加载而加载&#xff0c;初始化只执行一次&#xff09;2&#xff0c;父类先于子类3&#xff0c;非静态代码块优于构造函数执行所以执行顺序如下&#xff1a;父类&#xff22;静态代…...

ppt设计倒计时/江苏短视频seo搜索

一、问题现象 二、解决方案 参考链接&#xff1a;https://blog.csdn.net/zz18435842675/article/details/102662527/ 修改IDEA的Preferences -> Maven -> Importing -> JDK for Importer 里的JDK版本和 File -> Project Structure-> Project的设置一致 查看id…...

三语网站建设/热搜词排行榜

oschina&#xff1a; https://www.oschina.net/ Tencent: https://github.com/Tencent 360: https://github.com/Qihoo360 转载于:https://www.cnblogs.com/javalzy/p/6886475.html...

河北pc端网站建设/搜索引擎优化培训班

源代码: Lib/telnetlib.pytelnetlib模块提供了实现Telnet协议的Telnet类。有关协议的详细信息&#xff0c;请参阅RFC 854。此外&#xff0c;它还为协议字符(参见下面)和telnet选项提供了符号常量。telnet选项的符号名称遵循arpa/telnet中的定义。h&#xff0c;前导端末端被删除…...