摘要: View Code clear all;%MATLAB生成1/4周期正弦波波形数据width=1; %宽度是depth=1024; %深度是1024% deltax=2*pi/1024;% for i=1:1024% x(i)=(i-1)*deltax;% y(i)=cos(x(i))*511.5+511.5;% % yy(i)=sin(x(i))*1023.5+1023.5;% end% z=round(y);% ============== a = '0'; c='1'; b= [a c]; for m =1:511; b = [b '0' 阅读全文
posted @ 2013-04-09 10:12 星林星 阅读(143) 评论(0) 推荐(0)
摘要: 数字频率合成器,用做调制和解调时候的上下变频。选择存储四分之一周期的波形数据,.mif的生成文件如下:clc;clear all;%MATLAB生成1/4周期正弦波波形数据width=10; %宽度是depth=128; %深度是1024deltax=2*pi/512;for i=1:128 x(i)=(i-1)*deltax;% y(i)=cos(x(i))*255; yy(i)=sin(x(i))*255;end% z=round(y);z=round(yy);axis([0,depth-1,0,2^width-1]);%======================... 阅读全文
posted @ 2013-03-12 16:08 星林星 阅读(191) 评论(0) 推荐(0)
摘要: DA900Ulibrary IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;entity dac is port( clk,rst : in std_logic; clkout : out std_logic; ledout : out std_logic; data : out std_logic_vector(9 downto 0) ); end da... 阅读全文
posted @ 2013-03-08 17:07 星林星 阅读(270) 评论(0) 推荐(0)