您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 电子设计/PCB > 基于cpld的频率测量计
毕业设计(论文)I基于CPLD的频率测量计摘要本文主要论述了利用CPLD进行测频计数,单片机实施控制实现等精度频率计的设计过程。该频率计利用等精度的设计方法,克服了基于传统测频原理的频率计的测量精度随被测信号频率的下降而降低的缺点。等精度的测量方法不但具有较高的测量精度,而且在整个频率区域保持恒定的测试精度。该频率计利用CPLD来实现频率的测量计数。利用单片机完成整个测量电路的测试控制、数据处理和显示输出。本文详细论述了硬件电路的组成和单片机的软件控制流程。其中硬件电路包括键控制模块、显示模块、输入信号整形模块以及单片机和CPLD主控模块。设计器件采用Atmel公司的单片机AT89C51和Altera公司的MAX7000系列EPM7128SLC84-15芯片。键控制模块设置1个开始键和3个时间选择键,键值的读入采用一片74LS165来完成;显示模块用8只74LS164完成LED的串行显示;被测信号经限幅后由两级直接耦合放大器进行放大,再经施密特触发器整形后输入CPLD;标准频率采用40MHz有源晶振动实现;单片机软件用汇编语言编写,软件模块对应于硬件电路的每一个部分,还包括部分数据计算和转换模块。关键词:单片机,CPLD,频率计,测频,等精度毕业设计(论文)IITHEDESIGNOFFREQUENCYMEASUREMENTBASEDONCPLDAbstractThereachpapermainlydiscussesthedesignprocessofequal-accuracyfrequencymeterthatusesCPLDtocountthefrequencymeasurementandfrequencymeterisalsocontroledbysinglechipcomputer.Thefrequencymetermakesuseofequal-accuracydesignthatcanovercomethedisadvantageoftraditionalmeasuringprinciple,whichprecisiondeclinesasmeasuredsignalfrequencydoes.Theequal-accuracymeasurementnotonlyhashighermeasuringprecision,butalsocankeepinvariablemeasuringprecisioninwholeareaoffrequency.ThisfrequencymeterusesCPLDtorealizethemeasuringcountoffrequency.Singlechipcomputercompletesthetestcontrol、dataprocessinganddisplayoutputofthesystem.Thisessaydiscussesthecomposeofhardwarecircuitandsoftwarecontrolflowofsinglechipcomputerindetail.Hardwarecircuitincludeskeycontrolmodule、displaymodule,plasticmoduleofinputsignal、singlechipcomputercontrolmoduleandCPLDmaincontrolmodule.ThefrequencymeteradoptssinglechipcomputerAT89C51ofAtmelcompanyandEPM7128SLC84-15ofAlteracompany.Keycontrolmodulehas1functionkeyand3timeselectionkey.Achip74LS165completesthekeyvalueinput.Displaymoduleuseseight74LS165storealizetheserialdisplayofLED.First,themeasuringsignalamplitudeislimited.Second,thesingleisamplifiedbytwoclassdirectcouplingamplifier.Finally,thesignalinputsCPLDafteritistrimedbySmittertrigger.Standardfrequencyis40MHz.Softwareprogramofsinglechipcomputeriswritedbyassemblylanguage.Someofsoftwareprogramiscorrespondedtoeveryhardwarepart,theothersincluddatacountandtransform.KeyWords:SCM;CPLD,Frequencymeter,Frequencymeasurement,Equal-precision毕业设计(论文)III目录第一章引言.............................................................................................................................1第二章测量原理及其设计内容.............................................................................................22.1测量原理...................................................................................................................22.2频率计的设计内容和意义.......................................................................................3第三章硬件电路设计.............................................................................................................63.1系统组成...................................................................................................................63.2测频模块的工作原理及设计...................................................................................73.2.1CPLD的结构与功能介绍............................................................................73.2.2CPLD测频模块的逻辑设计........................................................................83.3键控制模块.............................................................................................................103.4显示模块.................................................................................................................113.5电源模块.................................................................................................................123.6输入信号整形模块.................................................................................................133.7单片机主控模块.....................................................................................................143.7.1AT89C51单片机性能.................................................................................143.7.2单片机控制电路..........................................................................................163.8其它电路.................................................................................................................18第四章软件设计...................................................................................................................194.1QuartusII概述........................................................................................................194.2QuartusII使用VHDL实现系统功能的全过程..................................................204.2.1电子系统的设计方法..................................................................................204.2.2“自顶向下”与“自底向上”的设计方法..............................................214.2.3VHDL语言简介..........................................................................................224.2.4频率计的VHDL设计.................................................................................224.3CPLD模块仿真......................................................................................................254.4单片机的汇编语言编程.........................................................................................264.4.1单片机主程序..........................................................................
本文标题:基于cpld的频率测量计
链接地址:https://www.777doc.com/doc-50989 .html