译码器 entity decoder3_8 is port(a:in std_logic_vector(2 downto 0); qc:out std_logic_vector(3 downto 0)); end decoder3_8; architecture rtl of decoder3_8 is begin process(a) ... 译码器
entity decoder3_8 is
port(a:in std_logic_vector(2 downto 0);
qc:out std_logic_vector(3 downto 0));
end decoder3_8;
architecture rtl of decoder3_8 is
begin
process(a)
begin
case a is
when"000"=>qc<="0000";
when"001"=>qc<="0001";
when"010"=>qc<="0010";
when"011"=>qc<="0011";
when others =>qc<="1111";
end case;
end process;
end rtl;
模块 CH
entity ch is
port(sel:in std_logic_vector(2 downto 0);
a3,a2,a1,a0,dang:in std_logic_vector(3 downto 0);
q:out std_logic_vector(3 downto 0));
end ch;
architecture ch_arc of ch is
begin
process(sel)
begin
case sel is
when"000"=>q<=a0;
when"001"=>q<=a1;
when"010"=>q<=a2;
when"011"=>q<=a3;
when"111"=>q<=dang;
when others=>q<="1111";
end case;
end process;
end ch_arc;
选择模块
entity sel is
port(clk:in std_logic;
sl:out std_logic_vector(2 downto 0));
end sel;
architecture sel_arc of sel is
begin
process(clk)
variable cnt:std_logic_vector(2 downto 0);
begin
if clk'event and clk='1' then
cnt:=cnt+1;
end if;
sl<=cnt;
end process;
end sel_arc;
顶层文件:
ENTITY hql IS
PORT(clr,sig,clk:IN STD_LOGIC;
alm:OUT STD_LOGIC;
q:OUT STD_LOGIC_VECTOR(6 DOWNTO 0);
qc :OUT STD_LOGIC_VECTOR(3 DOWNTO 0);
END hql;
ARCHITECTURE sd OF hql IS
COMPONENT fen
port(clk:in std_logic;
q:out std_logic);
end COMPONENT;
COMPONENT selx
port(clk:in std_logic;
sl:out std_logic_vector(2 downto 0));
end COMPONENT;
COMPONENT corna
port(clr,sig,door:in std_logic;
alm:out std_logic;
q3,q2,q1,q0,dang:out std_logic_vector(3 downto 0));
end COMPONENT;
COMPONENT lock
port(l:in std_logic;
a4,a3,a2,a1,a0:in std_logic_vector(3 downto 0);
q4,q3,q2,q1,q0:out std_logic_vector(3 downto 0));
end COMPONENT;
COMPONENT ch
port(sel:in std_logic_vector(2 downto 0);
a3,a2,a1,a0,dang:in std_logic_vector(3 downto 0);
q:out std_logic_vector(3 downto 0));
end COMPONENT;
COMPONENT disp
port(d:in std_logic_vector(3 downto 0);
q:out std_logic_vector(6 downto 0));
end COMPONENT;
COMPONENT decoder3_8
port(a:in std_logic_vector(2 downto 0);
qc:out std_logic_vector(3 downto 0));
end COMPONENT;
SIGNAL qq:STD_LOGIC;
SIGNAL qq3,qq2,qq1,qq0,qqdang:STD_LOGIC_VECTOR(3 DOWNTO 0);
SIGNAL tt4,tt3,tt2,tt1,tt0:STD_LOGIC_VECTOR(3 DOWNTO 0);
SIGNAL ww:STD_LOGIC_VECTOR(3 DOWNTO 0);
SIGNAL SS:STD_LOGIC_VECTOR(2 DOWNTO 0);
BEGIN
u1:fen PORT MAP(clk=>clk,q=>qq);
u2:selx PORT MAP(clk=>clk,SL=>SS);
u3:corna PORT MAP(clr=>clr,sig=>sig,door=>qq,alm=>alm,q3=>qq3,q2=>qq2,q1=>qq1,q0=>qq0,dang=>qqdang);
u4:lock PORT MAP(l=>qq,a4=>qq3,a3=>qq3,a2=>qq2,a1=>qq1,a0=>qqdang,q4=>tt4,q3=>tt3,q2=>tt2,q1=>tt1,q0=>tt0);
u5:ch PORT MAP(sel=>SS,a3=>tt4,a2=>tt3,a1=>tt2,a0=>tt1,dang=>tt0,q=>ww);
u6:disp PORT MAP(d=>ww,q=>q);
u7:decoder3_8 PORT MAP(a=>SS,qc=>qc);
END sd;
由于超出字数所以把库说明头程序删了
基本要求:设计一个6位频率计,可以测量从1Hz到999 999Hz的信号频率。 频率计工作时,先要产生
题目三 数字频率测量仪设计 一、设计内容: 采用MCS-51系列单片机进行数字频率计设计
急求: 要求: ⑴.设计一个简易数字频率计,用于测量数字信号的频率并显示,用一个开关控制频率计的起动和停
有一种塑料薄膜用吹风机加热绷紧代替玻璃。有哪位高手帮忙告诉我一下,谢谢…。 这叫“热缩膜”或“热收缩膜”
我在资料里看到什么游标法、差分法、频差倍增法之类的,那么基于51单片机的数字频率计采用的是什么测量方法呢
麻烦那位高手帮我查询下我的文章"Nickel catalysts supported on carbon
如图 正弦波幅值 4V以下,频率计无示数 必须要4V以上 才会正确显示一个频率 这是什么原因啊
大家好!谁知道示波器和频率计的区别?修电脑主板主要测试各关键点信号、 频率用那种好? 跪求????。。。
1,用数字电路设计一个简易数字频率计 2,可测正弦波,方波至少两种波形 测量范围1HZ~10KHZ
做用51单片机做一个频率计,测量范围为0.1Hz~10kHz。思想是:用T0作为外部计数器,采样时间固定为