等精度频率计.docx

上传人:b****2 文档编号:17964069 上传时间:2023-08-05 格式:DOCX 页数:10 大小:450.57KB
下载 相关 举报
等精度频率计.docx_第1页
第1页 / 共10页
等精度频率计.docx_第2页
第2页 / 共10页
等精度频率计.docx_第3页
第3页 / 共10页
等精度频率计.docx_第4页
第4页 / 共10页
等精度频率计.docx_第5页
第5页 / 共10页
等精度频率计.docx_第6页
第6页 / 共10页
等精度频率计.docx_第7页
第7页 / 共10页
等精度频率计.docx_第8页
第8页 / 共10页
等精度频率计.docx_第9页
第9页 / 共10页
等精度频率计.docx_第10页
第10页 / 共10页
亲,该文档总共10页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

等精度频率计.docx

《等精度频率计.docx》由会员分享,可在线阅读,更多相关《等精度频率计.docx(10页珍藏版)》请在冰点文库上搜索。

等精度频率计.docx

等精度频率计

2013-2014学年第2学期

数字系统设计实践

(课号:

103D47A)

实验报告

实验名称:

等精度频率计

学院

信息科学与工程学院

班级

电气自动化2班

组别

A20

成员

罗静娜

陈壮豪

姓名

陈壮豪

学号

136450031

指导教师

李宏

完成时间

2015年6月8日星期四

 

一、实验任务与要求

1.1测量信号:

方波;

1.2幅值:

TTL电平;

1.3频率:

100HZ~10MHZ;

1.4测量误差小于0.1%;

1.5闸门信号:

~0.1s;响应时间:

~1s

二、实验设计

2.1电路模型:

2.2等精度频率计设计原理

1.频率计算:

2.测量误差计算:

考虑No最大误差为:

1,则

与被测频率无关,故也称:

等精度频率测量方法

2.2等精度频率计设计思路及其参数选择:

系统时钟频率选择50khz;测量频率范围为100HZ至10MHZ;闸门信号约为0.1s,最长响应时间约为1s,测量误差为1/(500000)<0.1%。

满足设计要求。

输出频率的整数部分和小数显示通过按钮来切换。

其中最大时为8位整数,3位小数。

3.1闸门信号产生模块:

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_arith.all;

useieee.std_logic_unsigned.all;

entityKeyis

port(cp:

instd_logic;

output:

outstd_logic);

endKey;

architecturedataofKeyis

signaliq:

unsigned(12downto0);

signaliq1:

std_logic;

begin

process(cp,iq,iq1)

begin

if(cp'eventandcp='1')then

if(iq=4999)then

iq1<=notiq1;

iq<=('0','0','0','0','0','0','0','0','0','0','0','0','0');

else

iq<=iq+1;

endif;

endif;

output<=iq1;

endprocess;

enddata;

3.2寄存器模块:

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entitysaveis

port(

clk:

instd_logic;

intt:

instd_logic_vector(19downto0);

outt:

outstd_logic_vector(19downto0));

endsave;

architectureaofsaveis

signaltemp:

std_logic_vector(19downto0);

begin

process(clk,intt)

begin

if(clk'eventandclk='1')then

temp<=intt;

endif;

outt<=temp;

endprocess;

enda;

3.3频率显示切换模块:

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_arith.all;

useieee.std_logic_unsigned.all;

entitySeleteis

port(input1:

instd_logic_vector(3downto0);

input2:

instd_logic_vector(3downto0);

input3:

instd_logic_vector(3downto0);

input4:

instd_logic_vector(3downto0);

input5:

instd_logic_vector(3downto0);

input6:

instd_logic_vector(3downto0);

input7:

instd_logic_vector(3downto0);

input8:

instd_logic_vector(3downto0);

input9:

instd_logic_vector(3downto0);

input10:

instd_logic_vector(3downto0);

input11:

instd_logic_vector(3downto0);

selete:

instd_logic;

date:

outstd_logic_vector(31downto0)

);

endSelete;

architecturedataofSeleteis

signaliq1:

std_logic_vector(31downto0);

signaliq2:

std_logic_vector(31downto0);

begin

process(input1,input2,input3,input4,input5,input6,input7,input8,input9,input10,input11)

begin

iq1<=input11(3downto0)&input10(3downto0)&input9(3downto0)&input8(3downto0)&input7(3downto0)&input6(3downto0)&input5(3downto0)&input4(3downto0);

iq2<="00000000000000000000"&input3(3downto0)&input2(3downto0)&input1(3downto0);

caseseleteis

when'0'=>date<=iq1;

when'1'=>date<=iq2;

endcase;

endprocess;

enddata;

3.4频率的计算:

利用公式:

把求出的fx扩大1000倍,即把小数点后三位放入整数部分。

3.5频率显示前的数据处理模块:

将频率的各个位上的数字分出来,用过选择模块选择输出位

3.6等精度频率计核心原理模块

通过D触发器,对输出的闸门信号进行同步,在同步后的闸门信号下给两个频率分别计数,得到对应的计数值用于计算频率并显示。

3.6顶层电路图:

3.7管脚分配图:

四、实验结果

4.1数据记录:

函数信号发生器:

数码管显示数据:

误差(%):

100.000

100.000

0.00%

335.000

334.975

0.01%

654.500

654.500

0.00%

1000.000

1000.000

0.00%

3250.660

3250.401

0.01%

6555.500

6555.066

0.01%

10000.000

10000.000

0.00%

45550.000

45550.109

0.00%

76666.000

76664.035

0.00%

100000.000

100000.000

0.00%

366500.000

366500.000

0.00%

777778.000

777780.000

0.00%

1000000.000

999680.000

0.03%

5000000.000

4999680.000

0.01%

8889000.000

8889020.000

0.00%

9990000.000

9990020.000

0.00%

4.2实验结果分析:

1.本实验通过对理论的分析,调用各种模块的计算,从理论到应用,使我们充分了解了从理论到实践,其中产生的误差,以及对精度控制和对等精度频率计原理的进一步了解。

2.实验数据的分析:

通过实验,得到上表数据,经验证,均符合要求。

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 总结汇报 > 实习总结

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2