文档介绍:多功能计数器
指导老师:黄根春
队员及年级:伍玉、陈林辉、夏效禹
2006 级
学校及院系:武汉大学电子信息学院
摘要:本系统以单片机和 FPGA 构成的最小系统为控制核心,由宽带放大模块,
比较整形模块,频率、相位差测量模块等模块构成。在 FPGA 内采用等精度测频
法测出频率和周期,可实现对有效值为 ~5V ,频率范围 1Hz~35MHz 信号
的频率、周期的测量。用计数法测出相位差,可实现对有效值 ~5V ,频率
10Hz~100KHz 信号的相位差测量。系统功能由按键控制,可对测量结果实时显
示,人机交互界面友好,达到了较好的性能指标。另外我们系统还具有自动校准
和手动校准的功能。
关键字:
等精度测频法相位测量程控放大
Abstract :This system is built upon the core of 89C55 microcontroller (MCU) and
FPGA, consisting of the following functional blocks:progammable amplifier module,
comparator module, frequence and phase difference testing implement the
equal accuracy frequency-examining technique and it manages to test the frequency
and circle of signal which ranges from 1Hz ~ 35MHz and the amplitude of which
ranges from 5mVrms to manage to detect the phase difference of signal,the
amplitude of which range from to 5Vrms and the frequency of which range
from 10Hz function of the system is controlled by certain designed
keys,while the LCD display shows the system reaches excellent capability
and is friendly interfaced. Our system also has the function of automatic calibration
and manual calibration of frequency.
Keywords:
Equal accuracy frequency-examining method Phase difference testing
Progammable amplifier
1
1 方案设计
理论分析
①频率和周期测量方法分析
采用等精度测频法,其测量原理
时序如图 所示。由待测信号 Fx
和预置门 Gate_p 来控制精确门(同步
门)Gate 。预置门内的第一个 Fx 的上
升沿到来时精确门 Gate 开启,在预
置门结束后的第一个 Fx 的上升沿时
刻,Gate 关闭。在精确门内,分别对
待测信号 Fx 和高频标准脉冲 Fo 计图 测频时序图
数,计数值分别为 NA 和 NB 。被测频率
NA
F = × Fo ,取 Fo = 40 MHz 。
X NB
在实际测量过程中,由于采用了等精度测频法,精确门 Gate 正好是 Fx 的整
数倍,所以对 Fx 的计数值 NA 不存在误差,而对 Fo 的计数值 NB 存在±1的误
差。因此系统的相对误差
NA NA
( ⋅ Fo −⋅ Fo )
∆F 1
X = NB − 1 NB ≈
F NA NB
X ⋅ Fo
NB
1
当T ≈ 1s , Fo = 40 M 时, ∆F ≈×10 −6 Hz ,可以满足题目要求。
X 40
当测量的低频段信号的频率低于预置门频率时,在精确门内就无法计数了。
由于题目最低待测频率为 1Hz, 且门限可以为 1s ,等精度测频法可以满足要求。
②相位测量方法分析
设 IN1 和 IN2 为两路输入信
号经过整形得到的方波信号,
G