路灯控制器的设计摘要:本文描述了路灯控制器的设计,用以实现街道自动化管理。该路灯控制器的设计核心是STC89C52芯片。采用光照强度控制和按键选择时钟控制功能来转换路灯的开关时间。系统内部开灯和关灯的时间以及延时的时间是由定时机器T0和T1来管理控制的。采用光敏电阻自动化管理控制路灯灯的光线强度。将路灯控制模式,以及延时的时间在液晶显示屏上面显示出来。这个系统主要有三个优点,第一个优点是它的成本不昂贵性价比高;第二个优点是他的使用功能非常流畅;第三个优点是他使用起来特别的方便快捷。该路的控制器不仅可以在道路两旁人行道上使用,还可以使用于居民楼道里。便于管理,同时也能够节省更多的能源。关键字:STC89C52芯片;光敏电阻;单片机DesignofStreetLampControllerAbstract:Thispaperdescribesthedesignofstreetlampcontrollerstorealizestreetautomationmanagement.ThedesigncoreofthestreetlightcontrolleristheSTC89C52chip.Thelightintensitycontrolandthebuttonselectionclockcontrolfunctionareusedtochangetheswitchingtimeofthestreetlights.LCD1602isusedtodisplaythecontrolmodeanddelaytimeofthestreetlamp.TheinternaltimersT0andT1areusedtosetthetimeofturningonandofflightsanddelaytimeofthesystem.Usingphotosensitiveresistortorealizeautomaticcontroloflightintensityofstreetlampcontroller.Thesystemiseasytouse,smoothfunction,andlowcost.Itismainlyinstalledonstreetlampsinpublicplacessuchascorridorsandroads,sothatitisconvenienttomanageandcanalsosaveenergy.Keyword:STC89C52chips;Photoelectricresistance;Singlechipmicrocomputer;目录1引言...............................................11.1选题背景.......................................................................11.2研究现状.......................................................................11.3研究的目的和意义.......................................................22任务论证.....................................................................................32.1任务分析.......................................................................32.2方案论证.......................................................................42.2.1系统主控模块方案.....................42.2.2光电转换方案.........................42.2.3显示模块方案.........................53论文设计.....................................................................................53.1系统硬件设计...............................................................53.1.1单片机最小系统.......................53.1.2光敏电阻.............................73.1.3复位电路.............................93.1.4晶振电路.............................93.1.5光控电路............................103.1.6报警电路............................113.1.71602液晶显示.......................123.2软件设计.....................................................................133.2.1主程序流程图........................133.2.2初始化程序..........................143.2.3定时器中断..........................154原理图及实物展示................................................................174.1仿真原理图................................................................174.2PCB原理图.................................................................174.3单片机实物展示........................................................185分析与调试................................................................................205.1调试.............................................................................205.1.1时钟设定和定时开关路灯调试.........205.1.2环境明暗检测测试........