基于单片机单片机智能火灾报警系统设计-毕设课设 protues仿真

百度网盘下载地址(984):点击下载

#include <reg52.h>
#include <stdio.h>
#include <intrins.h>
#include <absacc.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
//#include "I2C.h"
#include "lcd1602.h"
#include "adc0832.h"

sbit K1= P1^2;
sbit K2= P1^3;
sbit K3= P1^4;
sbit K4= P1^5;
sbit K5= P1^6;
sbit K6= P1^7;
sbit DQ= P2^7;

sbit BUZZ= P2^6;

 
uchar tmpdisplay[8]; //定义显示缓存数组
bit read_flag=0;	//定义读时钟标志位
bit mode=0;	  		//显示模式0正常1设定
uchar smoke[]="000";

uchar set_position=0;

uchar set_tempure=0;     //设定温度
uchar set_smokescope=0;	 //设定浓度
int real_tempure=0;		//实际温度
uchar real_smokescope=0; //实际烟雾浓度

uchar cursor_position=0;//光标位置
	
uchar  time_counter_50ms=0;
uchar  smokescope=0;
uchar  first_read_tempe=0;//第一次读取温度数值


unsigned char t[2],*pt;				//用来存放温度值,测温程序就是通过这个数组与主函数通信的
unsigned char  TempBuffer1[10]={0x2b,0x30,0x30,0x30,0x2e,0x30,0x30,0xdf,0x43,'\0'};//{0x2b,0x31,0x32,0x32,0x2e,0x30,0x30,0xdf,0x43,'\0'};
								//显示实时温度,上电时显示+122.00C
/*
unsigned char  TempBuffer0[16]={0x54,0x48,0x3a,0x2b,0x31,0x32,0x35,0x20,
								0x54,0x4c,0x3a,0x2b,0x31,0x32,0x34,'\0'};	*/
								//显示温度上下限,上电时显示TH:+125 TL:+124C							
unsigned char code dotcode[4]={0,25,50,75};

  • 7
    点赞
  • 51
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值