课程设计![请添加图片描述](https://i-blog.csdnimg.cn/blog_migrate/f38249dd014ad765563f2d5f02b66880.bmp)
原理图 PCB 仿真 源代码及proteus 软件
1、测量温湿度、光照。
2、设置上下限,过限报警
3、自动模式:可以自动报警,可以按键控制电机,可以设置
手动模式:停止所有功能
说明:(1)课题很复杂
(2)仿真非常卡,要耐心等待
1、自动模式(获取以下值在1cd上显示):a、温湿度数据
b、光照数据
c、步进电机的转速等级(led亮的灯数2、手动模式(串口控制以下模块)
a、发送命令获取温湿度数据,显示在串口助手上
b、发送命令获取光照数据,显示在串
口助手
上
3、可以通过串口发送信息(或者外部中断)指定自动模式还是手动模式
#include <reg52.h>
#include <intrins.h>
#include <AMPIRE128X64.h>
#include"TLC549.h"
#include "DHT11.h"
#include "74hc595.h"
sbit beep=P2^1;//蜂鸣器
sbit k1=P2^5;
sbit k2=P2^6;
sbit k3=P3^2;
sbit k4=P3^3;
sbit so165=P3^6;//74165
sbit clk165=P3^4;
sbit ld165=P3^5;
sbit test=P2^7;
//图片编码
uchar code bmp1[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,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,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,0x80,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x60,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x40,0xC0,0x80,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xE0,0xB0,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x80,0x80,0x80,0x06,0x04,0x18,0x30,0x00,0xC0,0x27,0x24,0x10,0x10,0x17,
0x14,0x10,0x20,0x20,0xC0,0x0C,0x06,0x42,0x61,0x20,0x20,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x40,
0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC7,0x3C,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x9C,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,
0xF8,0x90,0x30,0x40,0xC0,0x80,0x00,0x00,0x01,0x03,0x06,0x9C,0xB1,0xE3,0x06,0x0C,
0x18,0x30,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x80,0x00,0x00,
0x00,0x00,0xC0,0x40,0x41,0x63,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x80,0x80,0x81,0xC3,0x42,0x00,0x7E,0x81,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xC3,0x3C,0x00,0x84,0x84,0x84,0x04,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0xCE,0x78,
0x68,0x2B,0x3E,0x18,0x18,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x18,
0x10,0x10,0x10,0x10,0x10,0x13,0x31,0x21,0x20,0x60,0x40,0xC0,0x80,0x80,0x00,0x00,
0x00,0xC1,0x67,0x2C,0x38,0x01,0x03,0x02,0x02,0x03,0x01,0x01,0x00,0x00,0x00,0x80,
0x80,0xC0,0xE0,0xB8,0x18,0x90,0xF0,0x00,0x00,0x00,0x18,0x38,0x68,0x49,0xEB,0xAE,
0x98,0xF0,0xC1,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x10,0x10,0x18,0x88,0xC8,0x21,0x02,0x02,0x04,0x08,0xC8,0x08,
0x08,0x08,0x04,0xE4,0x03,0x00,0x00,0x0C,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x9E,0xF3,0xC0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x21,0x20,0x30,0x10,0x30,0x20,
0x60,0x41,0x43,0x40,0x40,0xC0,0x80,0x00,0x08,0x00,0x00,0x00,0x00,0x01,0xF1,0x1F,
0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x0E,0x0B,0x19,0x11,0x11,0x11,
0x10,0x18,0x09,0x0D,0x06,0x03,0x60,0x60,0x30,0xF0,0x38,0x38,0x30,0xF0,0x20,0x20,
0x20,0x20,0x00,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x02,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,
0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1C,0x74,0xC6,0x82,0x07,0x0F,0x1A,0x36,0x6C,0xCB,0x8E,
0xF8,0x00,0x00,0x00,0x00,0x08,0xF8,0xE0,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x02,0x01,0x00,0x00,0x00,0x03,0x06,
0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0x40,0x40,
0x40,0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x8F,0xB8,0xA0,0xB8,0x8F,0x40,0x40,
0x60,0x20,0x30,0x1C,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x06,0x04,0x08,0x18,0x10,0x11,
0x11,0x10,0x10,0x10,0x10,0x18,0x0C,0x07,0x03,0x00,0x00,0x03,0x06,0x0C,0x08,0x18,
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x18,0x0C,0x04,0x06,0x03,
0x01,0x01,0x03,0x06,0x04,0x04,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
0x08,0x08,0x08,0x08,0x18,0x18,0x18,0x0C,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
};
uchar code bmp2[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x80,0xC0,0xC0,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,
0x70,0x30,0x18,0x0C,0x0C,0x0C,0x86,0xC2,0x60,0x30,0x10,0x18,0x08,0x08,0x0C,0x04,
0x04,0x05,0x0D,0x09,0x18,0x10,0x30,0x63,0x46,0x86,0x82,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x60,0x00,0x80,0xF8,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,0x01,0x01,
0x00,0xE0,0xC0,0xC0,0xF0,0xCE,0xE3,0xB0,0xDC,0x66,0x22,0x23,0x21,0x21,0x21,0x21,
0x21,0x21,0x21,0x21,0x63,0xC2,0x86,0xCC,0x18,0xF0,0x81,0x03,0x0E,0x18,0x60,0xC0,
0x00,0x04,0x06,0x02,0x3E,0x20,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xE0,0x30,0x98,0x88,0x88,0x08,0x98,0x98,0x8C,0x04,0x04,0x06,0x02,0x02,
0x02,0xC6,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x70,0x1C,
0x87,0xE0,0x3C,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x40,0xC0,0x80,0x80,0x70,0x1C,0x0C,0x00,0x00,0x00,0x00,0x00,
0x80,0xC0,0xFF,0x6F,0x03,0x03,0xC1,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xE0,0xE0,0xE0,0xE0,0x00,0x00,0x07,0x04,0x78,0xC7,0x3C,0x60,0xC0,0x00,0x01,
0x07,0x1C,0x70,0xC0,0x00,0x00,0x03,0x0E,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x60,0x30,
0x98,0xC8,0x4F,0x00,0x3D,0x3C,0x11,0x78,0x4F,0x7C,0x01,0x01,0x80,0x80,0x80,0xC2,
0x43,0x61,0x20,0xB0,0x90,0xD8,0x48,0x6C,0x36,0x1F,0x84,0xC6,0x63,0x31,0x1C,0x06,
0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xE0,0x30,0x18,0x18,0x18,0x18,0x0C,0xFC,0x8E,0x02,0x03,
0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x71,0xE0,0x80,0x80,0x80,0xC0,0x40,0x40,0x60,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x81,0xC1,0x63,0x3F,0x07,0x3C,
0xE0,0x00,0x00,0x01,0x01,0x03,0x02,0x06,0x0C,0x18,0x30,0x60,0xC0,0x00,0x0E,0x18,
0x90,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x06,0x0E,
0x0B,0x0A,0x1A,0x10,0x10,0x10,0x10,0x30,0x30,0x20,0x20,0x20,0x20,0x30,0x10,0x10,
0x12,0x13,0x11,0x19,0x08,0x0C,0x04,0x06,0x03,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,0x03,0x0E,0x18,0x10,0x30,0x20,0x20,0x20,0x21,0x23,0x22,
0x22,0x22,0x22,0x22,0x22,0x23,0x27,0x25,0x27,0x2C,0x28,0x28,0x28,0x28,0x28,0x2C,
0x24,0x24,0x26,0x32,0x13,0x11,0x11,0x11,0x09,0x08,0x08,0x08,0x08,0x08,0x0C,0x04,
0x04,0x05,0x06,0x04,0x04,0x04,0x04,0x04,0x06,0x02,0x02,0x02,0x03,0x00,0x00,0x00,
0x01,0x03,0x06,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
uchar code bmp3[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0xC0,0x60,0x10,0x18,0x08,0x08,0x0C,0x04,0x04,0x04,0x04,0x04,
0x04,0x0C,0x08,0x08,0x18,0x10,0x10,0x10,0x18,0x08,0x0C,0x04,0x06,0x02,0x02,0x02,
0x02,0x02,0x02,0x06,0x04,0x0C,0x18,0x30,0x20,0x20,0x30,0x10,0x18,0x08,0x08,0x08,
0x08,0x08,0x08,0x18,0x10,0x30,0x60,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,0xF8,
0x8C,0x04,0x03,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,0xF0,0x18,0x08,0x08,0x0C,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x06,0x04,0x04,0x0C,0x08,0x08,0x18,0x10,0x10,0x30,0x20,0x20,0x60,0x40,
0xC0,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xC0,0x40,0x40,0x40,0x60,0x20,0x20,
0x20,0x30,0x10,0x10,0x18,0x08,0x08,0x08,0x08,0x08,0x0C,0x84,0x04,0x04,0x04,0x04,
0x06,0x02,0x02,0x01,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x08,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,
0xF8,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFC,0xE0,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0x00,0x00,0x01,
0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x1E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,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,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x04,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
uchar code bmp4[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x20,0x20,0x70,0xFC,0x3C,0x04,0x26,0x22,0x62,0x22,0x3A,0x22,0x22,0x26,0x1C,
0x1C,0x10,0x10,0x18,0x04,0x14,0x06,0x22,0x01,0x01,0x01,0x21,0x01,0x01,0x05,0x02,
0xFA,0xBC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0x38,0x38,
0xEC,0xE4,0x66,0xE2,0x62,0x22,0x26,0x04,0xE4,0x3C,0x38,0x28,0x38,0x20,0x20,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,0x80,0x80,0x40,0x70,0xB0,0x90,0x98,0xC8,0x48,0x3C,
0x04,0x02,0x02,0x01,0x81,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x0F,0x1C,0x38,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x4F,
0x8F,0x0C,0x00,0x00,0x30,0x41,0x82,0x82,0x83,0x80,0x80,0xB0,0xB0,0xA0,0xA0,0xA0,
0xB4,0xCD,0x57,0x7E,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,0x00,0x00,0x00,0x00,0x00,0x00,
0xE0,0xD0,0x88,0xCC,0xFA,0x7F,0x06,0x02,0x01,0x01,0xF8,0xEF,0xF7,0x00,0x00,0x00,
0x00,0x08,0x72,0xC9,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,0x40,0x00,0x80,0x01,0x03,0x0E,0x1C,0x70,0x70,0x30,0x7C,0x7E,0x3F,0x0F,0x03,
0x0E,0x00,0x00,0xA0,0x80,0xA8,0x82,0xCB,0xFE,0xFD,0x3F,0x1F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xFF,0x7B,0x3E,0x38,0xE0,
0xE0,0xC8,0xC0,0x80,0xC3,0xC4,0xC8,0xF8,0x10,0x10,0x20,0x00,0x00,0x00,0x00,0xC0,
0x80,0x80,0x80,0x80,0x80,0x3C,0xC9,0xC2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x77,0xBC,0x00,0x00,0x80,0x00,0x80,0x80,0x40,0x00,0x80,0x70,
0xF0,0x54,0x24,0x30,0x3C,0x33,0x0F,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,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,0x60,0x20,0x20,0x20,0x20,0x38,0x08,0x18,0x1F,0x81,0xC0,0xE0,0x20,0x18,0x0D,
0x07,0x01,0x01,0x01,0x01,0x00,0x00,0x01,0x04,0x04,0x08,0x18,0x18,0x00,0x00,0xE3,
0x63,0xC5,0xCD,0xD9,0x71,0x61,0x23,0x03,0x00,0x24,0x1C,0x18,0x1C,0x1E,0x14,0xE2,
0x8C,0x02,0x07,0x06,0x1D,0x1D,0x38,0xE5,0x04,0x02,0x03,0x02,0x00,0x03,0x03,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,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x0F,
0x0D,0x0C,0x04,0x04,0x04,0x06,0x02,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
0x0D,0x0C,0x0C,0x0C,0x0C,0x0D,0x0D,0x0D,0x0F,0x0F,0x03,0x01,0x01,0x01,0x01,0x00,
0x01,0x01,0x03,0x0F,0x38,0x34,0x40,0xC1,0x82,0x8C,0x8C,0x88,0x88,0x90,0x90,0xA0,
0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
uchar code bmp5[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
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,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,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,
0x18,0x90,0x40,0x20,0x26,0x14,0x10,0x10,0x13,0x20,0x20,0x44,0x86,0x23,0x21,0x30,
0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0x40,0x40,0xFC,0xFC,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,0x10,0x30,0x21,0x21,
0x3E,0xC1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC1,0x3E,0x00,0x02,
0x22,0x62,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,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,0xC0,0xC0,
0xE0,0x60,0x70,0x70,0x38,0xB8,0xB8,0x9C,0x5C,0x5E,0x4E,0x0F,0xA7,0x86,0x8C,0x1A,
0x32,0xE2,0x81,0x01,0x01,0x00,0x00,0x00,0x00,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x11,0x11,
0x18,0x00,0x01,0x82,0x62,0x04,0x04,0x04,0x04,0x02,0x7A,0x01,0x00,0x00,0x02,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,0x40,0xFE,0xFE,0xFE,
0x20,0x10,0x10,0x08,0x08,0x08,0x04,0x04,0x04,0xE2,0x3F,0x0F,0xB9,0xE1,0x00,0x00,
0x06,0x72,0x12,0x98,0xC0,0x41,0x04,0x06,0x02,0x32,0x10,0x19,0xC9,0x40,0x04,0x04,
0x16,0x80,0xC3,0x7E,0x00,0x00,0x00,0x00,0x00,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFE,0x0F,0x24,0xB1,0x98,0xCF,0xF8,0x00,
0x00,0x00,0x00,0x91,0x98,0xC0,0x60,0x20,0x32,0x11,0x18,0x08,0x0C,0x06,0x02,0x03,
0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x30,0x00,0x18,0x08,0x0C,0x04,0x04,0x02,0x02,0x00,0x00,0x00,0x00,0x06,0x04,0x04,
0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x04,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,
0x00,0x00,0x02,0x02,0x06,0x04,0x00,0x0F,0x0C,0x06,0x03,0x01,0x01,0x00,0x07,0x04,
0x06,0x02,0x03,0x09,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x0C,0x04,0x04,
0x04,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x04,0x0C,0x08,0x08,0x08,0x00,0x00,0x00,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
uchar code bmp6[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,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,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,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,0x70,0x08,0x0C,0x04,
0x06,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x02,0x06,0x1C,0x70,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,
0x00,0x0E,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x1F,0x01,0x07,0x3C,
0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xBC,0x8E,0x81,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x83,0x8E,0xB8,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x00,0x00,0x00,0x04,0x06,0x04,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x04,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x78,0x0F,0x01,0x10,0x00,0x00,0x00,
0xC7,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0xE1,0x3F,0x13,0x11,0x11,0x11,
0x11,0x13,0x3F,0x21,0xE1,0x01,0x01,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,0xF0,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
0x80,0x80,0xC0,0x60,0x30,0x78,0x6E,0x23,0x31,0x00,0x00,0x00,0x00,0x80,0xC0,0x70,
0x1F,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,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,0x73,0x1E,0x06,0x04,0x04,0x04,
0x04,0x04,0x06,0x1F,0x71,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,0x0C,0x1C,0x34,0x24,0x64,0x44,0x46,0x42,0x42,0x43,0x41,
0x41,0x40,0x60,0x20,0x20,0x20,0x30,0x10,0x18,0x08,0x0C,0x06,0x02,0x03,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1C,0x14,0x14,0x14,0x14,0x14,0x14,0x17,0x16,0x14,0x14,0x14,0x14,0x14,
0x14,0x14,0x14,0x14,0x17,0x15,0x14,0x14,0x14,0x14,0x14,0x14,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
uchar code mao[] ={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/*":",0*/
uchar code str1[] ={0x00,0x00,0x18,0x24,0x24,0x18,0x00,0x00,0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00};//摄氏度
uchar code str2[] ={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};/*"温",0*/
uchar code str3[] ={0x10,0x60,0x02,0x8C,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00,
0x04,0x04,0x7E,0x01,0x44,0x48,0x50,0x7F,0x40,0x40,0x7F,0x50,0x48,0x44,0x40,0x00};/*"湿",1*/
uchar code str4[] ={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};/*"度",2*/
uchar code str5[] ={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};/*"光",3*/
uchar code str6[] ={0x00,0xFE,0x42,0x42,0x42,0xFE,0x00,0x42,0xA2,0x9E,0x82,0xA2,0xC2,0xBE,0x00,0x00,
0x80,0x6F,0x08,0x08,0x28,0xCF,0x00,0x00,0x2F,0xC8,0x08,0x08,0x28,0xCF,0x00,0x00};/*"照",4*/
uchar code str7[] ={0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x00,
0x40,0x40,0x40,0x40,0x40,0x40,0x7F,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00};/*"上",5*/
uchar code str8[] ={0x02,0x02,0x02,0x02,0x02,0x02,0xFE,0x02,0x02,0x42,0x82,0x02,0x02,0x02,0x02,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x01,0x06,0x00,0x00,0x00};/*"下",6*/
uchar code str9[] ={0x00,0xFE,0x22,0x5A,0x86,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00,
0x00,0xFF,0x04,0x08,0x07,0x00,0xFF,0x40,0x20,0x03,0x0C,0x14,0x22,0x41,0x40,0x00};/*"限",7*/
uchar code str10[] = {0xF0,0xF0,0xF0,0xF0,0xF0,0xF8,0xFC,0xFC,0xFC,0xF8,0xF8,0xF0,0xE0,0xE0,0xC0,0x80,
0x1F,0x1F,0x1F,0x1F,0x1F,0x3F,0x7F,0x7F,0x7F,0x3F,0x3F,0x1F,0x0F,0x0F,0x07,0x03};//箭头
uchar code str11[] ={0x04,0x04,0x04,0x04,0xF4,0x94,0x95,0x96,0x94,0x94,0xF4,0x04,0x04,0x04,0x04,0x00,
0x00,0xFE,0x02,0x02,0x7A,0x4A,0x4A,0x4A,0x4A,0x4A,0x7A,0x02,0x82,0xFE,0x00,0x00};/*"高",0*/
uchar code str12[] ={0x00,0x80,0x60,0xF8,0x07,0x00,0xFC,0x84,0x84,0x84,0xFE,0x82,0x83,0x82,0x80,0x00,
0x01,0x00,0x00,0xFF,0x00,0x00,0xFF,0x40,0x20,0x00,0x41,0x8E,0x30,0x40,0xF8,0x00};/*"低",1*/
uchar code str13[] ={0x40,0x40,0x42,0xCC,0x00,0x08,0x48,0x88,0x08,0x08,0x08,0xFF,0x08,0x08,0x08,0x00,
0x00,0x40,0x20,0x1F,0x20,0x40,0x40,0x41,0x40,0x48,0x50,0x4F,0x40,0x40,0x40,0x00};/*"过",0*/
uchar code str14[] ={0x00,0x00,0xF8,0x88,0x88,0x88,0x88,0xFF,0x88,0x88,0x88,0x88,0xF8,0x00,0x00,0x00,
0x00,0x00,0x1F,0x08,0x08,0x08,0x08,0x7F,0x88,0x88,0x88,0x88,0x9F,0x80,0xF0,0x00};/*"电",0*/
uchar code str15[] ={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};/*"机",1*/
uchar code str16[] ={0x40,0x40,0x42,0xCC,0x00,0x04,0xF4,0x94,0x94,0xFF,0x94,0x94,0xF4,0x04,0x00,0x00,
0x00,0x40,0x20,0x1F,0x20,0x48,0x44,0x42,0x41,0x5F,0x41,0x42,0x44,0x48,0x40,0x00};/*"速",2*/
uchar code str17[] ={0x00,0x00,0x00,0xF8,0x88,0x8C,0x8A,0x89,0x88,0x88,0x88,0xF8,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xFF,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xFF,0x00,0x00,0x00,0x00};/*"自",0*/
uchar code str18[] ={0x00,0x00,0x24,0x24,0x24,0x24,0x24,0xFC,0x22,0x22,0x22,0x23,0x22,0x00,0x00,0x00,
0x02,0x02,0x02,0x02,0x02,0x42,0x82,0x7F,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00};/*"手",1*/
uchar code str19[] ={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};/*"动",2*/
uchar code char1[] ={0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00};/*"%",0*/
uchar code char2[] ={0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00};/*"L",0*/
uchar code char3[] ={0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00};/*"x",1*/
uchar time=0,mode=0,sec=0;//定时
uchar light=0,light_L=20,light_H=60;//光照
uchar temp_L=15,temp_H=35;//温度
uchar humi_L=30,humi_H=80;//湿度
uchar led_flag=0,led_mode=0;//led控制
uchar beep_flag=0;
uchar moshi=0;//模式
uchar fang=0,start=0,dat=0;//步进电机
uchar motor_time=0,sudu=5;//速度
//读取74165
uchar read165()
{
uchar i=0,k=0;
ld165=0;//装载数据
_nop_();
ld165=1;
for(i=0;i<6;i++)
{
k<<=1;
if(!so165)
k++;
clk165=1;
_nop_();
clk165=0;
}
return k;
}
//按键检测
uchar key=0;
uchar key_scan()
{
uchar i=0,j=0;
i=read165();
while(read165()>0) //等待按键松开
switch(i)
{
case 0x20:j= 6;break;
case 0x10:j= 5;break;
case 0x08:j= 4;break;
case 0x04:j= 3;break;
case 0x02:j= 2;break;
case 0x01:j= 1;
}
if(j!=key)
{
key=j;
return key;
}
else
return 0;
}
//主函数
void main()
{
uchar i=0;
beep=0;
clk165=0;
lcd_init(); // 初始化
lcd_clear(0); // 清屏
lcd_set_line(0); // 设置起始行为0
//设置INT0
IT0=1;//跳变沿出发方式(下降沿)
EX0=1;//打开INT0的中断允许。
SCON=0X50; //设置为工作方式1
TMOD=0X21; //设置计数器工作方式2
TH1=0XFD; //9600
TL1=0XFD;
ES=1; //打开接收中断
TR1=1; //打开计数器
TH0=(65536-10000)/256;
TL0=(65536-10000)%256;
ET0=1;//打开定时器0中断允许
EA=1;//打开总中断
TR0=1;//打开定时器
while (1)
{
if(moshi==0)//自动模式
{
//电机控制
i=key_scan();
if(i==1)//启动
{
start=1;
}
if(i==2)//停止
{
start=0;
}
if(i==3)//加速
{
if(sudu<9)
sudu++;
}
if(i==4)//减速
{
if(sudu>0)
sudu--;
}
if(i==5)//正转
{
fang=0;
}
if(i==6)//反转
{
fang=1;
}
if(!k1)//设置
{
if(mode<6)
mode++;
else
mode=0;
while(!k1);
}
if(!k2)//加
{
if(mode==1)
{
if(temp_L<temp_H)
temp_L++;
}
if(mode==2)
{
if(temp_H<99)
temp_H++;
}
if(mode==3)
{
if(humi_L<humi_H)
humi_L++;
}
if(mode==4)
{
if(humi_H<99)
humi_H++;
}
if(mode==5)
{
if(light_L<light_H)
light_L++;
}
if(mode==6)
{
if(light_H<99)
light_H++;
}
while(!k2);
}
if(!k4)//减
{
if(mode==1)
{
if(temp_L>0)
temp_L--;
}
if(mode==2)
{
if(temp_H>temp_L)
temp_H--;
}
if(mode==3)
{
if(humi_L>0)
humi_L--;
}
if(mode==4)
{
if(humi_H>humi_L)
humi_H--;
}
if(mode==5)
{
if(light_L>0)
light_L--;
}
if(mode==6)
{
if(light_H>light_L)
light_H--;
}
while(!k4);
}
}
else //手动模式
{
start=0;
}
}
}
//定时器0中断
void Timer0() interrupt 1
{
uint i,j=0;
j=0;
if(time<200) //显示控制
time++;
else
{
time=0;
dht11_recive();//测量温湿度
i=TLC549();//测量光照
light=i*99/255;
if(mode<7)
{
lcd_clear(0); // 清屏
lcd_set_line(0); // 设置起始行为0
}
//报警判断
j=0;
if(moshi==0) //自动模式
{
if(light>light_H)
{
j++;
if((mode!=11)&&(j==1))
{
display_bmp(bmp5);
display(0, 2 , str5);//光照
display(0, 3 , str6);
display(0, 4 , str13);
display(0, 5 , str11);
mode=11;
}
}
if(light<light_L)//光照报警
{
j++;
if((mode!=12)&&(j==1))
{
mode=12;
display_bmp(bmp6);
display(0, 2 , str5);//光照
display(0, 3 , str6);
display(0, 4 , str13);
display(0, 5 , str12);
}
}
if(j>0) //led闪烁控制
{
led_flag=1;
}
else
led_flag=0;
if(dht11_dat[2]>temp_H)
{
j++;
if((mode!=7)&&(j==1))
{
mode=7;
display_bmp(bmp1);
display(0, 2 , str2);//温度
display(0, 3 , str4);
display(0, 4 , str13);
display(0, 5 , str11);
}
}
if(dht11_dat[2]<temp_L)//温度报警
{
j++;
if((mode!=8)&&(j==1))
{
mode=8;
display_bmp(bmp2);
display(0, 2 , str2);//温度
display(0, 3 , str4);
display(0, 4 , str13);
display(0, 5 , str12);
}
}
if(dht11_dat[0]>humi_H)
{
j++;
if((mode!=9)&&(j==1))
{
mode=9;
display_bmp(bmp3);
display(0, 2 , str3);//湿度
display(0, 3 , str4);
display(0, 4 , str13);
display(0, 5 , str11);
}
}
if(dht11_dat[0]<humi_L)//湿度报警
{
j++;
if((mode!=10)&&(j==1))
{
mode=10;
display_bmp(bmp4);
display(0, 2 , str3);//湿度
display(0, 3 , str4);
display(0, 4 , str13);
display(0, 5 , str12);
}
}
if(j>0)
beep_flag=1;
else
{
beep_flag=0;
if(mode>6)
mode=0;
}
}
//显示
if(mode==0)
{
display(1, 0 , str2);//温度
display(1, 1 , str4);
display(1, 2 , mao);
find(dht11_dat[2]/10);
display_one(1,8,ppp);
find(dht11_dat[2]%10);
display_one(1,9,ppp);
display(1, 5, str1);
display(2, 0 , str3);//湿度
display(2, 1 , str4);
display(2, 2 , mao);
find(dht11_dat[0]/10);
display_one(2,8,ppp);
find(dht11_dat[0]%10);
display_one(2,9,ppp);
display_one(2,10,char1);
display(3, 0 , str5);//光照
display(3, 1 , str6);
display(3, 2 , mao);
find(light/10);
display_one(3,8,ppp);
find(light%10);
display_one(3,9,ppp);
display_one(3,10,char2);
display_one(3,11,char3);
display(0, 0 , str14);//电机速度
display(0, 1 , str15);
display(0, 2 , str16);
display(0, 3 , str4);
find(sudu);
display_one(0,8,ppp);
//模式显示
if(moshi==0)//自动
{
display(0, 6 , str17);
display(0, 7 , str19);
}
else //手动
{
display(0, 6 , str18);
display(0, 7 , str19);
}
}
if((mode>0)&&(mode<7))//设置显示
{
find(temp_L/10);//温度
display_one(1,2,ppp);
find(temp_L%10);
display_one(1,3,ppp);
display(1, 2, str1);
find(temp_H/10);//温度
display_one(1,10,ppp);
find(temp_H%10);
display_one(1,11,ppp);
display(1, 6, str1);
find(humi_L/10);//湿度
display_one(2,2,ppp);
find(humi_L%10);
display_one(2,3,ppp);
display_one(2,4,char1);
find(humi_H/10);//湿度
display_one(2,10,ppp);
find(humi_H%10);
display_one(2,11,ppp);
display_one(2,12,char1);
find(light_L/10); //光照
display_one(3,2,ppp);
find(light_L%10);
display_one(3,3,ppp);
display_one(3,4,char2);
display_one(3,5,char3);
find(light_H/10); //光照
display_one(3,10,ppp);
find(light_H%10);
display_one(3,11,ppp);
display_one(3,12,char2);
display_one(3,13,char3);
if(mode==1)
display(1,0,str10);//箭头位置
if(mode==2)
display(1,4,str10);
if(mode==3)
display(2,0,str10);
if(mode==4)
display(2,4,str10);
if(mode==5)
display(3,0,str10);
if(mode==6)
display(3,4,str10);
display(0,1,str8);//上下限
display(0,2,str9);
display(0,5,str7);
display(0,6,str9);
}
}
if(sec<10)//闪烁
sec++;
else
{
sec=0;
if(led_flag)
led_mode=!led_mode;
else
led_mode=0;
if(beep_flag)//蜂鸣器响
beep=!beep;
else
beep=0;
}
//电机控制
if(start==1)
{
if(fang==0)//正转
{
switch(dat)
{
case 0:Hc595SendByte(0x01);break;
case 1:Hc595SendByte(0x03);break;
case 2:Hc595SendByte(0x02);break;
case 3:Hc595SendByte(0x06);break;
case 4:Hc595SendByte(0x04);break;
case 5:Hc595SendByte(0x0c);break;
case 6:Hc595SendByte(0x08);break;
case 7:Hc595SendByte(0x09);
}
}
else //反转
{
switch(dat)
{
case 0:Hc595SendByte(0x08);break;
case 1:Hc595SendByte(0x0c);break;
case 2:Hc595SendByte(0x04);break;
case 3:Hc595SendByte(0x06);break;
case 4:Hc595SendByte(0x02);break;
case 5:Hc595SendByte(0x03);break;
case 6:Hc595SendByte(0x01);break;
case 7:Hc595SendByte(0x09);
}
}
if(motor_time<9-sudu)//调速
motor_time++;
else
{
motor_time=0;
if(dat<7)
dat++;
else
dat=0;
}
P1=0xff<<(9-sudu);//点亮LED
}
TH0=(65536-10000)/256;
TL0=(65536-10000)%256;
}
//外部中断0的中断函数
void Int0() interrupt 0
{
moshi=!moshi;
}
//串口助手
void Usart() interrupt 4
{
uchar i;
i=SBUF;//出去接收到的数据
RI = 0;//清除接收中断标志位
if(i=='4')//自动模式
moshi=0;
if(i=='5')//手动模式
moshi=1;
if(moshi==1)
{
if(i=='1')//温度
{
SBUF='T';while(!TI);TI=0;
SBUF=':';while(!TI);TI=0;
SBUF=dht11_dat[2]/10+0x30;while(!TI);TI=0;
SBUF=dht11_dat[2]%10+0x30;while(!TI);TI=0;
SBUF=0x0d;while(!TI);TI=0;
}
if(i=='2')//湿度
{
SBUF='S';while(!TI);TI=0;
SBUF=':';while(!TI);TI=0;
SBUF=dht11_dat[0]/10+0x30;while(!TI);TI=0;
SBUF=dht11_dat[0]%10+0x30;while(!TI);TI=0;
SBUF=0x0d;while(!TI);TI=0;
}
if(i=='3')//光照
{
SBUF='G';while(!TI);TI=0;
SBUF=':';while(!TI);TI=0;
SBUF=light/10+0x30;while(!TI);TI=0;
SBUF=light%10+0x30;while(!TI);TI=0;
SBUF=0x0d;while(!TI);TI=0;
}
}
}