资源描述:
《基于单片机的交通灯控制系统设计》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、本科毕业设计基于单片机的交通灯控制系统设计摘要随着社会经济的发展,交通在人们的日常生活中占有重要的地位,城市交通问题越来越引起人们的关注。人、车、路三者关系的协调,已成为交通管理部门需要解决的重要问题之一。所以,如何采用合适的控制方法,最大限度利用好耗费巨资修建的城市高速道路,缓解主干道与匝道、城区同周边地区的交通拥堵状况,越来越成为交通运输管理和城市规划部门亟待解决的主要问题。本设计采用MSC-51系列单片机STC89C52为中心器件来设计交通灯控制器,利用发光二极管和数码管实现了设置红、绿灯亮灭时间的功能,红绿灯循环点亮,绿灯
2、倒计时结束为5秒的黄灯闪烁警示,利用按键使得系统具有倒计时,时间设置,紧急情况处理,根据具体情况手动控制和车辆违规检测等功能。软件上采用KEILC编程,主要编写了主程序,数码管显示程序,中断程序,延时程序等。经过PROTUES调试,实现了对十字路口交通灯的模拟。经过对整个设计系统的测试,本系统倒计时每60秒显示误差为0.5秒以内,交通状态信号灯交替显示正常。按下相应的功能按键,都能正常运行,执行相应的操作。车辆违规检测当有车辆闯红灯会有1个违规信号输出。本系统能够在不停的运行1个小时以上,稳定性够强。总的来说,本系统能够很好地实现
3、本次设计要求的功能,还拥有增减倒计时时间、南北通行、东西通行和紧急模式等5个功能,而且精确度够高、操作简单、稳定性较强。关键词:交通灯单片机车辆违规检测模拟TrafficLightControlSystemBasedonSingleChipDesignChenWenxing(CollegeofEngineering,SouthChinaAgriculturalUniversity,Guangzhou,China)Abstract:Withthedevelopmentofsocialeconomy,thetransportation
4、isveryimportantinPeople'sDailylife,theurbantransportationproblemmoreandmorearousedpeople'sconcern.People,cars,theroadthreerelationscoordination,hasbecomeatrafficmanagementdepartmentneedstosolveoneoftheimportantissues.So,howtoadoptthesuitablecontrolmethod,makethebestus
5、eofcostlytobuildurbanfreeway,relievethemainroadandon-ramp,urbantrafficcongestionandsurroundingareas,increasinglybecomethetraffictransportationmanagementmajorproblemstobesolvedandtheurbanplanningdepartment.ThissystemadoptstheMSC-51seriesmicrocontrollerSTC89C52devicefor
6、thecentertodesignthetrafficlightcontroller,usingdigitaltubeLEDandasetofredandgreenlightwillconsumetimefunction,trafficlightcyclelight,greenlightfor5secondsoftheendofthecountdownyellowlightsFlashingwarning,usingthebuttonmakesthesystemhasacountdown,timeSettings,emergenc
7、yprocessing,manualcontrolandvehicleviolationdetectionbasedonthespecificsituation,andotherfunctions.InthelightoftheKEILCsoftwareprogramming,mainlytowritethemainprogram,LEDdigitaltubedisplayprogram,interruptprogramdelayprocedures,etc.AfterPROTUESdebugging,hasrealizedthe
8、simulationoftrafficlightsatanintersection.Aftertestingonthedesignofthewholesystem,thissystemthecountdowndisplayerroris0.5sec