文档详情

—用单片机实现电子钟的设计.doc

发布:2018-03-23约1.58万字共29页下载文档
文本预览下载声明
郑州大学毕业设计(论文) 题目: 用单片机实现电子钟的设计 指导教师: 职称: 学生姓名: 学号: 专 业: 院(系): 完成时间: 年 月 日 目 录 1 绪论 1 2 系统和硬件电路的设计 2 2.1 系统方案 2 2.1.1 控制模块方案的选择 2 2.1.2 系统的总体框图 2 2.2 单片机的选择 2 2.2.1 AT89S51单片机工作原理 2 2.3 单片机外围电路的设计 4 2.3.1 时钟源电路的设计 4 2.3.2 单片机的复位电路 5 2.3.3 闹钟和调时电路图 5 2.4 显示电路的设计 6 2.4.1 显示电路 7 3 软件设计 10 3.1 主程序设计 10 3.1.1 定时/计数器的工作 11 3.1.2 定时器/计数器工作方式 11 3.2 中断程序的设计 13 3.2.1 输入输出的控制方式 13 3.2.2 MCS-51 单片机的中断源 13 3.2.3 中断相关寄存器 13 3.2.4 MCS-51单片机中断处理过程 13 3.3 显示模块的程序设计 14 4 软硬件调试 15 4.1 系统的调试 15 4.2 硬件静态的调试 15 4.3 软件的调试 15 结 论 18 致 谢 19 参考文献 20 摘 要 在现今的高速运行的现代生活中,准确适时的把握时间尤其重要。而我们传统的时钟由于其自身的特点,功能极其有限。因此我们需要一个多功能的时钟,让它来对全天适时的控制好我们的时间。随着计算机技术的高速发展,单片机以其自身特有的特点,已经广泛应用与各种智能仪器、家庭电器、电子玩具等各个领域。因此用单片机实现电子钟的设计课题应运而生,利用单片机的多功能控制能力能很好实现要求。 本课题的主要内容就是用单片机实现数字电子钟的设计。利用单片机的特点,通过编写程序来控制我们的产品实现我们需要的功能。 在课题中还有一个任务就是我们的显示模块,由于要显示时、分、秒需要6位数字,为了方便,我们用两个四位一体数码管来显示时间,所以如何通过编程来控制数码管的显示也是一个重点。 整个过程就是先设计和焊接好硬件电路,再就是通过C语言编写应用程序来实现我们需要的功能,这期间进行的软件仿真和调试是本设计的重点和难点。 关键字:单片机; 数码管; 中断 ABSTRACT In the modern life of the high-speed run - time in present, the accurate and well timed confidence time is particularly important. because of our traditional clocks characteristics of its oneself, function very finite。So we need a multi-function clock,Let it comes well to timed control our time for the whole day. Along with the high-speed development of the computer technology, Single Chip Microcosm with its special characteristics, Have already applied extensively and various intelligent instrument, Family electric apparatus, the electron toy etc. each realm. The design topic that therefore uses Single Chip Microcosm to carry out electric clock emerge with the tide of the times, the multi-function control capability ability that make use of Single Chip Microcosm is very the implementation request. The main Purpose of this topic is
显示全部
相似文档