电子时钟毕业设计.doc
文本预览下载声明
毕业设计(论文)
题 目 单片机的电子时钟设计与发展
英文题目 SCM electronic clock design and development
学生姓名 ******
班 级 ******
专 业 ***********
指导教师 *******
东华理工大学
二0 一二 年四 月
单片机的数字时钟设计与发展
摘要
基于单片机设计的数字钟精确度较高, 因为在程序的执行过程中, 任何指令都不影响定时器的正常计数,即便程序很长也不会影响中断的时间。
本设计使用12MHZ晶振与单片机AT89C51相连接,以AT89C51芯片为核心,采用动态扫描方式显示,通过使用该单片机,加之在显示电路部分使用7407驱动电路,实现在6个LED数码管上显示日期、时间、定时、闹铃,通过6个按键实现设置日期、进行调时、设定闹铃、倒计时等功能,在实现各功能时数码管进行相应显示,闹铃或定时时间到时蜂鸣器响,按下闹铃键或定时键时,声音停止。软件部分用汇编实现,分为显示、延迟、调时、闹铃、定时、调整日期等部分。通过软硬件结合达到最终目的。
关键词: 电子钟; 单片机; 动态扫描;
Abstract
This design uses a 12 MHZ crystal to connect with the machine AT89C51, takes AT89C51 chips as core. It adopts the dynamic state of the scanning method to show. Using this MCU and 7407 drive electric circuit, we are able to show date, time, fix the time, and make bell on 6 LED figures tubes. We can use 6 key to constitute date, adjust time, enact the bell and set the countdown timer. When the electric carrying out each function, the figures tube shows the tight function .When the alarm clock and the countdown timer were reached, the voice begins. While 3 or 4 is pressed, the voice stops. The software part is realized by assembler language. It was divided into to show, delay, adjust, make bell, in fixed time, and adjust date etc. part. We get the end purpose combining the software and the hardware.
Keywords: Electric clock; MCU; Dynamic state scanning ;
目录
摘要 I
Abstract II
1 引言 1
2 整体设计思路 2
3 主要元件的简介 3
3.1 AT89C51单片机: 3
3.2 7407驱动器 3
4 电路设计 4
4.1整体设计 4
4.2 分块设计 4
4.2.1 输入部分 4
4.2.2 输出部分(显示电路) 5
4.2.3 晶振与复位电路: 5
5 程序设计 6
5.1程序思路 6
5.2程序设计步骤 7
5.3程序的主要模块 7
5.3.1延迟程序 7
5.3.2 中断服务子程序 7
5.3.3 主程序 8
5.3.4显示程序 9
5.3.5 闹铃程序和定时程序 10
5.4程序调试 10
6 功能仿真 11
6.1 软件介绍 11
6.2仿真过程: 11
6.2.1仿真图的绘制 11
6.2.2功能的实现 11
7 日历功能的实现 14
结论 16
致谢 17
参考文献 18
1 引言
单片机因将其主要组成部分集成在一个芯片上而得名,就是把中央处理器、随机存储器、只读存储器、中断系统、定时器/计数器以及I/O接口电路等部件集成在一个芯片上。
单片机自20世纪70年代问世以来,以其极高的性能价格比,
显示全部