I摘要进入90年代,电子技术取得了巨大的进步,电子元器件的体积变得很小,重量减轻,电能的消耗进一步降低。由于微处理器功能的增强,计算速度提高了几倍,价格也变得非常便宜,特别是可靠性得到了极大的提高,为用电子技术改造传统的汽车创造了条件。汽车在驾驶时有左转弯、右转弯刹车合紧开关停靠等基本操作。传统的手动控制系统存在一个致命漏洞:车灯完成上述动作后司机还需要进行复位操作才能使其恢复到初始状态。通常情况下,司机很容易忘记关闭转向灯,这就成为发生交通事故的一大隐患。为解决此问题,运用车灯智能控制系统对汽车转向灯进行控制,取到很好的效果。完成此功能可以有三种设计方案:第一种是利用数字逻辑电路来实现,但这种方案所需硬件设备较多、造价高、电路复杂、难以维护;第二种方案是利用模拟电路来实现,此种方案虽然电路不是很复杂,硬件要求也不是很高,但它利用的是开关的机械传动理论,很容易引起机械误差,也很难维护;第三种是利用单片微机,通过软件控制来完成的装置,利用单片微型计算机来控制汽车前灯和尾灯的点亮和闪烁,能让汽车的前灯和尾灯根据需要自动点亮和熄灭。实践表明,该系统不仅从根本上解决了传统的手动控制汽车尾灯的诟病,完成了汽车转向灯的自动化控制,而且电路简单,对硬件设备的要求不是很高,且造价低,便于维护。关键词:单片机,转向灯,程序,自动控制IIAbstractEnteringthe1990s,havingmadeenormousprogressinelectronictechnology,thevolumeoftheelectronicdevicesandcomponentsbecameverysmall,weightlightens,theconsumptionoftheelectricenergyisreducedfurther.Becauseoftheenhancementofthefunctionofthemicroprocessor,thecomputationalspeedhasraisedseveraltimes,thepricebecomesverycheaptoo,especiallydependabilityhasgotgreatimprovement,fortransformingthetraditionalautomobileandcreatingtheconditionwithelectronictechnology.Theautomobilehasleftthatturns,turnsandbrakestoshutthetightswitchtostopetc.andoperatebasicallyinrightwhiledriving.Thetraditionalmanualcontrolsystemhasadeadlyloophole:Thedriverneedstoberestoredtothethroneandoperatedenablingit’sresumingtheinitialstateafterthecarlightfinishesabove-mentionedmovements.Generally,thedriverisveryapttoforgettoclosethesteeringlight,thisbecomesagreathiddendangerofthetrafficaccident.Inordertosolvethisproblem,usetheintelligentcontrolsystemofthecarlighttocontrolthesteeringlightoftheautomobile,fetchtoverygoodresult.Therecanbethreekindsofdesignplansinthisfunctiontofinish:Thefirstkindmakesuseofdigitallogicalcircuittorealize,butthiskindofschemenecessaryhardwareequipmentismore,thefabricationcostishigh,thecircuitiscomplicated,difficulttomaintain;Thesecondkindofschemeistomakeuseofsimulationcircuittoberealized,thoughthecircuitisnotverycomplicatedforthiskindofscheme,thehardwarerequiresitisnotveryhigh,butwhatitutilizedisthemechanicaldrivetheoryoftheswitch,itisveryapttocausethemechanicalerror,verydifficulttosafeguard;Thethirdkindutilizesthesinglesliceofcomputers,controlthedevicefinishedthroughthesoftware,makeuseofsinglesliceofmicrocomputerstocontrolthelightingandglimmeringofautomobileheadlightandtaillight,maketheheadlightandtaillightoftheautomobilelightandgooutautomaticallyaccordingtotheneed.Practiceindicates,shouldnotmerelysolvetraditionalcontrollingthecondemningoftheautomobiletaillightsystematicallymanuallyfundamentally,theautomationoffinishingthesteeringlightoftheautomobileiscontrolled,andthecircuitissimple,therequisitionforhardwareequipmentisnotveryhigh,andthefabricationcostislow,easytosafeguard.Keyword:MCU,Steeringlight,program,automaticalliescontrol目录摘要................................................................................................................................IAbstract.........................................................................................................................II1绪言1.1选题背景................................................................................................................11.2课题研究的目的....................................................................................................11.3国内外概况............................................................................................................11.4课题研究的主要工作............................................................................................82系统设计方案的研究2.1设计任务...............................................................................................................92.2系统实现方案分析...............................................................................................93总体设计3.1具体电路设计.....................................................................................................123.1.1芯片简介.........................................................................................................123.1.2MCS-51系列单片机的指令系统....................................................................153.1.3汇编语言简介..................................................................................................163.1.4单元电路设计.................................................................................................173.2应用软件设计.....................................................................................................183.3系统试运行.........................................................................................................184数据计算及仿真4.1闪烁信号的产生..................................................................................................204.2仿真及结果分析.................................................................................................20总结与展望.................................................................................................................22致谢.............................................................................................................................23参考文献..........................................................................