基于单片机的万年历的设计与制作

上传人:Bod****ee 文档编号:47220555 上传时间:2018-07-01 格式:DOC 页数:35 大小:1,010.53KB
返回 下载 相关 举报
基于单片机的万年历的设计与制作_第1页
第1页 / 共35页
基于单片机的万年历的设计与制作_第2页
第2页 / 共35页
基于单片机的万年历的设计与制作_第3页
第3页 / 共35页
基于单片机的万年历的设计与制作_第4页
第4页 / 共35页
基于单片机的万年历的设计与制作_第5页
第5页 / 共35页
点击查看更多>>
资源描述

《基于单片机的万年历的设计与制作》由会员分享,可在线阅读,更多相关《基于单片机的万年历的设计与制作(35页珍藏版)》请在金锄头文库上搜索。

1、基于单片机的万年历的设计与制作摘要摘要:单片机应用技术飞速发展,纵观我们现在生活的各个领域,从导弹的导航 装置,到飞机上各种仪表的控制,从计算机的网络通讯与数据传输,到工业自 动化过程的实时控制和数据处理,以及我们生活中广泛使用的各种智能 IC 卡、 电子宠物等,这些都离不开单片机。单片机是集 CPU 、RAM 、ROM、定时、计 数和多种接口于一体的微控制器。它体积小,成本低,功能强,广泛应用于智 能产业和工业自动化上。电子万年历是一种非常广泛日常计时工具,对现代社 会越来越流行。它可以对年、月、日、周日、时、分、秒进行计时,还具有闰 年补偿等多种功能,而且 DS1302 的使用寿命长,误差

2、小。对于数字电子万年历 采用直观的数字显示,可以同时显示年、月、日、周、时、分、秒和温度等信 息,还具有时间校准等功能。该电路采用 AT89S52 单片机作为核心,功耗小, 能在 3V 的低压工作,电压可选用 35V 电压供电。本设计是基于 51 系列的单片机进行的电子万年历设计,可以显示年月日时 分秒及周信息,具有可调整日期和时间功能。在设计的同时对单片机的理论基 础和外围扩展知识进行了比较全面准备。在硬件与软件设计时,没有良好的基 础知识和实践经验会受到很大限制,每项功能实现时需要哪种硬件,程序该如 何编写,算法如何实现等,没有一定的基础就不可能很好的实现。在编写程序 过程中发现以现有的相

3、关知识要独自完成编写任务困难重重,在老师和同学的 帮助下才完成了程序部分的编写。万年历的设计过程在硬件与软件方面进行同步设计。硬件部分主要由 AT89S52 单片机,LCD1602 显示电路,以及调时按键电路等组成。单片机使用了 AT89S52 单片机,该单片机适合于许多较为复杂控制应用场合。显示由 LCD1602 并行输出。软件方面主要包括日历程序、时间调整程序,显示程序等。程序采 用 C 语言编写,以便更简单地实现调整时间功能。所有程序编写完成后,在 Keil 软件中进行调试,确定没有问题后,在 Proteus 软件中嵌入单片机内进行 仿真。最后在老师同学的帮助以及自己的努力下完成了此次电

4、子万年历的设计。关键词:时钟电钟;DS1302;动态扫描;51 单片机 AbstractSCM application technology develop rapidly, looking around us now in all spheres of life, from missiles, navigation equipment, to the various instruments on the aircraft control from a computer network communications and data transmission, industrial autom

5、ation to real-time process control and data processing, and our lives extensive use of the smart card, electronic pets, which is inseparable from the microcontroller. Monolithic single-chip is the set of CPU, RAM, ROM, the timing, number and variety of interface integrated microcontrollers. Its smal

6、l size, low cost, high performance, which are widely used in smart industries, and industrial automation. E-calendar day time is a very wide range of tools, increasingly popular in modern society. It can be year, month, day, Sunday, hours, minutes, seconds for time, but also has a leap year compensa

7、tion to a variety of functions, and the DS1302s long life, small error. For the digital electronic calendar using an intuitive digital display can simultaneously display year, month, day, Sunday, hours, minutes, seconds, and temperature and other information, but also a time-calibration and other fu

