本科毕业课程(设计)
(设计目)题:单片机定时闹钟设计
学 院: 明德学院 专 业: 电子信息工程 班 级: 电信12151 学 号: 122003110811 学生姓名: 袁杰 指导教师: 王许
2015年 6月23号
贵州大学本科毕业课程(设计)
诚信责任书
本人郑重声明:本人所呈交的课程设计,是在指导老师的指导下独立进行研究所完成。在文本设计中凡引用他人已经发表或未发表
的成果、数据、观点等,均已明确注明出处。
特此声明。
课程(设计)作者签名: 袁杰
日 期: 2015/6/23
摘要
本设计是单片机定时闹钟系统,不仅能实现系统要求的功能,而且还有附加功能,即还能设定和修改当前所显示的时间。 本次设计的定时闹钟在硬件方面就采用了AT89C51芯片,用6位LED数码管来进行显示。LED用P0口进行驱动,采用的是动态扫描显示,能够比较准确显示时时—分分—秒秒。通过S1、S2、S3、和S4四个功能按键可以实现对时间的修改和定时,定时时间到喇叭可以发出报警声。在软件方面采用汇编语言编程。整个定时闹钟系统能完成时间的显示,调时和定时闹钟、复位等功能,并经过系统仿真后得到了正确的结果。
关键字:单片机、AT89C51、定时闹钟、仿真
Abstract
This design is a single-chip timing alarm system, can not only realize the function of system requirements, and there are additional functions, which can set up and modify the display time. Timing alarm clock this design adopts the AT89C51 chip on the hardware side, with 6 LED digital tube to display. LED P0 export driven, by using dynamic scanning display, can accurately display always - sub - seconds seconds. Through the S1, S2, S3, and S4 four function keys can be achieved on the time changes and timing, timing to the horn can send out alarm sound. Using assembly language programming in the software. The timing clock system has functions of time display, timing and timing alarm clock, reset and other functions, and the system simulation to obtain correct results. Keywords: single chip microcomputer, AT89C51, alarm clock, simulatio
I
电信12151 袁杰
1.绪论 ······································································································ 1
1.1设计的目的与意义 ························ 1 1.2国内外现状 ··························· 1 1.3 单片机发展趋势 ························· 1 1.4 设计中有哪些难点 ························ 2 1.5 设计步骤···························· 2 2.硬件设计 ································································································ 3
2.1方案论证 ···························· 3 2.2系统设计原理 ·························· 3 2.3单片机AT89C51简介 ······················· 3 2.4数码管显示电路 ························· 6 2.6喇叭:SPEAKER ·························· 7 3 系统的软件设计 ······················································································· 7
3.1系统的软件设计与说明 ······················ 7 3.2 程序调试···························· 8 3.3 程序流程图 ··························· 8 4.参考程序 ································································································ 9 5.致谢 ····································································································· 16
II