您好,欢迎来到华佗健康网。
搜索
您的当前位置:首页信号采集与回放系统

信号采集与回放系统

来源:华佗健康网
信号采集与回放系统

技术报告

电信082班 084775240 周霞 (合作者:电信082班 084775228 吴迪)

指导教师:倪海燕

2010-5-27

摘要:本设计通过A/D转换和D/A转换实现输入信号与输出信号的变化。通过实验箱上的模式3的ADC输入正弦波信号,设计按键选择,有3种模式分别是直接回放,单次回放,循环回放和定点回放。

关键字:信号 回放 模式选择

一、 实验要求

1. 实现输入,存储,回放信号

2. 回放模式选择(直接回放,单次波形回放,循环回放,分段存储定点回放等)

二、 总原理图 信号源

三、 系统总体方案设计

根据实验要求,TLC5510A 是采样率最高为20MHz的8位并行高速ADC ,FPGA的PIO48输出信号控制ADC1的输出使能信号OE(低电平有效);PIO15为转换时钟信号CLK;AD转换结果送至PIO16~PIO23,并且同时显示在数码管1和数码管2上。ADC的模拟信号输入端在实验箱的左侧,允许输入0~5V的信号。 转换关系:DATA=255×Ain/5

ADCDinWeOEClkEn模式RAMDoutDAC示波器控制器地址发生器

数据从采集到转换结束需要两个半时钟周期

四、 软件电路的设计

4.1控制器的设计

用VHDL语言编写控制器的程序,要有读写使能和模式选择。用choose[2]的四个状态分别表示直接回放,单次回放,循环回放和定点回放。

程序如下: library ieee;

use ieee.std_logic_11.all; use ieee.std_logic_unsigned.all; entity control is

port ( clk:in std_logic; --时钟 writ:in std_logic; --读写使能 en:in std_logic; --使能 choose:in std_logic_vector(1 downto 0); --模式选择

ch:in std_logic_vector(1 downto 0); --阶段选择 enout:out std_logic; --读写使能输出 adr:out std_logic_vector(9 downto 0) ); --地址 end entity control;

architecture behave of control is

signal count1:std_logic_vector(9 downto 0); signal count11:std_logic_vector(9 downto 0); signal count2:std_logic_vector(9 downto 0); signal count22:std_logic_vector(9 downto 0); begin

process(writ,en,ch,choose) begin

if(en='1')then count1<=\"0000000000\";count11<=\"0000000000\"; count2<=\"0000000000\";count22<=\"0000000000\"; elsif (clk'event and clk='1')then

if(choose=\"01\")then ---- 单次回放

if(writ='0')then enout<='1';adr<=count1;

if(count1=\"1111111111\")then count1<=\"1111111111\"; else count1<=count1+1; end if;

else enout<='0';adr<=count2; if(count2=\"1111111111\")then count2<=\"1111111111\"; else count2<=count2+1; end if; end if;

elsif(choose=\"10\")then ---- 循环回放 if(writ='0')then enout<='1';adr<=count1;

if(count1=\"1111111111\")then count1<=\"1111111111\"; else count1<=count1+1; end if;

else enout<='0';adr<=count2;

if(count2=\"1111111110\")then count2<=\"0000000000\"; else count2<=count2+1; end if; end if;

elsif(choose=\"11\") then ---- 定点回放 if(writ='0')then enout<='1';adr<=count1;

if(count11=\"0011111111\")then count11<=\"0011111111\"; else count11<=count11+1; end if;

if (ch=\"00\")then count1<=\"0000000000\"+count11; elsif(ch=\"01\")then count1<=\"0100000000\"+count11;

elsif(ch=\"10\")then count1<=\"1000000000\"+count11; else count1<=\"1100000000\"+count11; end if;

else

enout<='0';adr<=count2;

if(count22=\"0011111110\")then count22<=\"0000000000\"; else count22<=count22+1; end if;

if (ch=\"00\")then count2<=\"0000000000\"+count22; elsif(ch=\"01\")then count2<=\"0100000000\"+count22;

elsif(ch=\"10\")then count2<=\"1000000000\"+count22; else count2<=\"1100000000\"+count22; end if; end if;

else enout<='0';

end if; end if;

end process; end behave;

4.2输入信号到输出信号的转换

输入信号是8位的,输出信号是10位的。所以回放时把输入信号乘以4即左移两位。

程序如下: library ieee;

use ieee.std_logic_11.all; use ieee.std_logic_arith.all; entity mul is

port ( qin:in std_logic_vector(7 downto 0); qout:out std_logic_vector(9 downto 0) );

end mul;

architecture behave of mul is begin

qout<=qin&\"00\"; end behave;

五、 硬件电路的设计

5.1直接回放

5.2模式选择

5.3输出回路

六、 总结

本设计通过A/D转换和D/A转换实现输入信号与输出信号的变化。通过实验箱上的模式3的ADC输入正弦波信号,设计按键选择,有3种模式分别是直接回放,单次回放,循环回放和定点回放。当进行单次波回放时,很难在示波器上看出波形,只是一瞬间会显示出来,这和频率有关系。

参考文献

[1]数字电路逻辑设计 高等教育出版社 王毓敏2005

[2]模拟电子技术基础 高等教育出版社 华成英 童诗白 2006

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.com 版权所有 湘ICP备2023021991号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务