1、 本 科 毕 业 论 文 基于 STC89C52 单片机的智能红外遥控系统 所 在 学 院 信息科学技术学院 专 业 名 称 自动化 申请学士学位所属学科 工 学 年 级 学 生 姓 名、学 号 指导教师姓名、职称 * 完 成 日 期 二一三年五月 摘 要 I 摘 要 随着科技的发展,特别是微电子技术的发展,单片机的应用已经深入到生活 的各个领域。本文以 STCC89C52 为控制芯片,DS1302 为时钟芯片,DS18B20 为温 度传感器,HS0038 红外一体接收头作为红外接收器,以此接收并处理遥控器按键 信号并用来矫正时钟时间。同时,该项目还加入了定时和设定温度上下限的功能, 当达到预
2、设时间时执行开关灯命令,当温度低于温度下限或高于温度上限时执行 开空调命令,开关器件为两个大功率电磁继电器。整个项目的所有数据显示于 LCD12864 液晶, 形成一个良好的用户界面。 硬件电路图和 PCB 用 Protel99SE 绘制, 软件开发环境为 KeilV3,项目实物为万用板焊接电路,经调试各项功能均已正常 实现。 关键词:红外遥控,单片机,DS1302,DS18B20,LCD12864 Abstract II ABSTRACT With the development of science and technology, especially the development of
3、 microelectronics technology, SCM applications have been deeply into all areas of life. Taking STCC89C52 as control chip, for DS1302 clock chip, DS18B20 as temperature collector, HS0038 infrared receiving head as integrated infrared receiver, signal receiving and processing the remote control button
4、s, in order to correct the clock time. At the same time, the project also joined the function of timing, and setting temperature of upper and lower, executive orders open to turn off the lights when preset time is reached, when the temperature lower than the temperature is lower or higher than the t
5、emperature limit command execution open air conditioning, for electromagnetic relay switch device. The whole project all the data shown in LCD12864 LCD, forming a good user interface. Made in Protel99SE, the hardware circuit diagram and PCB software development environment for KeilV3, project physic
6、al for universal plate welding circuit, through debugging functions are normal. Key words:infrared remote control, microcontroller, DS1302, DS18B20, LCD12864 目 录 III 目 录 第 1 章 绪 论 1 第 2 章 单片机介绍 1 2.1 单片机简介及历史 1 2.2 单片机应用发展趋势 2 第 3 章 硬件设计 2 3.1 STC89C52 单片机介绍 2 3.1.1 STC89C52 引脚简介 . 2 3.1.2 STC89C52RC 主要功能特点 4 3.2 DS18B20 温度传感器介绍 5 3.2.1 DS18B20 引脚及特点 5 3.2.2 DS18B20 内部结构及寄存器介绍 7 3.3 DS1302 时钟芯片介绍 . 9 3.3.1 DS1302 引脚及内部寄存器简介 9 3.3.2 DS1302 读写时序 10 3.4 HS0038 红