中国地质大学长城学院本科课程设计课设名称:单片机原理课程设计课设题目:基于单片机的低频信号发生器设计院别工程技术学院学生姓名楠哥专业电气工程及其自动化学号04314XXXX指导教师XX职称高级工程师2017年05月24日摘要众所周知,数字技术和计算机技术己渗透到了工业、农业、商业、教育、医疗、军事、娱乐等每一个领域及生活中的每一个角落,其应用之深之广令人咋舌!尽管PC机的应用己相当普遍,但是,在工业领域、在日益追求小而精、轻而薄的自动化控制器、自动化仪表、家电产品等方面,PC机仍有所不适宜。在这种情况下,单片机以它优越的控制功能、轻巧的体积,高可靠性和高性价比在智能化仪表系统、工控领域等日益显示出强大的生命力,使传统的电子技术产生了一场巨变,成为计算机发展史上一个新的里程碑。智能仪器的出现,极大地扩充了传统仪器的应用范围。智能仪器凭借其体积小、功能强、功耗低等优势,迅速地在家用电器、科研单位和工业企业中得到了广泛的应用。该函数发生器采用AT89C51单片机作为控制核心,外围采用模拟/数字转换电路(DAC0832)、运放电路(LM324)、按键和LED显示灯电路等。电路采用AT89C51单片机和一片DAC0832数模转换器组成数字式低频信号发生器。函数信号发生器,它具有价格低、性能高和在低频范围内稳定性好、操作方便、体积小、耗电少等特点。由于采用了LM324运算放大器,使其电路更加具有较高的稳定性能,性能比高。此电路清晰,出现故障容易查找错误,操作简单、方便。通过按键控制可产生方波、锯齿波、三角波、正弦波等,同时用LED显示灯指示对应的波形。所产生的波形在一定频率范围可调,波形准确并且平滑。本系统设计简单、性能优良,具有一定的实用性。本设计主要应用AT89C51作为控制核心。硬件电路简单,软件功能完善,控制系统可靠,性价比较高等特点,具有一定的使用和参考价值。关键词:AT89C51;DAC0832;低频信号;运算放大器AbstractAsweallknow,digitaltechnologyandcomputertechnologyhaspenetratedintotheindustry,agriculture,commerce,education,medical,military,entertainment,andeveryareaoflifeineverycorneroftheapplicationofwidedeepstaggering!DespitetheapplicationofPC-hasbeenquitecommon,butintheindustrialfield,inpursuitofasmallbutgrowing,thinandlightautomaticcontroller,automationinstruments,householdelectricalappliancesandsoon,PCstillnotsuitableformachine.Inthiscase,thesingle-chipcontrolofitssuperiorfunctionality,thesizeofcompact,highreliabilityandcost-effectiveinstrumentintheintelligentsystem,thegrowingindustrialareasshowgreatvitalitytothetraditionalelectronictechnologyresultedinachangetobecomethecomputerhistoryofthedevelopmentofanewmilestone.Theemergenceofintelligentmachines,whichgreatlyexpandedthescopeofapplicationoftraditionalinstruments.Intelligentinstrument,withitssmallsize,powerful,low-poweradvantagesofhomeappliancesquickly,researchinstitutesandindustrialenterpriseshasbeenwidelyused.ThefunctiongeneratorusedasacontrolcoresinglechipAT89C51,externalanalog/digitalconvertercircuit(DAC0832),operationalamplifiercircuit(LM324),buttonandLEDindicatorlightsandothercircuits.AT89C51circuitandasingle-chipdigitalDAC0832DigitaltoAnalogcomponentoflow-frequencysignalgenerator.Functionsignalgenerator,ithasalowprice,high-performanceandlow-frequencyrangeofgoodstability,convenientoperation,smallsize,lowpowerconsumptionandsoon.AsaresultoftheLM324operationalamplifiertothecircuitmorestablehighperformance,highperformance.Thiscircuitclear,easytofindfailureerror,simpleandconvenient.Keyscanbegeneratedthroughcontrolofsquarewave,sawtoothwave,trianglewave,sinewaveandsoon,atthesametimewithLEDlightsshowthecorrespondingwaveforminstructions.Waveformgeneratedfrequencyrangeof92.592593Hz~217.3913Hz,accurateandsmoothwaveform.Thesystemisdesignedtobesimple,excellentperformance,withacertaindegreeofpracticality.ThemainapplicationofthisdesignasacontrolcoreAT89C51.Asimplehardwarecircuit,softwarefunctions,thecontrolsystemreliableandcost-effectivefeaturessuchashigh,withacertaindegreeofuseandreferencevalue.Keywords:AT89C51;DAC0832;lowfrequencysignal;operationalamplifier目录1.绪论..............................................................................11.1信号发生器现状.....................................................................11.2单片机在低频信号发生器中的应用.....................................................11.2.1具有优异的性能价格比.............................................................11.2.2控制功能强.......................................................................11.2.3集成度高、体积小、可靠性高.......................................................11.2.4低电压、低功耗...................................................................22.系统设计............................................................................22.1设计目的...........................................................................22.2设计要求...........................................................................22.3系统方案的比较.....................................................................22.3.1选题论证.........................................................................22.3.2方案选择.........................................................................22.4系统设计要求.......................................................................32.5显示模块的设计.....................................................................32.6开关控制电路.......................................................................33.软件仿真............................................................................43.1Proteus仿真图....................................................................43.2不同波形的仿真.....................................................................54.硬件电路的设计......................................................................74.1系统框图...........................................................................74.2.1AT89C51的引脚图实物图............................................................74.2.2主要特性.........................................................................84.2.3管脚说明.........................................................................84.3资源分配...........................................................................94.4各部分电路原理....