沈阳理工大学学士学位论文摘要近年来,电机调速系统在工业自动化、生产过程控制、测控仪表等领域的应用越来越深入和广泛。ATmega16是基于增强的AVRRISC结构的低功耗8位CMOS微控制器。由于其先进的指令集以及单时钟周期指令执行时间,ATmega16的数据吞吐率高达1MIPS/MHz,从而可以减缓系统在功耗和处理速度之间的矛盾。主要由ATmega16为核心设计由LMD18200驱动芯片,采用232通讯协议的串行通信控制电路构成的直流电机PWM调速控制系统。系统主要完成由上位机和ATmega16控制直流电机的起动,停止和加减速等功能。文章详细介绍了本调速控制系统的工作原理、PWM驱动接口电路和K1010光电耦合器,LMD18200驱动电路,串行通信控制电路相应的软件设计。软件通过ICCAVR编写,然后用AVRStudio进行仿真并将编译通过的程序代码下载到ATmega16之中对系统进行控制。关键词:ATmega16;直流电机;PWM;LMD18200I沈阳理工大学学士学位论文AbstractInrecentyears,theSCMapplicationwhichusedinthefieldofindustrialautomation,productionprocessbecomesmoreandmoredeepenandextensive.ATmega16isamicrocontrollerbuilduponAVRRISCconfigurationwhichisalowconsumemicrocontrollerof8-bitCMOS.ThedataofATmega16haveahighdispatcherwhichcanreach1MIPS/MHzforadvancedinstructionvolumandtheinstructionofsingleclockcycle,soitcanrelaxedtheconflictbetweenconsumeanddisposespeed.ThisdesignshowusthataPWMspeedsystemofDC-motorusingATmega16isintroducedinthispaper.Thispaperelaboratesonthesystemprinciple,opticalEncoder,LMD18200drivingsystem,HighReliabilityPhotoCouplerK1010,theDC-motorPWMdigitalcontrolsystem,andsystemserialcommunicationagreementof232communication.Thesystemismainlycompletedthestart,stopandaccelerationanddecelerationnfunctionsbywhichthemasterPCandATmega16controltheDCmotor.Thearticledescribedindetailthespeedcontrolsystem'sworkingprinciple,thePWMdriveinterfacecircuitandK1010Optocoupler,LMD18200drivecircuit,therelativesoftwaredesignoftheserialcommunicationcontrolcircuit.ThesoftwareisprogrammedthroughICCAVR,thensimulatedbyAVRStudioandthecompiledcodeisdownloadedtoATmega16tocontrolthesystem.Keywords:ATmega16;DC-motor;PWM;LMD18200目录1绪论.........................................................................................................................................11.1课题的背景及意义......................................................................................................11.2直流电机的发展..........................................................................................................21.3本设计完成的工作......................................................................................................22AVR单片机简介....................................................................................................................32.1单片机系统概述..........................................................................................................32.2ATmega16功能概述...................................................................................................32.3ATmega16单片机.......................................................................................................52.3.1ATmega16单片机的特点及特性....................................................................52.3.2ATmega16单片机引脚配置及说明................................................................82.3.3CPU...................................................................................................................92.3.4存储器..................................................