8、nctions. The circuit uses AT89S52 microcontroller as the core, power consumption, low-voltage work in 3V, the voltage can choose 3 5V voltage supply. The design is based on 51 series of microcontrollers to the design of electronic calendar, you can display date information on when the minutes and se

9、conds, and weeks, with adjustable date and time functions. At the same time in the design of the theoretical basis of the MCU and peripheral expansion of knowledge of the more comprehensive preparation. The hardware and software design, there is no good basic knowledge and practical experience will

10、be greatly limited, each feature is required to achieve the kind of hardware, procedures, how to write, how to implement such algorithms, there is no certain foundation can not be good implementation. Found during the preparation process to the existing knowledge to complete the preparation of the t

11、ask alone difficult,In the help of teachers and students to complete the program part of the preparation. Calendar of the design process in hardware and software to synchronize the design. Hardware mainly by the AT89S52 microcontroller, LCD1602 display circuit, and the tune composed of the circuit w

12、hen the button. In the SCM choice I used the AT89S52 microcontroller, which is suitable for many of the more complex control applications. Monitor the use of LCD1602.The software includes calendar program, time to adjust procedures, display programs. Programs written in assembly language used in ord

13、er to more easily adjust the time and the realization of the lunar calendar display. All programming is complete, the Keil software debugging, make sure that no problems, in the Proteus software within a microcontroller embedded in the simulation. The final overall the teacher to help students, as w

14、ell as their own efforts to complete the design of the electronic calendar. Keywords:Clock electric clock:DS1302; Dynamic scan:51SCM 引言当今社会电子技术迅速的发展,特别是随着大规模集成电路的出现,给人类生活带来了根本性的改变。尤其是单片机技术的应用产品已经走进了千家万户。电子万年历的出现给人们的生活带来诸多方便。电子钟是一种利用数字电路来显示秒、分、时的计时装置,与传统的机械钟相比,它具有计时准确、显示直观等优点,因而得到广泛应用。随着人们生活环境的不断改善和美

15、化,在很多场合可以看到数字电子钟。第一章 设计方案论证1.1 设计要求: (1) 具有年、月、日、星期、时、分、秒等显示功能; (2) 具有温度显示功能; (3) 具备年、月、日、星期、时、分、秒校准、调整功能。 1.2 系统基本方案选择及论证1.2.1 单片机芯片的选择方案和论证 方案一: 采用 89C51 芯片作为硬件核心,采用 Flash ROM,内部具有 4KB ROM 存储 空间,能于 3V 的超低压工作,而且与 MCS-51 系列单片机完全兼容,但是运用于电 路设计中时由于不具备 ISP 在线编程技术, 当在对电路进行调试时,由于程序 的错误修改或对程序的新增功能需要烧入程序时,对

16、芯片的多次拔插会对芯片 造成一定的损坏。 方案二:采用 AT89S52,片内 ROM 全都采用 Flash ROM;能以 3V 的超底压工作;同时 也与 MCS-51 系列单片机完全该芯片内部存储器为 8KB ROM 存储空间,同样具 有 89C51 的功能,且具有在线编程可擦除技术,当在对电路进行调试时,由于 程序的错误修改或对程序的新增功能需要烧入程序时,不需要对芯片多次拔插, 所以不会对芯片造成损坏。 所以选择采用 AT89S52 作为主控制系统.1.2.2 显示模块的选择方案和论证 方案一: 采用 LED 数码管动态扫描,LED 数码管价格适中,对于显示数字很合适,但考 虑本次设计中要显示多位日期数据,并且要显示温度数据,在实际电路连接时 会需要很多连线,增加出问题的可能性,所以不采用此方案。方案二:采用点阵式数码管显示,点阵式数码管是由八行八列的发光二极管组成, 对于显示文字比较适合,如采用在显示数字显得太浪费,且价格也相对较高,所以 也不用此种作为显示. 方案三: 采用 LCD 液晶显示屏,

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 学术论文 > 毕业论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号