带温度显示的电子闹钟设计说明
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
题目:带温度显示的电子闹钟设计
摘要
本文设计了一款利用单片机技术实现带温度显示的电子闹钟。以应用AT89C51芯片作为核心,利用8位LED数码管显示,使用DS1302实时时钟日历芯片完成时钟/日历的基本功能,同时利用DS18B20温度传感器测量环境温度。这种实现方法的优点是电路简单,性能可靠,实时性好,时间和温度精度高,操作简单,编程容易。
关键词:电子闹钟,温度,AT89C51,DS18B20,DS1302
Abstract
The design determines to use the MCU technology to realize the multi-functional electron clock. This design use AT89C51 as a core chips, 8 LED digital displaying. using DS1302 real-time clock chip to complete the basic function of the clock/calendar.At the same time the design use of DS18B20 temperature sensors is for collecting the environmental temperature. The method has the advantage of being simple circuit, reliable performance, good real-time, high precision of the time and temperature, simply operation, easy programming.
Key words: Electronic clock,Temperature,AT89C51,DS18B20,DS1302
目录
1 绪论................................................................... .. (1)
1.1 引
言...............................................................
(1)
1.2 电子时钟研究背景和意
义...............................................................
(1)
1.3论文主要工作概述................................................................. . (1)
2 系统设计方案................................................................... . (2)
2.1带温度显示的电子闹钟系统的总体构成 (2)
2.2带温度显示电子闹钟系统的功能................................................................. .3
3 系统硬件计................................................................... .. (4)
3.1主要IC芯片选择................................................................. (4)
3.1.1 微处理器选
择................................................................... . (4)
3.1.2 芯片DS1302简介................................................................... (5)
3.1.3 环境温度传感器................................................................... (6)
3.2 电子时钟的硬件电路设计................................................................... . (8)
3.2.1时钟电路设
计...............................................................
(8)
3.2.2环境温度采集电路设
计...............................................................
(8)
3.2.3显示电路计................................................................. (9)
3.2.4按键电路设
计...............................................................
(10)
3.2.5闹铃电路设
计...............................................................
(11)
4 系统软件设计................................................................... .. (12)
4.1主程序计................................................................. (12)
4.2子程序设
计...............................................................
(12)
4.2.1实时时钟日历子程序设
计...............................................................
.12
4.2.2环境温度采集子程序设
计...............................................................
.13
4.2.3显示子程序设计................................................................... . (16)