基于单片机的时钟日历的设计(毕业论文) 下载本文

内容发布更新时间 : 2024/11/19 13:35:08星期一 下面是文章的全部内容请认真阅读。

XXXXXXX毕业论文

摘要

本设计是基于51系列的单片机进行的实时日历和时钟显示设计,可以显示年月日时分秒及周信息,具有可调整日期和时间功能。在设计的同时对单片机的理论基础和外围扩展知识进行了比较全面准备。

实时日历和时钟显示的设计过程在硬件与软件方面进行同步设计。硬件部分主要由AT89S52单片机,LED显示电路,以及调时按键电路等组成,系统通过LED显示数据,所以具有人性化的操作和直观的显示效果。软件方面主要包括时钟程序、键盘程序,显示程序等。本系统以单片机的汇编语言进行软件设计,为了便于扩展和更改,软件的设计采用模块化结构,使程序设计的逻辑关系更加简洁明了,以便更简单地实现调整时间及日期显示功能。所有程序编写完成后,在wave软件中进行调试,确定没有问题后,在Proteus软件中嵌入单片机内进行仿真。

关键词:AT89S52; DS1302; LED

XXXXXXX毕业论文

Abstract

This design is based on 51 series monolithic integrated circuits of a real-time calendar and the clock shows the design, you can show how and when a week, has may adjust the date and time functions. in the design for monolithic integrated circuits, and peripheral to expand the basic theories of knowledge was fairly comprehensive preparation.

Real-time calendar and the clock shows the design in hardware and software design of hardware that is synchronized. the led display at89s52 monolithic integrated circuits, and when should the electrical circuits, the system through the led display data so be humanized operate and intuitive that effect. including the software application programs, the keyboard, the program, etc. This system to monolithic integrated circuits of the assembly language for easily developing software design, and changes, software design to use modular design, the programming logical relationship with more and more so as to realize the time and date display the functions. all procedures in writing after wave of debugging the software and make no question of the proteus software embedded monolithic integrated circuits.

Key Words:AT89S52; DS1302; LED

2

XXXXXXX毕业论文

目录

1概述............................................................................................................................. 1 2设计方案论证............................................................................................................. 1

2.1功能要求.......................................................................................................... 1 2.2方案确定.......................................................................................................... 2

2.2.1单片机芯片的选择方案和论证........................................................... 2 2.2.2显示模块选择方案和论证................................................................... 2 2.2.3时钟芯片的选择方案和论证............................................................... 2 2.2.4电路设计最终方案确定....................................................................... 2

3主控制器和外围器件................................................................................................. 3

3.1AT89S52单片机 .............................................................................................. 3 3.2DS1302时钟芯片 ............................................................................................ 3

3.2.1DS1302芯片介绍 ................................................................................. 3 3.2.2DS1302 的应用 ..................................................................................... 5 3.3数码管LED ..................................................................................................... 6 3.4译码器74HC138 ............................................................................................. 6 3.5锁存器74LS244 .............................................................................................. 6 4硬件设计..................................................................................................................... 7

4.1电路设计框图.................................................................................................. 7 4.2系统概述.......................................................................................................... 7 4.3电源设计.......................................................................................................... 7 4.4单片机的复位电路.......................................................................................... 8 4.5单片机系统的晶振电路.................................................................................. 8 4.6主电路设计...................................................................................................... 9 5软件设计..................................................................................................................... 9

5.1主程序设计.................................................................................................... 10 5.2键盘子程序设计............................................................................................ 10 5.3日历时钟子程序设计.................................................................................... 12 5.4显示子程序设计............................................................................................ 13 6系统调试................................................................................................................... 14

6.1软件调试........................................................................................................ 14 6.2硬件调试........................................................................................................ 15 7结论........................................................................................................................... 15 致谢.............................................................................................................................. 16 参考文献...................................................................................................................... 17 附录.............................................................................................................................. 18

附录Ⅰ硬件电路图.............................................................................................. 18 附录Ⅱ主程序源代码.......................................................................................... 18 附录Ⅲ外文翻译原文.......................................................... 错误!未定义书签。 附录Ⅳ外文翻译译文.......................................................... 错误!未定义书签。

I