基于AT89S52单片机的红外遥控温度报警器的设计与实现

时间:2022-11-20 17:18:18 作者:壹号 字数:3832字

第20卷

Vol.20

第21期电子设计工程

No.21

ElectronicDesignEngineering

2012年11月Nov.2012

基于AT89S52单片机的红外遥控温度报警器

的设计与实现

聂茹

(华南理工大学广州学院电子信息工程学院,广东广州510800)

摘要:温度报警器系统以AT89S52单片机为主控制器,对温度报警和时间的显示、调整进行控制。采用高精度

DS18B20为温度传感器,实现对环境温度的实时检测与采集,通过12864液晶显示温度和时间,当实时温度高于温度

报警上限或低于下限时可利用蜂鸣器进行报警。通过红外遥控可以修改温度报警上限和下限、时间参数以及设置闹钟。本设计的创新点是增加了用VC6.0开发的上位机,在计算机上显示出时钟、温度计和视频界面,构成友好的人机界面。因此,本系统具有很高的实用价值。关键词:AT89S52;红外遥控;温度报警;上位机中图分类号:TN277

文献标识码:A

文章编号:1674-6236(2012)21-0145-03

Designandrealizationofinfraredremotecontroltemperaturealarm

basedonAT89S52singlechip

NIERu

(CollegeofElectronicInformationEngineering,GuangzhouCollegeofSouthChina

UniversityofTechnology,Guangzhou510800,China)

Abstract:TemperaturealarmsystembasedonAT89S52singlechipcontrollercontrolsthetemperaturealarmandtimedisplay,adjustment.AdoptinghighprecisionDS18B20asatemperaturesensor,realizereal-timedetectionandacquisitionoftheenvironmentaltemperature,displaytemperatureandtimeby12864LCD,alarmwhentherealtimetemperatureishigherthanthetemperaturealarmupperlimitorlowerthanthelowerlimitbyusingthebuzzer.Byinfraredremotecontrolcanmodifythetemperaturealarmupperlimitandlowerlimit,theclocktimeparameterandsetAlarmclock.TheinnovationofthisdesignistoincreasethedevelopmentofthePCbyusingVC6.0,displayclock,thermometerandvideointerfaceoncomputer,constituteafriendlyman-machineinterface.Sothissystemhasveryhighpracticalvalue.Keywords:AT89S52;infraredremotecontrol;temperaturealarm;PC

…… 此处隐藏367字 ……

的通信。下位机系统主要由控制器模块、红外遥控模块、显示模块、温度采集报警模块、电源模块、时钟模块以及串口模块等部分组成。通过单片机作为主控制器,对温度报警和时间的显示、调整以及闹钟进行整体控制。

1.1系统结构图

本设计的上位机和下位机通信图结构图如图1所示。下

位机系统结构图如图2所示。

图1上、下位机通信结构图

Fig.1StructurediagramofthecommunicationbetweenPCand

hypogynousnachine

作者简介:聂茹(1982—),女,江西吉安人,硕士,讲师。研究方向:智能控制。