摘要本文介绍了基于单片机的电梯控制系统,硬件部分主要由单片机最小系统模块、电梯内外电路按键模拟检测模块、电梯外请求发光管显示模块、楼层显示数码管模块、电梯上下行模块及模拟传感器模块等 5 部分组成。该系统采用单片机(AT89C52)作为控制核心,内外均使用按键按下与否引起的单片机相应端口电平变化的原理,作为用户请求信息发送到单片机,单片机根据判断的结果最终驱动步进电机做相应的运动,在运动的过程中,单片机依照请求信息通过模拟的传感器使步进电机停止运动,并利用彩灯作为上升和下降的状况显示,七段数码管实时显示当前楼层,完成整个请求和响应的过程。软件部分使用 C 语言实现,利用查询方式来检测用户请求的按键信息。根据电梯运行到相应楼层时,模拟按键引起的电平变化,进行判断和执行实现电梯的控制,并且将程序模块化,方便了修改和调用。硬件设计简单可靠,结合软件,基本实现了六层电梯的模拟运行。关键词:单片机,AT89C52,电梯控制,步进电机I大学毕业设计(论文)ABSTRACTThisarticleintroducestheelevatorcontrolsystembasedonsinglechipmicrocomputer.Thehardwarepartismainlycomposedofthesmallestsystemmoduleofthesinglechipmicrocomputer,theanalogdetectionmoduleoftheinternalandexternalcircuitbuttonsoftheelevator,theexternaldisplayLEDdisplaymodule,thefloordisplaydigitaltubemodule,theelevatorupanddownmoduleandtheanalogsensormodule.5parts.Thesystemusesasingle-chipmicrocomputer(AT89C52)asthecontrolcore.Boththeinsideandtheoutsideusetheprincipleofthecorrespondingportlevelchangeofthesingle-chipmicrocomputercausedbywhetherthebuttonispressedornot.Duringthemovement,thesingle-chipmicrocomputerstopsthesteppermotorthroughthesimulatedsensoraccordingtotherequestinformation,andusesthecoloredlightsastheascentanddescentstatusdisplay.Theseven-segmentdigitaltubedisplaysthecurrentfloorinrealtimetocompletetheentirerequestandresponsetheprocessof.ThesoftwarepartisimplementedinClanguage,andthequerymethodisusedtodetectthekeyinformationrequestedbytheuser.Accordingtothelevelchangescausedbythesimulatedkeyswhentheelevatorrunstothecorrespondingfloor,thejudgmentandexecutionarecarriedouttorealizethecontroloftheelevator,andtheprogramismodula...