作息时间系统设计摘要本次设计的作息时间系统除具备基本时钟功能外,还可以实时显示年、月、日信息,并且可以自动识别闰年、闰月及每月的天数。另外还可以根据学校、工厂等单位的作息时间表按时打铃、播放音乐、广播体操和其他节目等。该系统设有3个按钮,可以随时调整当前时间,以保证时间与标准时间相吻合,且采用DS1302高性能时钟芯片,从而保证了时钟显示的精度和可靠性。整个系统采用市电通过电源适配器供电,由于DS1302时钟芯片有备用电池供电功能,所以当市电停电时,不但整个控制系统所有数据不会丢失,而且可以照常运行,这样再次上电后就不用再调整时间了。为了使该系统体积尽量最小,我在设计时采用了AT89C2051单片机,该单片机可直接驱动LED数码显示器。考虑到整个系统显示位数较多(14位),为了保证显示的亮度,显示部分采用了静态显示。还有,为了便于使用者操作,整个系统采用了一些人性化的设计,比如指示灯的添加等。纵观整个系统,结构简单、体积小、可靠性高、操作简单、扩展性强,而且价格低廉,非常适合学校、工厂和机关等单位使用。关键词:作息时间单片机时钟芯片继电器AbstractThesystemofworkandresttimewhatIhavedesignedcandisplayareal-timeofyear,monthandday,andmayautomaticallyidentifyaleapyear,aleapmonthandthenumberofthedayspermonthinadditiontoabasicclockfunction.Thissystemmayhitthebellontimeaccordingtotheschools’orfactories’dailyschedule,playmusicandbroadcastinggymnasticsandotherprogramsandsoon.Thesystemhasthreebuttonssothatyoucanadjustthecurrenttimeatanymomenttoensurethatthecurrenttimecoincideswiththestandardtime,inadditiontousingthehigh-performanceclockchipDS1302,whichhasensuredaclockdisplayofprecisionandhighreliability.Theentiresystemusesthecityelectricitytosupplypowerthroughthepowersourceadapter.AstheDS1302clockchiphasthepowersupplyfunctionofbackupbattery,alldatasoftheentirecontrolsystemwillnotbelosedandthesystemrunasusualwhenthecityelectricitywascutsothatthesystemwillnotneedtheadjustmentoftimewhenthecityelectricitycomesnexttime.Inordertocausethissystemvolumetobeassmallestaspossible,AT89C2051SCMwasusedinthedesignwhichcandirectlydrivetheLEDdigitaldisplay.Moreoverconsideringthedisplaydigitsoftheoverallsystemaremany(14digits)andinordertoguaranteethebrightnessofshow,Ihasadoptedthestaticdemonstrationintheshowpart.Also,inordertofacilitateusers,theentiresystemhasusedsomeuser-friendlydesign,suchastheadditionofindicatinglightsetc.Thewholesystemhassimplestructure,smallsize,highreliability,simpleoperation,highexpansibilityandlowpricessothatitisidealforschools,factoriesanddepartments.Keywords:WorkandResttimeSCMClockchipRelay目录第1章绪论............................................................11.1课题研究的目的及意义...........................................11.2国内外研究现状.................................................11.3论文研究内容及创新点...........................................21.3.1主要内容..................................................21.3.2创新点....................................................2第2章核心芯片简介....................................................32.1AT89C2051简介..................................................32.1.1AT89C2051芯片的引脚及特点................................32.1.2AT89C2051的主要性能参数..................................52.2DS1302简介.....................................................62.2.1DS1302引脚功能与内部结构.................................72.2.2DS1302的控制字...........................................82.2.3DS1302的数据输入输出(I/O)................................82.2.4D...