中图分类号:基于单片机控制的电子时钟设计专业名称:应用电子技术学生姓名:王明宗导师姓名:王春霞职称:讲师焦作大学机电工程学院2012年12月毕业设计中图分类号:密级:UDC:单位代码:基于单片机控制的电子时钟设计Basedonsingle-chipmicrocomputercontrolthedesignoftheelectronicclock焦作大学机电工程学院姓名王明宗学制3年专业应用电子技术研究方向电子技术导师王春霞职称讲师论文提交日期2012.12.20论文答辩日期2012.12.31焦作大学机电工程学院毕业设计摘要摘要现代生活的人们越来越重视起了时间观念,可以说是时间和金钱划上了等号。对于那些对时间把握非常严格和准确的人或事来说,时间的不准确会带来非常大的麻烦,所以以数码管为显示器的时钟比指针式的时钟表现出了很大的优势。数码管显示的时间简单明了而且读数快、时间准确显示到秒。所以数字电子钟的精度、稳定度远远超过老式机械钟。而机械式的依赖于晶体震荡器,可能会导致误差。在这次设计中,我们采用LED数码管显示时、分、秒,以24小时计时方式,根据数码管动态显示原理来进行显示,以AT89S51芯片为核心,辅以必要的电路,设计了一个简易的电子时钟,它由4.5V直流电源供电,通过数码管能够准确显示时间,调整时间,并在数码管上显示相应的时间。关键词:单片机AT89S51电子时钟焦作大学机电工程学院毕业设计摘要ABSTRACTModernlifepeoplepaymoreandmoreattentiontouptheconceptoftime,cansaytimeandmoneyofftheequalsign.Forthosewhograspoftimeisverystrictandaccuratepersonorthing,itisnotaccuratetimewillbringverybigtrouble,sotodigitaltubefordisplayclockthanpointerclockshowedalotofadvantages.Digitaltubedisplaytimesimpleandfastreading,timeaccuratedisplaytoseconds.Sothedigitalclockaccuracy,stabilityisfarmorethantheoldmechanicalclock.Andmechanicaldependentonthecrystaloscillators,mayleadtoerror.Inthisdesign,weadoptLEDdigitaltubedisplay,points,SECto24hourstimeway,accordingtotheprincipleofdynamicdisplayofdigitaltubetoshowthatAT89S51chipasthecore,withthenecessarycircuit,designasimpleelectronicclock,itconsistsof4.5Vdcpowersupply,throughthedigitaltubecanaccuratelydisplaythetime,adjustingtime,andinthedigitaltubedisplaythecorrespondingtime.Keyword:SCMAT89S51electronicclock焦作大学机电工程学院毕业设计目录目录第一章引言...............................................................................................................................................11.1数字电子钟的背景......................................................................................................................11.2数字电子钟的意义......................................................................................................................11.3数字电子钟的应用......................................................................................................................1第二章设计方案.......................................................................................................................................32.1数字时钟方案...............................................................................................................................32.2数码管显示方案...........................................................................................................................3第三章系统设计.......................................................................................................................................23.1总体设计.......................................................................................................................................23.2单片机外围控制电路..................................................................................................................23.2.1单片机的选择..................................................................................................................23.2.2控制电路..........................................................................................................................43.2.3电源部分..........................................................................................................................53.2.4复位电路..........................................................................................................................63.2.5程序下载接口..................................................................................................................63.2.6位选部分..........................................................................................................................73.2.7数码管的连接电路..........................................................................................................7第四章软件设计.......................................................................................................................................24.1程序流程图..................................................................................................................................24.2源程序..........................................................................................................................................4第五章使用调试.....................................................................................................................................11第六章设计总结.....................................................................................................................................12参考文献...................................................................................................................................................13附录...........................................................................................................................................................14致谢...........................................................................................................................................................15焦作大学机电工程学工程学院毕业设计第一章引言1第一章引言1.1数字电子钟的背景20世纪末,电子技术获得了飞速的发展,在其推动下,现代电子产品