毕业设计(论文)题目:基于单片机的智能窗帘控制器的设计系别:信息与控制学院专业:测控技术与仪器学生姓名:闫圣坤指导教师:耿欣2011年6月15日I摘要本文主要阐述了智能窗帘控制器的设计过程。本设计采用AT89C51单片机为控制核心,介绍了基于单片机的光控窗帘系统,主要从硬件结构原理及软件编程方面进行讲解。硬件采用分块的模式,对整个系统的电路设计进行分析,分别给出了系统整体框图、显示电路、光电开关电路、系统主控模块、电源转换电路、保护电路等相关电路;随后讲述了软件的编写过程,也是采用了分块的模式,每一模块都画出了相应的流程图。本文利用P3口的特殊功能与P1口的空闲模式和掉电模式,根据其不同控制模式,实现半自动控制、自动控制、定时控制的相互转换,智能的控制窗帘动作。通过调试,时钟控制、手动开关窗帘、自动开关窗帘等控制方面的设计基本达到了预期效果,具有较强的实用价值。关键词:单片机;智能窗帘;光电开关;步进电机IIAbstractThispaperdescribesthedesignprocessofintelligentcurtaincontroller.ThisdesignusesAT89C51microcontrollerasthecontrol,introducemicrocontroller-basedopticalcontrolcurtainsystem,themainstructuralprincipleofthehardwareandsoftwareprogrammingtoexplain.Blockthemodelofhardwareused,thecircuitdesignoftheentiresystemtoanalyzetheoverallblockdiagramofthesystemaregiven,displaycircuit,photoelectricswitchcircuit,systemcontrolmodule,powerconversioncircuits,protectioncircuitsandotherrelatedcircuit;thendescribesthesoftwarethepreparationprocess,butalsobythesub-blockpattern,witheachmoduletodrawacorrespondingflowchart.Inthispaper,themouthofthespecialfunctionsandP3P1portidlemodeandpower-downmode,accordingtotheirdifferentmodes,toachievesemi-automaticcontrol,automaticcontrol,timingcontroloftheconversionandintelligentmotioncontrolcurtains.Debuggingbysimulation,clockcontrol,manualswitchcurtains,thecurtainsautomaticallyswitchthebasicdesignofsuchcontroltoachievethedesiredeffect,withastrongpracticalvalue.Keywords:SCM;intelligentcurtain;photoelectricswitch;steppingmotorIII目录1绪论..................................................................................................................................11.1研究目的和意义.................................................................................................11.2国内外发展现状.................................................................................................21.3基本内容及章节安排.........................................................................................32总体方案设计......................................................................................................................42.1控制器智能项目.................................................................................................42.2系统总体结构规划.............................................................................................53系统硬件设计......................................................................................................................63.189C51单片机及相关电路.................................................................................63.1.1晶振电路..........................................................................................................63.1.2复位电路..........................................................................................................73.1.3时钟电路..........................................................................................................83.1.4电源电路..........................................................................................................93.2步进电机...........................................................................................................103.3键盘/显示接口电路..........................................................................................123.4传感器...............................................................................................................144系统软件设计....................................................................................................................164.1主程序软件设计...............................................................................................164.2主要功能子程序设计.......................................................................................174.2.1步进电机程序设计........................................................................................174.2.2显示程序........................................................................................................174.2.3键盘程序设计................................................................................................184.2.4定时程序设计................................................................................................195综合调试............................................................................................................................21IV总结......................................................................................................................................23致谢......................................................................................................................................24参考文献..................................................................................................................................25附录A......................................................................................................................................26附录A英文文献..................................................................................................................26附录B中文译文..................................................................................................................36附录C系统设计原