毕业设计课题名称基于单片机的步进电机控制设计I摘要本论文主要介绍了基于单片机的步进电机控制的规则、硬件结构、软件代码的编写及工作原理、以及液晶模块12864LCD的详细介绍以及指令集。模拟出单片机系统下的步进电机转速控制,具有任意转速选择、转动时间、正反转、加速和减速设置、系统低功耗、可实现在线调试等特点。本系统是以单片机为其控制核心,以有源晶振构成的电路作为时钟信号,通过键盘输入选择向单片机控制系统发出步进转动控制命令,控制系统接收命令后做出一系列必要的判断后,控电机的转速、转向等。本设计已通过了实验仿真,运行稳定,达到了基本的设计要求。本设计要分为两大块:一块为硬件电路组成部分,一块为软件程序设计部分。在硬件电路里主要包括有源晶振部分、键盘输入控制部分、电机驱动电路及液晶显示部分等与单片机的接线设计;软件编程方面主要是子程序和主程序的编写,包括:初始化代码、液晶驱动代码、时间记录代码、表格数据代码等。关键词:单片机;步进电机;12864LCD;指令集IIAbstractThisthesisismainlyintroducethePreparedandworkingprinciplesaboutregulation、structureofhardware、softwarecodeofsteppingmotorcontrolbasedonMCUaswellasdetailinformationandinstructionsetonLCDModule12864LCD.Thisthesisalsosimulatesthatunderthesystemofsingle-chipsteppingmotorspeedcontrolhasthedisadvantagesofchangingspeed、timearbitrary、Positiveandnegativetransfer、installationofacceleratedanddeceleration、low-powersystemandonlinedebugging.Single-chipascoreofcontrolandthecircuitmadeupbyactivecrystalasclocksignal,thesteppermotorspeedcontrolsystemstartstomakingaseriesofnecessaryjudgmentandthencontrolrotatespeedandchangedirectionwhenitreceivethecommandofsteppertransfercontrolfromsingle-chipcontrolsystembykeyboard.Asrunsteady,thisprojecthasalreadypassedthesimulationandhasachievedthebasicpurpose.Thisprojectconsistsoftwoparties.Oneishardwarecircuitandtheotherissoftwareprogramming.Inthepartofhardwarecircuitisincludeactivecrystal、controlsystemofkeyboardinput、systemofmotordrivecircuitandliquidcrystalsystem.Inthesecondpart,Designofconnectionofsingle-chip、softwarepreparedisthemainlypreparedofSubroutineandMainprogramincludinginitializationcode、liquiddrivecode、thetimingofrecordingcodeformdatacode[8].Keywords:MCU;steppermotor;12864LCD;InstructionSet.III目录摘要.......................................................................................................................................................IAbstract.................................................................................................................................................II第1章绪论......................................................................................................................................11.1课题的来源......................................................................................................................11.2课题研究的意义............................................................................................................11.3课题国内研究现状......................................................................................................11.4课题研究的目的和主要内容.................................................................................2第2章步进电机方案设计与分析......................................................................................32.1方案提出............................................................................................................................32.2可行性分析...