第1页共42页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第1页共42页摘要本设计详细介绍了利用AT89C51单片机设计时间控制器的方法。该时间控制器是以AT89C51单片机为核心,扩展一片XICOR公司的X5045组成的小系统,控制一路继电器:可以设定一天中的时间,设定继电器的开启时间和关闭时间,可以清除不需要的定时,能够紧急启动:所有的设定均通过键盘实现,按键具有连击功能,每个状态都有指示灯提示。我们设计的作息时间控制是用单片机实现的,是为了更好的对时间控制智能化。时间控制器包括硬件和软件。硬件部分包括继电器,存储器和显示器接口芯片。软件部分,主要是主程序设计。软硬件结合在一起,先调试子程序,然后逐级叠加调试,最后系统调试通过。时间控制系统可以准确的显示时间,在定时时间到时发出悦耳的铃声提醒同学们按时上下课。关键词:单片机,控制,时间AbstractThisdesignUSESAT89C51isintroducedtimecontrollerdesignmethod.ThetimecontrollerbasedonAT89C51single-chipmicrocomputerasthecore,expandingaXICORX5045consistingofsmallsystems,controlrelayalltheway:youcansetthetimeofday,settherelayopentimeandclosetime,timing,canremovedon'tneedtostarttheemergency:allsetbykeyboardandbuttonswithfunctionsofcombo,eachstatehasalighthint.Ourdesignworkandresttimecontrolareimplementedusingsinglechipmicrocomputer,isintelligentinordertobettercontrolovertime.Timecontrollerincludeshardwareandsoftware.Hardwarepartincludesrelay,storageanddisplayinterfacechip.Softwarepart,mainlyisthemainprogramdesign.Hardwareandsoftwaretogether,debuggingsubroutinefirst,andthenoverlaydebuggingstepbystep,finallysystemdebuggingthrough.Timecontrolsystemcanaccuratelydisplaythetimeintheregulartimewhenamelodiousbellremindstudentsaddingand第2页共42页第1页共42页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第2页共42页droppingclassesontime.第3页共42页第2页共42页编号:时间:2021年x月x日书山有路勤为径,学海无涯苦作舟页码:第3页共42页目录1.系统设计方案与论证……………………………………………………………………32.1设计要求…………………………………………………………………………………32.2系统设计总体方案…………………………………………………………………..….32系统的硬件设计与实现………………..…………………………………………………42.1.1时钟芯片DS12887性能简介……………………………………………………….42.1.2时钟芯片读写时序……………………………………………………………….…62.1.3时间寄存器地址……………………………………………………………………62.1.4特殊控制寄存器功能………………………………………………………………72.2.1液晶SYB12864介绍………………………………………………………………82.2.2液晶与单片机的接口………………………………………………………………82.2.3液晶写操作时序……………………………………………………………………92.3.1红外发送与接收……………………………………………………………………102.3.2遥控码数据分析……………………………………………………………………102.3.3接收电路……………………………………………………………………………112.4.1电源部分电路图……………………………………………………………………113.程序设计…………………………………………………………………………………123.主程序流程图……………………………………………………………………………123.2按键识别……………………………..……………………………………………..…133.3课表计算………………………………………………………………………………133.4遥控解码………………………………………………………………………………144.系统测试与总结………………………………………...