基于单片机的数字时钟摘要20世纪末,电子技术获得了飞速的发展,在其推动下,现代电子产品几乎渗透了社会的各个领域,有力地推动了社会生产力的发展和社会信息化程度的提高,同时也使现代电子产品性能进一步提高,产品更新换代的节奏也越来越快。单片机模块中最常见的是数字钟,数字钟是一种用数字电路技术实现时、分、秒计时的装置,与机械式时钟相比具有更高的准确性和直观性,且无机械装置,具有更更长的使用寿命,因此得到了广泛的使用。本课题主要研究的是基于单片机的数字钟设计,采用AT89C51单片机作为系统的主控芯片,外接LED显示电路,按键电路,晶振电路,复位电路模块构成一个简单的数字钟。通过按键电路能对时、分、秒分别进行设置和实时调整,并将结果显示在数码管上。关键词:数字钟,单片机,数码管IAbstractAuthor:chengdongTutor:wangxinElectronictechnologyhasbeendevelopedrapidlyinthe20century,withitsmodernelectronicproducts,pushedbyalmostpermeatedeveryareaofsocietyhasvigorouslypromotedsocialproductiveforcesdevelopmentandimprovementofsocialinformatizationlevel,alsomakemodernelectronicproductperformancefurtherimproved,andtherhythmofupgradeitsproductsisbecomingmoreandmorequickly.ThemostcommonSCMmoduleisadigitalclock,adigitalclockisakindofdigitalcircuittechnologyimplementation,minutesandseconds,thetimingdevicewithmechanicalclockcomparedwithhigheraccuracyandintuitiveandnomechanicaldevice,hasmorelongerservicelife,soithasbeenwidelyused.ThistopicresearchisthedigitalclockdesignbasedonSCM,AT89C51SCMasthemaincontrolchipsystem,externalLEDdisplaycircuit,keycircuits,crystalscircuit,resetcircuitmoduleconstituteasimpledigitalclock.Throughthekeycircuitscanrespectivelythediffculties,minutesandsecondssettingandreal-timeadjustment,andtheresultshowedthatinthedigitaltube.Keywords:digitalclockSCM;digitalII目录1引言.....................................................................................................................12单片机介绍...........................................................................................................23数字钟硬件设计...................................................................................................33.1系统方案的确定..................................................................................................................................33.2功能分析...............................................................................................................................................33.3数字钟设计原理...................................................................................................................................33.3.1晶振电路...................................................................................................................................43.3.2复位电路...................................................................................................................................53.3.3数码显示电路............................................................................................................................64.数字钟的软件设计...............................................................................................74.1程序设计内容.......................................................................................................................................74.2系统设计流程图..................................................................................................................................74.2....