文档详情

单片机电子时钟课程设计.doc

发布:2019-04-15约9.21千字共18页下载文档
文本预览下载声明
《单片机技术》课程设计说明书 数字电子钟 系 、 部: 电气与信息工程系 学生姓名: 全昌炽 指导教师: 王韧 职称 副教授 专 业: 电子信息工程 班 级: 电子0901班 完成时间: 2011-12-22 摘 要 时钟,自从它发明的那天起,就成为人类的朋友,但随着时间的推移,科学技术的不断发展,人们对时间计量的精度要求越来越高,应用越来越广。怎样让时钟更好的为人民服务,怎样让我们的老朋友焕发青春呢?这就要求人们不断设计出新型时钟。 数字电子钟的设计方法有多种,其中,利用单片机实现的电子钟具有编程灵活,便于电子钟功能的扩充,即可用该电子钟发出各种控制信号,精确度高等特点,同时可以用该电子钟发出各种控制信号。 本文主要介绍用单片机内部的定时/计数器来实现电子时钟的方法,本设计由单片机AT89S52芯片和LED数码管为核心,辅以必要的电路,构成了一个单片机电子时钟。与传统机械表相比,它具有走时精确,显示直观等特点。它的计时周期为24小时,显满刻度为“23时59分59秒”,另外具有校时功能等特点。该电子钟可以做到的功能: 上电或按键复位后能自动显示系统提示符“P.”进入时钟准备状态。第一次按电子钟启动/暂停键,电子钟从0时0分0秒开始运行,进入时钟运行状态。再次按电子钟启动/暂停键,则电子钟进入时钟暂停状态,此时可按下调整键调整时间,分别通过时间加,时间减两个按键调整时间。调整结束后可按启动/暂停键再次进入时钟运行状态。通过设置的A、B、C、D四个键来调整运行,并且利用了8位LED显示时分秒。 此电子钟严格按照要求设计,最终达到预期的效果,能够正确显示“P”点以及时分秒的计时,算是一次比较成功的设计了。 关键词:电子钟;单片机;汇编 PAGE 26 PAGE II ABSTRACT Clock, since it was invented that day, becomes the friend of mankind, but as time goes on, the continuous development of science and technology, people on the time measurement accuracy is higher and higher, more and more wide application. How to let the clock to better serve the people, how to make our old friend bloom? This requests the people to continue to design a new clock. The design of digital electronic clock methods are various, among them, realize the use of single-chip electronic clock with programming flexibility, ease of electronic clock function expansion, can use the electric clock out of control signal, high accuracy, and can use the electric clock out of control signal. This paper mainly introduces the MCU internal timer / counter to realize the electronic clock method, designed by the MCU and AT89S52 chip and LED digital tube as the core, supplemented by necessary circuit, composed of a single-chip electronic clock. Compared with the traditional mechanical watches, it has a precise path, intuitive display characteristics. Its time period is 24 hours, was in full scale as twenty-three fifty-nine 59 seconds, and a school function e
显示全部
相似文档