带实时日历时钟的温度检测系统 下载本文

内容发布更新时间 : 2024/12/25 0:32:15星期一 下面是文章的全部内容请认真阅读。

山东理工大学 毕业设计(论文)

题 目: 带实时日历时钟的温度

检测系统的设计

学 院:电气与电子工程学院 专 业: 应用电子技术

学生姓名: 苏丽娟 指导教师: 陈文钢

毕业设计(论文)时间:二О一 一年 2月 21日~ 6月13日 共 16 周

中 文 摘 要

摘 要

本文借助电路仿真软件Proteus对基于AT89S51单片机的带实时日历时钟的温度检测系统的设计方法及仿真进行了全面的阐述。该系统在硬件方面主要采用AT89S51单片机作为主控核心,由 MAXIM6675热电偶数字转换器及DS18B20数字温度传感器采集温度、DS1302时钟芯片提供时钟、LCD1602液晶显示屏显示、L7805提供电源电路。AT89S51单片机是由Atmel公司推出的,功耗小,电压可选用4~6V电压供电; MAXIM6675是由MAXIM公司推出的,是一个集成了热电偶放大器、冷端补偿、A/D转换器及SPI串口的热电偶放大器与数字转换器,可以直接与单片机接口,大大简化系统的设计,保证了温度测量的快速、准确;DS1302时钟芯片是美国DALLAS公司推出的具有涓细电流充电功能的低功耗实时时钟芯片,它可以对年、月、日、时、分、秒进行计时,还具有闰年补偿等多种功能;数字显示是采用的LCD液晶显示屏来显示,可以同时显示温度、年、月、日、时、分、秒等信息。所有程序编写完成后,在Keil软件中进行调试,确定没有问题后,在Proteus软件中嵌入单片机内进行仿真。 关键词:单片机AT89S51;MAX6675;DS1302;LCD1602;温度

I

英 文 摘 要

Abstract

This paper mainly discuss the design and simulation of a temperature detection system with real—time displaying based on AT89S51 with the help of Proteus. In this system, the hardware mainly adopts core, AT89S51 as the master MAXIM6675 thermocouple by digital converter and DS18B20 digital temperature sensors to collect temperature, DS1302 clock chip LCD1602 provide clock, LCD display, L7805 provide power supply circuit. Atmel company by AT89S51 is introduced, low consumption, voltage can choose 4 ~ 6V voltage power supply; By MAXIM company MAXIM6675 is introduced, the thermocouple is an integrated amplifier, the cold end compensation, A/D converter and SPI serial thermocouple amplifier and digital converter, can directly and single-chip microcomputer interface, greatly simplifying the design of the system, to ensure the temperature measurement of the rapid and accurate; DALLAS DS1302 clock chip is the United States out Juan fine current charge function with the low-power real-time clock chip, it can for year, month, day, when, minutes and seconds for timing, also has a variety of functions such as leap year compensation; Digital display is used to display the LCD screen, can also display temperature, year, month, day, when, minutes and seconds and other information.

Keywords: SCM AT89S51; MAX6675; DS1302; LCD1602; temperature

II

目 录

目 录

摘 要 ............................................................................................................................................... I ABSTRACT(英文摘要) ...................................................................................................... II 目 录...........................................................................................................................................III 第一章 引 言 ........................................................................................................................ - 1 -

1.1 课题的背景和意义 .................................................................................................. - 1 - 1.2 系统基本方案选择和论证 .................................................................................... - 1 - 1.2.1 单片机芯片的选择 ......................................................................................... - 1 - 1.2.2 显示模块选择方案和论证 ........................................................................... - 1 - 1.2.3 时钟芯片的选择方案和论证 ....................................................................... - 2 - 1.2.4 温度传感器的选择方案与论证 .................................................................. - 3 - 1.3 电路设计最终方案决定 ......................................................................................... - 3 -

第二章 系统的硬件设计与实现 ........................................................................................ - 4 -

2.1 电路设计框图 ........................................................................................................... - 4 - 2.2 系统硬件概述 ........................................................................................................... - 4 - 2.3 主要单元电路的设计 .............................................................................................. - 5 - 2.3.1 AT89S51单片机最小系统............................................................................. - 5 - 2.3.2时钟电路模块的设计 ...................................................................................... - 6 - 2.3.3 温度采集模块设计 ......................................................................................... - 7 - 2.3.4 显示模块的设计 .............................................................................................. - 8 - 2.3.5 MAX6675工作原理及说明............................................................................. - 9 - 2.3.6 DS18B20工作原理及说明 ............................................................................. - 4 -

2.3.7 LCD1602工作原理及说明........................................................................... - 15 - 2.3.8 DS1302工作原理及说明 ............................................................................... - 4 -

2.3.9 电源电路 ......................................................................................................... - 18 - 2.3.10系统硬件电路 ............................................................................................... - 19 -

第三章 系统的软件设计 ................................................................................................... - 20 -

3.1 程序流程框图 ......................................................................................................... - 20 -

III

目 录

3.2 子程序 ....................................................................................................................... - 22 -

第四章 仿真与调试............................................................................................................. - 23 - 第五章 总结 ........................................................................................................................ - 24 - 参考文献 ................................................................................................................................. - 24 - 致谢与声明 ............................................................................................................................ - 24 -

IV