单片机制作万年历

上传人:公**** 文档编号:564347221 上传时间:2022-09-22 格式:DOC 页数:56 大小:660.50KB
返回 下载 相关 举报
单片机制作万年历_第1页
第1页 / 共56页
单片机制作万年历_第2页
第2页 / 共56页
单片机制作万年历_第3页
第3页 / 共56页
单片机制作万年历_第4页
第4页 / 共56页
单片机制作万年历_第5页
第5页 / 共56页
点击查看更多>>
资源描述

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

1、江 西 理 工 大 学 南 昌 校 区毕 业 设 计(论文)题 目:单片机制作万年历系 :专 业:班 级:学 生:学 号:指导教师: 职称:讲 师摘 要 电子万年历是一种非常广泛日常计时工具,对现代社会越来越流行。它可以对年、月、日、周日、时、分、秒进行计时,还具有闰年补偿等多种功能,而且DS1302的使用寿命长,误差小。对于数字电子万年历采用直观的数字显示,可以同时显示年、月、日、周日、时、分、秒和温度等信息,还具有时间校准等功能。该电路采用AT89S51单片机作为核心,功耗小,能在3V的低压工作,电压可选用35V电压供电。 本设计是基于51系列的单片机进行的电子万年历设计,可以显示年月日时

2、分秒及周信息,具有可调整日期和时间功能。在设计的同时对单片机的理论基础和外围扩展知识进行了比较全面准备。在硬件与软件设计时,没有良好的基础知识和实践经验会受到很大限制,每项功能实现时需要那种硬件,程序该如何编写,算法如何实现等,没有一定的基础就不可能很好的实现。在编写程序过程中发现以现有的相关知识要独自完成编写任务困难重重,在老师和同学的帮助下才完成了程序部分的编写。万年历的设计过程在硬件与软件方面进行同步设计。硬件部分主要由AT89C51单片机,LED显示电路,以及调时按键电路等组成。在单片机的选择上本人使用了AT89C51单片机,该单片机适合于许多较为复杂控制应用场合。显示器使用2片7SE

3、G-MPX8-CA和一片7SEG-MPX4-CA。7SEG-MPX8-CA是一种八个共阳二极管显示器,7SEG-MPX4-CA是一种四个共阳二极管显示器。为了能更轻松的控制这三片显示器,本人使用了3片74HC164来驱动。74HC164 是 8 位边沿触发式移位寄存器,串行输入数据,然后并行输出。软件方面主要包括日历程序、时间调整程序,公历转阴历程序,显示程序等。程序采用汇编语言编写,以便更简单地实现调整时间及阴历显示功能。所有程序编写完成后,在wave软件中进行调试,确定没有问题后,在Proteus软件中嵌入单片机内进行仿真。最后总在老师同学的帮助以及自己的努力下完成了此次电子万年历的设计。

4、关键词:时钟电钟;DS1302;DS18B20;动态扫描;单片机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 DS1302s long life, small

5、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 AT89S51 microcontroller as the core, po

6、wer 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

7、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 o

8、f 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 comple

9、te the program part of the preparation.Calendar of the design process in hardware and software to synchronize the design. Hardware mainly by the AT89C51 microcontroller, LED display circuit, and the tune composed of the circuit when the button. In the SCM choice I used the AT89C52 microcontroller, w

10、hich 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

11、 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 ti

12、me 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 com

13、plete the design of the electronic calendar.Keywords: Clock electric clock;DS1302;DS18B20;Dynamic scan;scm目 录第一章 引言11.1选题背景11.2单片机的简介11.3单片机的发展趋势21.4设计的意义3第二章 设计要求与方案论证62.1设计要求:62.2.1单片机芯片的选择方案和论证72.2.2显示模块选择方案72.3键盘的选择82.4实现定时82.5电路设计最终方案决定9第三章 系统的硬件设计与实现103.1电路设计框图103.2 系统硬件概述103.3 主要单元电路的设计113.3.

14、1单片机主控制模块的设计113.3.2时钟电路模块的设计153.3.4显示模块的设计17第四章 系统的软件设计214.1程序流程框图214.2程序23第五章 PROTEUS使用275.1编程环境PROTEUS275.2用PROTEUS ISIS对电子万年历的硬件电路设计275.3用PROTEUS ISIS进行电子万年历的仿真测试31第六章 结论346.1硬件测试346.2软件测试346.3测试结果分析与结论356.3.1 测试结果分析356.3.2 测试结论35致谢37参考文献38附录39第一章 引言1.1选题背景在社会迅速发展的今天,单片机的运用已经神偷到我们生活的每个角落,也似乎很难找到哪

15、个领域没有单片机的足迹。智能仪表、医疗器械,导弹的导航装置、智能监控、通讯与数据传输、工业自动化过程的实时控制和数据处理,广泛使用的各种智能IC卡,汽车的安全保障系统,动控制领域的机器人,数码相机、电视机、全自动洗衣机的控制,电话机以及程控玩具,电子宠物等,这些都离不开单片机。所以,单片机的学习、开发与应用将对于现代社会的发展、经济的繁荣,和提高满足人类日益增长的物质文化需求有着至关重要的作用。随着经济的不断发展,人们对生活质量的要求也在不断地提高。厂家也不断的推出各种电子产品以满足人们的需要,而电子万年历则顺应了人们对时间方面的要求。传统的电子万年历功能较为单一,价格较高,较难走进千家万户,没能达到人们生活中所需要的最基本要求,本课题旨在设计一款,功能较全面,价格较低且实用性强的电子万年历,以满足不同使用者的需求。1.2单片机的简介单片机是一种集成在电路芯片,是采用超大规模集成电路技术把具有数据处理能力的中央处理器CPU随机存储器RAM、只读存储器ROM、多种I/O口和中断系统、定时器/计时器等功能(可能还包括显示驱动电路、脉宽调制电路、模

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

最新文档


当前位置:首页 > 资格认证/考试 > 自考

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