摘要本文设计了一种基于AT89C52单片机的红外窗帘控制器,系统分为两个部分,一是红外遥控器部分,分别设置了启动/停止、打开、关闭、速度减小、速度增加和自动6个按键,当不同的按键被按下时红外发射二极管便发出不同的按键编码。二是接收控制器部分,其功能是用单片机通过一体化红外接收头接收遥控器发出的编码并进行解调,然后根据编码的功能来控制步进电机的运行状态。系统包括手动和自动两种模式,在手动模式下可通过按键来控制窗帘的打开,关闭或停止。在自动模式下可根据室内光线的强度自动控制窗帘的打开或关闭。从而实现手动和自动控制窗帘的目的。关键词:单片机;红外;遥控;窗帘AbstractThisdesignisaninfraredcurtaincontrollerbasedontheSTC89C52singlechipmicrocomputer.Thesystemcanbedividedintotwoparts.ThefirstpartistheIRremotecontrolwhichsetsthe6buttonsofstart/stop,open,close,slowdown,speedupandautomatic.Theinfraredemittingdiodewillsenddifferentcodewhendifferentbuttonispressed.Thesecondpartisthereceivingcontrollerwhichwouldmakeuseofthesinglechipmicrocomputertoreceivethecodesentbytheremotecontrolthroughtheintegratedinfraredreceiverandmakedemodulation.Thenitwouldcontroltherunningsituationofthesteppingmotoraccordingtothefunctionsofthecode.Thesystemincludestwokindsofmodelsmanualandautomatic.Underthemanualmodel,youcanmakethecurtainbeopened,closedorstoppedbypressingthebuttons.Undertheautomaticmodel,openingorclosingthecurtaincanbecontrolledautomaticallyaccordingtotheintensityoftheindoorlight.Inthisway,thecurtaincanbecontrolledmanuallyandautomatically.Keywords:Singlechipmicrocomputer;infrared;remotecontrol;curtain目录第1章绪论...............................................................................................................................11.1遥控窗帘国内外发展现状..........................................................................................11.2遥控窗帘的优势与特点..............................................................................................2第2章单片机的介绍...............................................................................................................42.1单片机简介.................................................................................................................42.2单片机的特点.............................................................................................................42.3单片机的应用.............................................................................................................52.4单片机AT89C52的结构原理.....................................................................................5第3章系统总体设计.............................................................................................................103.1系统硬件电路设计...................................................................................................103.1.1红外发射模块.................................................................................................113.1.2红外接收模块.................................................................................................123.1.3显示模块.........................................................................................................133.1.4光控模块.........................................................................................................153.1.5步进电机驱动模块.........................................................................................163.1.6窗帘...