基于51单片机电子万年历毕业论文.doc

约32页DOC格式手机打开展开

基于51单片机电子万年历毕业论文,摘 要:电子万年历是一种非常广泛日常计时工具,对现代社会越来越流行。它可以对年、月、日、周日、时、分、秒进行计时,还具有闰年补偿等多种功能,而且ds1302的使用寿命长,误差小。对于数字电子万年历采用直观的数字显示,可以同时显示年、月、日、周日、时、分、秒和温度等信息,还具有时间校准等功...
编号:45-90533大小:783.50K
分类: 论文>通信/电子论文

内容介绍

此文档由会员 csfujixie 发布

基于51单片机电子万年历毕业论文


摘  要:
电子万年历是一种非常广泛日常计时工具,对现代社会越来越流行。它可以对年、月、日、周日、时、分、秒进行计时,还具有闰年补偿等多种功能,而且DS1302的使用寿命长,误差小。对于数字电子万年历采用直观的数字显示,可以同时显示年、月、日、周日、时、分、秒和温度等信息,还具有时间校准等功能。该电路采用AT89S52单片机作为核心,功耗小,能在3V的低压工作,电压可选用3~5V电压供电。
本设计是基于51系列的单片机进行的电子万年历设计,可以显示年月日时分秒及周信息,具有可调整日期和时间功能。在设计的同时对单片机的理论基础和外围扩展知识进行了比较全面准备。在硬件与软件设计时,没有良好的基础知识和实践经验会受到很大限制,每项功能实现时需要那种硬件,程序该如何编写,算法如何实现等,没有一定的基础就不可能很好的实现。在编写程序过程中发现以现有的相关知识要独自完成编写任务困难重重,在老师和同学的帮助下才完成了程序部分的编写。
万年历的设计过程在硬件与软件方面进行同步设计。硬件部分主要由AT89C52单片机,LED显示电路,以及调时按键电路等组成。在单片机的选择上本人使用了AT89C52单片机,该单片机适合于许多较为复杂控制应用场合。显示器使用2片7SEG-MPX8-CA和一片7SEG-MPX4-CA。7SEG-MPX8-CA是一种八个共阳二极管显示器,7SEG-MPX4-CA是一种四个共阳二极管显示器。为了能更轻松的控制这三片显示器,本人使用了3片74HC164来驱动。74HC164 是 8 位边沿触发式移位寄存器,串行输入数据,然后并行输出。软件方面主要包括日历程序、时间调整程序,公历转阴历程序,显示程序等。程序采用汇编语言编写,以便更简单地实现调整时间及阴历显示功能。所有程序编写完成后,在wave软件中进行调试,确定没有问题后,在Proteus软件中嵌入单片机内进行仿真。最后总在老师同学的帮助以及自己的努力下完成了此次电子万年历的设计。
关键词:

Abstract

 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 compensation to a variety of functions, and the DS1302's 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 functions. 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 seconds, 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 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 task 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 AT89C52 microcontroller, LED display circuit, and the tune composed of the circuit when the button. In the SCM choice I used the AT89C52 microcontroller, which is suitable for many of the more complex control applications. Monitor the use of two 7SEG-MPX8-CA and a 7SEG-MPX4-CA. 7SEG-MPX8-CA is a total of eight-yang diode display, 7SEG-MPX4-CA is a total of four-yang diode display. In order to more easily control the three monitors, I use three 74HC164 to drive.
74HC164 is an 8-bit edge-triggered shift register, serial input data, and parallel output. The software includes calendar program, time to adjust procedures, turn the lunar calendar programs, display programs. Programs written in assembly language used in order to more easily adjust the time and the realization of the lunar calendar display. All programming is complete, the wave 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 well as their own efforts to complete the design of the electronic calendar.
Keywords:
        Clock electric clock:DS1302;DS18B20:Dynamic scan:scm

~~~~~~目录~~~~~~

一、设计要求与方案论证 ………………………………………………………………………4
1.1 设计要求 ……………………………………………………………………………………4
1.2 系统基本方案选择和论证 …………………………………………………………………4
1.2.1单片机芯片的选择方案和论证 …………………………………………………………4
1.2.2 显示模块选择方案和论证 ………………………………………………………………4
1.2.3 时钟芯片的选择方案和论证 ……………………………………………………………4
1.2.4 温度传感器的选择方案与论证 …………………………………………………………5
二.系统的硬件设计与实现………………………………………………………………………5
2.1 电路设计框图 ………………………………………………………………………………5
2.2 系统硬件概述 ………………………………………………………………………………5
2.3 主要单元电路的设计 ………………………………………………………………………6
2.3.1单片机主控制模块的设计 ………………………………………………………………6
2.3.2时钟电路模块的设计 ……………………………………………………………………6
2.3.3温度采集模块设计 ………………………………………………………………………7
2.3.4 电路原理及说明 …………………………………………………………………………7
2.3.5显示模块的设计 …………………………………………………………………………8
三、系统的软件设计 ……………………………………………………………………………9
3.1程序流程框图 ………………………………………………………………………………9
3.2 子程序的设计 ………………………………………………………………………………9
3.2.1 DS18B20温度子程序 ……………………………………………………………………9
3.2.2 读、写DS1302子程序 …………………………………………………………………10
四. 指标测………………………………………………………………………………………11
4.1 测试仪器……………………………………………………………………………………11
4.2硬件测试……………………………………………………………………………………11
4.3软件测试……………………………………………………………………………………11
4.4测试结果分析与结论………………………………………………………………………12
4.4.1 测试结果分析……………………………………………………………………………12
4.4.2 测试结论…………………………………………………………………………………12
五、作品总结……………………………………………………………………………………12
六、致谢词………………………………………………………………………………………12
参考文献…………………………………………………………………………………………13
附录一:系统电路图……………………………………………………………………………14
附录二:系统程序清单…………………………………………………………………………15
附录三:系统使用说明书………………………………………………………………………40