基于单片机的多功能电子钟系统设计

 2023-10-12 08:10

论文总字数:16235字

摘 要

随着社会的发展,科技的进步,电子产品逐渐渗透到生活各个领域。电子钟是日常生活中一种必不可少的电子产品,其具有时间准、体积小和方便操作等优点受到了人们的青睐。若能够在传统电子钟的基础上再加上一个温度采集模块,使得人们不仅在了解当前时间的基础之上,还能够方便的观察到现在的温度,这样的多功能电子钟的设计将更加值得推广。

本文设计了基于单片机的多功能电子钟系统。包括其硬件结构方面设计,也包含了软件方面的设计。这篇设计主要由四大模块组成,包括数据显示模块、温度采集模块、时间处理模块和调整设置模块。系统的核心采用STC89C52单片机,其数据显示模块采用LCD1602液晶显示器,温度采集模块采用DS18B20温度传感器,时间处理模块用的是DS1302时钟芯片,调整设置模块采用独立按键模块,共包括四个按键:模式选择键、功能选择键、调整加按键、调整减按键。本设计可以达到在显示器上完整显示出当前时间、日期和温度。同时其也具备时间的校准功能。本设计具备众多优点,不仅仅在于其多样化功能,读取数据方便直观。此外其电路结构简单也是本设计的优势之一。本设计可以应用于企业,学校,政府,法院,部队,以及一些生产单位等场合。

关键词:STC89C52,电子钟,温度显示,LCD液晶显示

Abstract: With the development of society and the progress of science and technology, electronic products have gradually penetrated into all fields of life. Electronic clock is an indispensable electronic product in daily life. It has the advantages of accurate time, small size and convenient operation, and is favored by people. If we can add a temperature acquisition module on the basis of the traditional electronic clock, so that people can not only understand the current time on the basis of, but also can conveniently observe the current temperature, such a multi-functional electronic clock design will be more worthy of promotion.

This paper designs a multifunctional electronic clock system based on single chip microcomputer. It includes the design of its hardware structure as well as the design of its software. This design is mainly composed of four modules, including data display module, temperature acquisition module, time processing module and adjustment setting module. The core of the system uses STC89C52 single chip microcomputer, its internal memory has 8KB ROM storage space, with ISP online programming technology; The data display module in this design adopts LCD1602 liquid crystal display, which has the advantages of simple hardware production, much display content, low power consumption and low cost. The temperature acquisition module adopts DS18B20 temperature sensor, which adopts single-bus transmission and has A/D conversion inside, so it is very convenient to use. The adjustment setting module adopts the independent key module, including four keys: mode selection key, function selection key, adjustment plus key and adjustment minus key. In addition, its simple circuit structure is one of the advantages of this design. The design can be used in enterprises, schools, governments, courts, the military, as well as some production units and other occasions.

Keywords: STC89C52 ,Electronic clock,Thermometer liquid ,crystal display

目 录

第1章 绪论 5

1.1 课题研究的目的 5

1.2课题研究的意义 5

1.3课题研究的国内现状 5

1.4 课题研究的主要内容 7

第2章 系统的总体方案设计 8

2.1 系统方案 8

2.2 单片机的选择 8

2.3 时钟模块的选择 9

2.4 温度传感器的选择 9

2.5 显示屏的选择 9

第3章 系统硬件设计 11

3.1 时钟电路设计 11

3.1.1 时钟芯片引脚说明 11

3.1.2 时钟芯片的接口电路及其工作原理 11

3.2 显示模块设计 13

3.2.1 液晶显示器介绍 13

3.2.2 LCD1602与MCU的接口电路 13

3.3 温度传感器模块设计 14

3.3.1 温度传感器的介绍 14

3.3.2 温度传感器的工作原理 14

3.3.3 温度传感器的接口电路设计 15

3.4按键模块设计 16

3.5复位电路的设计 17

第4章 软件设计 18

4.1 程序设计 18

4.2子程序模块流程图设计 19

4.2.1 LCD显示程序设计 19

4.2.2 DS1302读写程序设计 19

4.2.3 温度传感器程序设计 20

4.2.4按键模块程序设计 21

4.2.5闹钟程序设计 21

第5章 系统的仿真与调试 23

5.1 系统软件仿真 23

5.2 系统硬件仿真 23

5.3 硬件电路功能调试 24

第6章 结论 26

参考文献 27

致 谢 28

第1章 绪论

1.1 课题研究的目的

时光飞逝,伴随而来的科技也在同步快速且稳步的发展,由一开始人们观察太阳来判别时间,到后来的大摆钟,直至现在的电子时钟。人们研究没有间断,而记录却在一直创新。其能够对年月日,十分秒同时间来计时,也兼备补偿闰年多种功能。本设计采用的DS1302这款时钟芯片,具有误差小而且寿命长的优点,适用于长期的一个使用。此外还添置了DS18B20温度芯片,在普通电子钟的基础上,额外的能够显示出当前场景的一个温度。综合来说这款电子钟其集时间,温度,以及时间的校准为一体。在LCD1602液晶显示屏上可以方便清楚的查看。 该电路核心部分是采用STC89C52这款单片机,为单片机提供电源的部分我们选择的电压3~5V即可为其供电,能在这种低压下工作就是依赖于其的特性所需功耗不高。
  综上所述,设计的多功能电子钟凭借着众多优势,多样化功能,方便我们去直观的读取数据,此外低成本,电路结构简洁也是,与人们长期在电子器件这方面的发展趋势也是相吻合的,所以是值得去研究设计的。

剩余内容已隐藏,请支付后下载全文,论文总字数:16235字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;