摘 要:频率是电子技术中最基本的参数之一,和其余电参量的衡量计划及结果有着极其紧密的关系。此中数字频率计在各领域也都有着很广泛的发挥,伴着科技的突飞猛进以及生活质量的提高,数字频率计的需求也将会有所升迁。68360
本次设计主要是基于CPLD来设计的,其频率测量范围为1-9999Hz,且设计的测量误差<5%。目前,直接测频的方法大抵能够分为俩种:测频法和测周期法。测量频率的方法是在确定Tw的时间,改变对被测信号周期Nx记录数,然后测量频率:fx=Nx / Tw。测周期法需有标准信号频率fs,在待测信号的一个周期Tx内,记录标准频率的周期数。然后测量的频率为:fx=fs/Ns 。最后结合系统的软硬件便可以设计出简易的数字式频率计。
毕业论文关键词: CPLD,频率计,计数,仿真波形
Abstract:Frequency electronic technology in the most basic one of the parameters, and other electrical parameters of the measurement program and the results have a very close relationship.Where in the digital frequency meter in all areas also have a very widely used,with the improvement of scientific and technological development as well as quality of life,the demand for digital frequency meter will also be improved.
The design is based CPLD design,the frequency measurement rabge 1-9999Hz,measurement error and the design of<5%.Currently,the direct frequency measurement method can be pided into two kinds:frequency measurement method and test cycle method.Frequency mesurement law within time determined Tw,record changes in the number of cycles of the signal Nx,the measured frequency is:fx=Nx / Tw.The need for a standard method of measuring cycle signal frequency fs,in one cycle of the test signal Tx,recording the number of cycles standard frequency.The measured frequency is:fx=fs / Ns.Finally,system hardware and software will be able to design a simple digital frequency measurement.
Keywords:CPLD Frequency Counter Count Simulation waveform
目 录
1 绪论 4
1.1 课题背景及其意义 4
1.2 数字频率计的发展 4
1.3 数字频率计的相关概念 6
1.4 数字频率计实现的主要方法 6
2 方案的设计 7
2.1 基于单片机的方案 7
2.2 基于CPLD的方案 7
2.3 基于CPLD和单片机的方案 7
2.4 方案的论证与选择 7
2.5 设计总框架 8
3 系统的硬件设计 9
3.1 信号输入电路设计 9
3.2 CPLD模块 10
3.3 单片机模块 11
3.4 键盘档位电路 12
3.5 电源模块 12
4 系统的软件设计 13
4.1 QuartusII概述 13
4.2 CPLD分模块的设计 13
5 系统调试 17
5.1 硬件调试 17
5.2 软件调试 18