安徽财经大学信息工程学院本科课程论文(设计)
专业综合课程 设计论文
题 目 160128中文显示温度与时间 学 院 信息工程学院 专 业 电子信息工程 班 级 08 信工(2)班 学 号 200883080 姓 名 *** 指导老师 ** 老师
2011 年 10 月
1
安徽财经大学信息工程学院本科课程论文(设计)
摘 要
本课程设计是利用单片机AT89C51、时钟芯片DS1302、温度传感器DS18B20以及160*128的液晶组合设计的一款模拟万年历,实现简单的显示温度、时间和日期的功能。时钟芯片利用单片机的晶振提供脉冲以控制内部计时器,读取当前的日期与时间,并通过接口传输给单片机予以处理;同时温度传感器将产生的模拟温度传送给单片机。单片机将所接受的数据传输出到显示器160128上,以实现温度、日期与时间的同时显示。该系统主要是由时钟读取模块、当前温度读取模块、温度与时间显示模块和控制电路四部分组成。时钟读取部分利用时钟芯片DS1302实时提供当前的时间,并传送给单片机;温度提取是利用DS18b20读取当前室内温度;显示部分利用LCD160128液晶显示出万年历及温度。整个系统利用C语言进行程序设计,经调试仿真效果均达到课程设计要求。
关键词:AT89C51;万年历;DS1302;DS18B20;LCD160128
2
安徽财经大学信息工程学院本科课程论文(设计)
Abstract
This curriculum project is using monolithic integrated circuit AT89C51, clock chip DS1302, temperature sensor DS18B20 as well as 160*128 liquid crystal unitized design one section simulates ten thousand calendars, realizes the simple demonstration temperature, the time and the date function. The clock chip provides the pulse using monolithic integrated circuit's crystal oscillator to control the internal timer, reads the current date and the time, and processes through the connection transmission for the monolithic integrated circuit; Simultaneously the temperature sensor will produce the simulation temperature transmits for the monolithic integrated circuit. The monolithic integrated circuit will accept the data transmission to the monitor on 160128, realizes the temperature, the date and the time at the same time demonstration. This system is mainly by the clock read module, the current temperature read module, the temperature and the time display module and the control circuit four parts is composed. The clock read part real-time provides the current time using clock chip DS1302, and transmits for the monolithic integrated circuit; The temperature extraction is reads the current indoor temperature using DS18b20; The demonstration part uses the LCD160128 liquid crystal display ten thousand calendars and the temperature. The overall system carries on the programming using the C language, meets the curriculum project requirements after the debugging simulation effect.
Keywords: AT89C51;Calendar ;DS1302;DS18B20;LCD160128
3
安徽财经大学信息工程学院本科课程论文(设计)
目录
前言 ............................................................... 1 1 设计任务与要求 ................................................ 1 2 总体框图 ....................................................... 1
2.1 设计方案 .................................................... 1
2.2 电路原理图 .................................................. 2
3 实验元器件选择及其功能 ........................................ 2
3.1实验器件 ..................................................... 2
3.2主要器件极其相关功能 ......................................... 2
4 系统软硬件设计 ................................................ 8
4.1硬件电路设计 ................................................. 8 4.2 软件设计 ................................................... 10
5 总体设计电路图 ................................................ 27 6 安装与调试 .................................................... 28
6.1调试过程 .................................................... 28
6.2电路仿真 .................................................... 31
7 性能测试与分析 ............................................... 33 8 设计总结 ...................................................... 33 9 实验心得与体会 ............................................... 34 参考文献 .......................................................... 35
4
安徽财经大学信息工程学院本科课程论文(设计)
前言
单片机是随着超大规模集成电路技术的发展而诞生的,由于它具有体积小、功能强、性价比高等特点,所以广泛应用于电子仪表、家用电器、节能装置、军事装置、机器人、工业控制等诸多领域,使产品小型化、智能化,既提高了产品的功能和质量,又降低了成本,简化了设计。
本设计主要介绍单片机在带实时日历时钟的温度检测系统中的应用。它具有电路简单、功能齐全、制作成本低、性价比高,只需要提供家用电源供电即可。该仪器采用美国Intel公司八位单片机作为控制核心,配以其他进口集成电路,加上对软件的精心设计,实现了仪表智能化。
系统软件部分采用MCS—51单片机C语言精心编写,其数据流程清晰地反映在程序中,增强了软件的可读性,便于改进和扩充,从而为其实用提供更好的软件支持。
1 设计任务与要求
(1)利用单片机AT89C51控制整个设计电路。 (2)用实时时钟芯片DS1302对当前时间进行计时。 (3)用温度传感器DS18B20检测当前温度。 (4)在160128LCD上显示当前时间和温度。
2 总体框图
2.1 设计方案
(1)本课题所设计的显示温度与时间的液晶屏是将由单片机转送的时间、温度及日期显示出来。
(2)时钟芯片DS1302可以实时检测当前时间。
(3)温度传感器DS18b20可以模拟外界温度的变化。当温度变化时,160128
1