基于51单片机的日历时钟显示系统设计学士学位论文 联系客服

发布时间 : 星期二 文章基于51单片机的日历时钟显示系统设计学士学位论文更新完毕开始阅读149a4416b94ae45c3b3567ec102de2bd9705de56

带日历电子钟的设计

摘 要

随着电子技术的迅速发展,特别是大规模集成电路的出现,确实给人类生活带来了根本性的改变,单片机技术的应用产品也已经走进了千家万户。时间的流逝,至从观太阳、摆钟到现在电子钟,人类不断研究,不断创新纪录。

本文首先描述系统硬件工作原理,并附以系统结构图加以说明,着重介绍了本系统所应用的各硬件接口技术和各个接口模块的功能及工作过程;其次,详细阐述了程序的各个模块和实现过程。本设计以数字集成电路技术为基础,单片机技术为核心。本文编写的主导思想是软硬件相结合,以硬件为基础,软件为主导,来进行各功能模块的编写。

本系统以AT89S52单片机为控制核心,以DS1302实时时钟电路对年、月、日、星期、时、分、秒进行计时,,同时用汇编语言和C语言进行软件设计。系统通过LCD液晶显示芯片显示数据,所以具有人性化的操作和美观的效果。

关键词:AT89S52;DS1302;LCD1602液晶显示;

I

With the design of electric clock calendar

ABSTRACT

With the rapid development of electronic technology, especially with the emergence of large-scale integrated circuits, to human life brought about fundamental changes. Its single-chip technology is the product has entered the tens of thousands of households. The emergence of the electronic calendar to people’s lives is brought about by a lot of convenience.

This article will first describe the working principle of the system hardware with the system block diagram to illustrate the structure , highlighted by the application of the system interface technology of the hardware and the interface module functions and work processes, and secondly, the procedures described in detail the various module and the realization of processes. The design of digital integrated circuits technology takes single-chip technology as the core. This article is the guiding philosophy of the preparation of a combination of hardware and software to hardware-based, to the preparation of various functional modules .

AT89S52 in the system for the control of single-chip core to real-time clock circuitry on the DS1302 year, month, day, weekdays, hours, minutes, seconds for time, also has multiple functions, such as a leap year compensation, at the same time with assembly language software design, increase the readability and procedures. LCD display data through the system and therefore have a user-friendly operation and aesthetic results.

Key words:AT89S52;DS1302;;LCD1602;

II

目 录

第一章 绪论 ........................................................................................................... 1 1.1 选题意义 .................................................................................................... 1 1.2 当今应用领域电子钟的发展趋势 ............................................................ 1 1.3 本课题主要研究的内容 ............................................................................ 2 第二章 系统方案论证 ........................................................................................... 3 2.1 系统具体要求 ............................................................................................ 3 2.2 系统基本方案的选择和论证 .................................................................... 3 2.2.1 单片机芯片的选择方案和论证 ....................................................... 4 2.2.2 显示器件的选择方案和论证 ........................................................... 4 2.2.3 时钟电路的选择方案和论证 ........................................................... 4 2.3 电路设计最终方案决定 ............................................................................ 5 第三章 系统的硬件设计与实现 ........................................................................... 6 3.1 系统硬件描述 ............................................................................................ 6 3.2 芯片介绍 .................................................................................................... 6 3.2.1 AT89S52芯片 ................................................................................... 6 3.2.2 DS1302实时时钟芯片 ..................................................................... 8 3.2.3 LCD1602液晶显示芯片 ................................................................ 10 3.3 系统硬件模块的设计 .............................................................................. 12 3.3.1 AT89S52主控模块的设计 ............................................................. 12 3.3.2 DS1302时钟模块的设计 ............................................................... 13 3.3.4 LCD1602显示模块的设计 ............................................................ 13

1

第四章 系统软件设计 ......................................................................................... 15 4.1 软件整体设计 .......................................................................................... 15 4.2 子模块设计 .............................................................................................. 16 4.2.1 DS1302时钟子模块的设计 ........................................................... 16 4.2.2 LCD1602显示子模块的设计 ........................................................ 19 4.3 软件测试 .................................................................................................. 22 4.3.1 测试结果及分析 ............................................................................. 22 4.3.2 测试结论 ......................................................................................... 23 第五章 系统调试 ................................................................................................. 24 5.1 软件调试 .................................................................................................. 24 5.1.1 仿真软件介绍 ................................................................................. 24 5.1.2 软件调试过程及结果分析 ............................................................. 25 5.2 硬件调试 .................................................................................................. 26 课程设计总结 ......................................................................................................... 27 致 谢 ................................................................................................................. 28 参考文献 ................................................................................................................. 29 附录A 系统电路设计原理图 ............................................................................. 30 附录B 系统源程序 ............................................................................................. 30

2