XXX大学
本科生毕业论文(设计)
论文(设计)题目:智能饮水机控制系统 分 院:XXX 专 业(方 向):XXX 年 级、班 级:XXX 学 生 学 号:XXX 学 生 姓 名:XXX 指 导 老 师:XXX
XXX 年 X 月 X 日
I
独创性声明及授权书
本人所呈交的毕业论文(设计)是我个人在指导教师指导下进行的研究工作及取得的成果。除特别加以标注的地方外,论文中不包含其他人的研究成果。本论文如有剽窃他人研究成果及相关资料若有不实之处,由本人承担一切相关责任。
本人的毕业论文(设计)中所有研究成果的知识产权属XX学院所有。本人保证:发表或使用与本论文相关的成果时署名单位仍然为XX学院,无论何时何地,未经学院许可,决不转移或扩散与之相关的任何技术或成果。学院有权保留本人所提交论文的原件或复印件,允许论文被查阅或借阅;学院可以公布本论文的全部或部分内容,可以采用影印、缩印或其他手段复制保存本论文。
加密学位论文解密之前后,以上申明同样适用。
论文作者签名:
日期: 年 月 日
II
摘 要
随着计算机技术的发展,单片机技术已成为计算机技术中的一个独特的分支,单片机的应用领域也越来越广泛,特别是在工业控制和仪器仪表智能化中扮演着极其重要的角色。过去经常采用模拟电路、数字电路实现的电路系统,现在相当大一部分可以用单片机予以实现,传统的电路设计方法已演变成软件和硬件相结合的设计方法。在实际应用中,单片机经常要与各种传感器相结合组成一定的应用系统,以实现系统的自动检测与控制。
本文所设计的智能饮水机就是单片机结合传感器的一个简单应用。该系统设计综合单片机以及电子技术理论,从生活实际出发,完善了饮水机的功能。设计方案中,主要采用数字温度传感器DS18B20组成测温系统作为检测单元,并运用了AT89C52作为主机单元、 X5045EEPROM作为存储单元、HD7279芯片来管理键盘和显示器。整个设计系统实现三个功能,即加热、对温度上下限的控制和定时加热。与传统的饮水机相比,由于采用了自动检测和控制的电子设计技术,可较好地实现对水温的测量和控制,具有较广泛的应用前景。
【关键词】 温度采集 89C52 X5045 HD7279
III
Abstract
With the development of computer technology, single-chip technology has become the computer technology in a unique branch, SCM applications are increasingly widespread, especially in the industrial control and instrumentation play an extremely intelligent important role. to achieve automatic control of a system to detect sensors often need to control the volume of industrial production in the modern automated production processes in particular, the use sensors to monitor and control the production process parameters, which makes the application of sensors is the extensive, it is no exaggeration to say that almost every project a modern, can not be separated from a variety of sensors. In this paper, drinking fountains designed by the smart sensor is the single-chip combination of a simple application.
The system is an integrated single-chip design, as well as the theory of electronic technology, from the reality of life, improve the function of the drinking fountains. Design, mainly composed of digital temperature sensor 18b20 detection unit as a temperature measurement system and the use of the 89C52, x5045, hd7279, clock chips, such as 1302 integrated device. The design system of three functions, namely, heating the upper and lower limits of temperature control and heating time to time. Compared with the conventional drinking fountains, as a result of the use of the automatic detection and control of electronic design technologies to achieve better temperature measurement and control, with a wider range of applications.
【Key Words】Temperature acquisition;89C52;X5045;HD7279
IV
目 录
1 绪 论 ........................................................................ 错误!未定义书签。
1.1引言 ............................................................................. 错误!未定义书签。 1.2 研究的目的与意义 ..................................................... 错误!未定义书签。
2 总体设计 ................................................................... 错误!未定义书签。
2.1 设计任务 ................................................................. 错误!未定义书签。 2.2系统结构设计 ............................................................. 错误!未定义书签。
2.2.1电路原理和器件选择 ............................................................. 错误!未定义书签。 2.2.2系统框图及说明 ....................................................................................................... 4
3 硬件设计 ................................................................... 错误!未定义书签。
3.1 主板设计 ..................................................................... 错误!未定义书签。 3.1.1主机单元 ................................................................................................. 4 3.1.2 存储单元 ................................................................................................ 4 3.1.3 人机接口单元 ..................................................................................................... 7 3.2 副板设计 ................................................................................................... 10 3.2.1 温度采集单元 ...................................................................................... 10 3.2.2 时钟单元 ............................................................................................................ 11 3.3 控制单元 .................................................................................................... 11 3.4 原理图的绘制设计 ................................................................................... 12
4 软件设计 ...................................................................................................... 13
4.1 主程序设计 ................................................................................................. 13 4.1.1 主程序和中断程序流程图 ................................................................ 14 4.1.2 变量和常量说明 ............................................................................................ 15 4.2 人机接口单元软件设计 ............................................................................. 16 4.2.1 键处理程序流程图及说明 ................................................................ 16 4.2.2 变量和常量说明 ................................................................................ 17 4.2.3 各按键功能及其子程序说明 ..................................................................... 18 4.3 DS1302的软件设计 ................................................................................. 19 4.4 DS18B20的软件设计 .............................................................................. 19
5 系统的调试和问题总结 ..................................................................... 20
5.1 系统硬件调试 ........................................................................................... 20 5.2 系统软件调试 ........................................................................................... 21
参考文献 ........................................................................................................... 22 致 谢 ................................................................................................................ 23 附录一 系统原理图 .................................................................................... 24 附录二 系统PCB图 .................................................................................... 26
V