{$cfg_webname}
主页 > 电子信息 > 电子 >

等精度数字频率计设计

来源:56doc.com  资料编号:5D26868 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9A5D26868
资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用. 帮助
资料介绍

等精度数字频率计设计(论文14500字)
摘要:数字频率计在电子测量中应用十分广泛。常见的测频方法有测周法和直接测频法。测周法是利用被测信号为闸门,对标准信号进行计数,然后根据闸门时间和计数值换算被测信号的频率。直接测频法是利用标准信号产生闸门,在闸门时间内对被测信号进行计数。由于闸门信号和被测信号不严格同步,测周法适合于低频信号,直接测频法适合于高频信号。针对两种方法受被测信号频率影响较大的问题,本文采用等精度法设计数字频率计。以STM32F407VET6单片机和CPLD为核心,设计放大和高速比较电路构成调理电路,将正弦波信号转换为矩形方波送CPLD处理。利用CPLD采用VHDL编程设计1S的预置闸门电路、32位计数器等。保证了实际闸门电路和被测信号严格同步,实现了宽频范围内的同等精度。CPLD将计数值送STM32单片机处理,根据闸门时间换算频率值。系统采用LCD和蓝牙无线发送到终端两种显示方式。测试表明,系统实现了电压幅度为50mV~1V、频率范围为1HZ~10MHZ的正弦波或1HZ~5MHZ的矩形波的频率测量,相对误差绝对值小于10-4。且矩形波的占空比测量范围为10%~90%。
关键词:CPLD;STM32F407VET6;单片机;等精度数字频率计。

The Design of Equal Precision Digital Cymometer
Abstract:Digital frequency meter is widely used in electronic measurement. Common frequency measurement methods are measured by the method of frequency measurement and direct frequency measurement. The test method is to use the measured signal as the gate, to count the standard signal, and then according to the gate time and the value of the measured signal frequency. The direct frequency measurement method is used to generate the gate, which is used to count the measured signal in the gate time. Because the gate signal and the measured signal are not strictly synchronous, the measurement method is suitable for low frequency signal, and the direct frequency measurement method is suitable for high frequency signal. Aiming at the problem that the two methods are influenced by the frequency of the measured signal, the digital frequency meter is designed by the method of equal precision. With STM32F407VET6 MCU and CPLD as the core, the design of amplification and high speed comparison circuit constitute the conditioning circuit, the sine wave signal is converted to rectangular square wave to send CPLD processing. Using VHDL using CPLD programming design 1S preset gate circuit, 32 counters, etc.. In order to ensure the strict synchronization of the actual gate circuit and the measured signal, the same accuracy is achieved in a wide frequency range. CPLD will be sent to the STM32 microcontroller processing, according to the gate time conversion frequency value. The system uses LCD and Bluetooth wireless transmission to the terminal two kinds of display mode. Test shows that the system realized the voltage amplitude of 50mV~1V, frequency range of 1HZ~10MHZ sine wave or 1HZ~5MHZ of the rectangular wave frequency measurement, the relative error is less than 10-4. And the measurement range of the duty ratio of the rectangular wave is 10%~90%.
Keywords:CPLD;STM32F407VET6;single-chip;equal precisiondigital cymometer.
 

等精度数字频率计设计
等精度数字频率计设计


目 录
1  绪  论    6
1.1 研究背景及意义    6
1.2 国内外研究现状    6
2  系统方案设计    7
2.1 系统设计的任务与要求    7
2.2 系统方案比较与选择    7
2.3 系统电路总体框图及工作原理    8
3  系统硬件电路设计    9
3.1 STM32F407VET6单片机模块    9
3.1.1 复位电路设计    10
3.1.2 晶振电路设计    11
3.2 CPLD模块    11
3.2.1 测量原理及误差分析    12
3.2.2 测信号频率和占空比的实现方式    13
3.3 系统电源模块    14
3.4 比较器电路    15
3.5 低功耗蓝牙模块    15
3.6 液晶显示模块    16
3.7 系统存储模块    19
3.8 系统电路原理图    19
4  系统PCB板绘制及软件设计    20
4.1 电路PCB板绘制    20
4.2 CPLD程序设计    22
4.2.1 标准计数器程序    22
4.2.2 待测信号计数器程序    22
4.3 单片机程序设计    23
4.3.1 函数主程序部分    23
4.3.2 数字频率计接口与宏定义部分    24
4.3.3 具体函数实现部分    25
4.4 手机软件程序设计    26
4.5 LCD显示模块    26
5  焊接、调试与结果分析    27
5.1 焊接    27
5.2 检测    27
5.3 调试    28
5.3.1 输入信号调试    28
5.3.2 放大电路调试    28
5.3.3 CPLD调试    28
5.3.4 蓝牙模块调试    28
5.3.5 系统整体调试    29
5.4 实验结果统计与讨论    32
6  总结    32
参考文献    33
致谢    34
附录    35
 

推荐资料