LED灯智能控制系统的设计和实现摘要该LED灯智能控制系统采用STC89C52RC单片机为核心,利用单片机的端口分别控制数码管和DS1302实时时钟系统、ADC0832,DAC0832智能操控照明系统。我们常见的路灯、过道灯、草坪灯、广告箱灯、霓虹灯和厕所等公共场所用的一些照明灯往往彻夜通明,这不仅浪费能源,在某种程度上也造成了光污染。在今天电力能源供应比较紧张的情况下,在没有人员活动的深夜让这些灯自动关掉,不仅可以节约能源,也能够节约一些开支。本文主要介绍系统的开发背景,意义,并重点介绍了硬件设计和软件设计的过程。在硬件方面,从元件,模块,系统逐级阐述,特别是系统的核心部分STC89C52RC,并用ALTIUMDESIGNER软件对原理图和电路板的制作。软件方面,用现阶段比较流行的单片机C语言编程,利用定时器中断控制标准时钟。其中介绍了单片机仿真软件KEILC51的使用。关键词:STC89C52RC光敏电阻pwmAbstractIIThisnightflaresystemisansystembasedontheSTC89C52RCmonolithicintegratedcircuit,itmakesuseoftheportofmonolithicintegratedtocontroltheLEDstandardclocksystem,thesilicon-controlledrectifierandtheelectricbellseparatelyandthenthelightingsystemwascontrolledbyintelligence.Somecommonstreetswhichareinpublicplaces,suchas:theaislewaylight,thelawnlamp,theadvertisementboxlamp,theneonlightandtherestroomandsoonthepublicplaceusessomeflaresoftenallnightarebrightlylit,thisisnotonlywastingofenergy,butalsomaketheraypollutioninsomekindofprocedure.Nowaday,theelectricpowerenergyisinshortsupply,soifweturnoffsomewhenthereisnopeople,itisnotexpenses.Inthisarticle,itintroducesthesystematicdevelopmentbackground,thesignificanceandespeciallytheprocessofthehardwaredesignandthesoftwaredesign.Inthehardwareaspect,thisarticleelaboratesthepart,themodule,thesystemonebyone,especiallythecoreofthesystemSTC89C52RC,andusestheALTIUMDESIGNER.Softwaretotheschematicdiagramandtheelectriccircuitboardmanufacture.InthesoftwareaspectwiththepresentstagequitepopularmonolithicintegratedcircuitClanguageprogramming,usesthetimerinterruptcontrolstandardclock.Finallyitwasthesoftwareandhardwaredebugging,inwhichintroducedtheinstatonsofthestationsofmonolithicintegratedcircuitsimulationsoftwareKEILC51use.Keyword:silicon-controlledrectifierSTC89C52RCpwm目录摘要........................................................................................................................................IABSTRACT..............................................................................................................................I第一章绪论..............................................................................................................................11.1课题研究的背景.....................................................11.2开发的意义........................................................11.3课题研究的方案....................................................1第二章芯片选用说明..............................................................................................................22.1STC89C52RC......................................................................................................................22.1.1相关芯片及其引脚分析.........................................................................................22.2ADC0832..........................................................62.3DAC0832.............................................错误!未定义书签。2.4LED数码管.........................................................92.4.2LED数码管编码方式..........................................................................................102.4.3LED数码管显示方式和典型应用电路..............................................................112.5DS1302数字时钟芯片..............................................122.5.1DS1302的控制字节..............................................................................................132.5.2数据输入输出(I/O).............................................................................................132.5.3DS1302与CPU的连接..........................................................................................142.6光敏电阻..........................................................14第三章方案论证及部分电路分析.........................................163.1.1方案论证和比较..................................................163.2单片机的最小应用系统..............................................163.2.1单片机的时钟电路...............................................................................................173.2.2复位电路和复位状态...........................................................................................183.2.3总线结构..................................................................................错误!未定义书签。3.3标准时钟显示部分设计:...........................................203.4光敏接收电路.....................................................203.6接键可调部分.......................................错误!未定义书签。3.7系统照明.........................................................20第四章系统的软件设计......................................................................................................23总结..........................................................................................................................................25致谢......................................................................................................................................25参考文献:.................................................................................................................................35附录一:原理图......................................................................................................................20附录三:程序清单..............................................