1、 毕业论文(设计)毕业论文(设计) 题 目:基于单片机的电子时钟的设计 作者姓名: 学 号: 专 业: 电子信息工程技术 指导教师: 2012 年年 6 月月 基于单片机的电子时钟的设计 1 摘 要 传统的数字电子时钟采用了较多的分立元器件,不仅占用了很大的空间而 且利用率也比很低,随着系统设计复杂度的不断提高,用传统时钟系统设计方法 很难满足设计需求。 单片机是集CPU、RAM、ROM、定时器/计数器和多种接口于一体的微控制器。 它体积小、成本低、功能强,广泛应用于智能产品和工业自动化上。而51系列的 单片机是各单片机中最为典型和最有代表性的一种。 本文设计的电子时钟是基于 51单片机,同时
2、使用c语言为程序设计语言,从而克服传统电子时钟的弊端。 本设计拟实现的基本功能为单片机计时显示功能。 能够体现单片机电子时钟 的可扩展优越性,加入时间调整程序,使用按钮,调整年月日及时间;加入阴历 显示功能。 关键词:单片机,电子时钟,c语言 ABSTRACT ABSTRACT Traditional digital electronic clock with a greater amount of discrete components, not only takes up a lot of space and utilization than low, 基于单片机的电子时钟的设计 2 as
3、 the system design complexity continues to improve, the clock system design using traditional methods are difficult to meet the design requirements . Microcontroller is a CPU, RAM, ROM, timer / counter and a variety of interfaces in one of the micro-controller. Its small size, low cost, powerful, wi
4、dely used in smart products and industrial automation. And 51 of the microcontroller MCU is the most typical and most representative one. This design is based on 51 single-chip electronic clock, using both assembly language for the programming language, to overcome the drawbacks of conventional elec
5、tronic clock. The design of the basic functions to be achieved for the microcontroller timer display. SCM can reflect the scalability advantages of electronic clock, add time to adjust, the use of buttons, adjust the date and time of year, month; to join the lunar calendar display. Keywords: microco
6、ntroller, electronic clock, assembly language 基于单片机的电子时钟的设计 3 目录 摘 要 1 ABSTRACT 1 第 一 章 绪 论. 4 1.1 单片机的定义 4 1.2 单片机分类 4 1.3 单片机的特点 5 1.4 单片机的应用领域 5 1.5 电子时钟的特点及应用领域 6 第二章 MCS-51 单片机简介 . 7 2.1 单片机的结构 7 2.2 单片机的存储器 9 第三章 数码管的简介. 12 3.1 数码管的分类. 12 3.2 数码管的应用. 14 第四章 电子时钟的设计. 14 4.1 可实现的功能. 14 4.2 软件设计流程. 15 4.3 电子时钟设计的部分主要流程. 18 第五章 电子时钟的仿真. 18 5.1 单片机调试仿真软件. 18 5.2 电子时钟的仿真. 20 5.3 整机的仿真及调试. 22 结束语. 25 致 谢. 26 参考文献. 27 基于单片机的电子时钟的设计 4