如何利用Verilog HDL语言实现6位数字动态扫描电路

如何利用Verilog HDL语言实现6位数字动态扫描电路的程序,求高手帮忙啊,毕业设计,程序真难写啊。 电路是这样的,利用3-8译码器对数码管进行位选,有6个数码管,分别接在38译码器的6个输出,同时38译码器在连接3个74ls244的6个使能端,控制数据的输出。同时38译码器还连接一个6进制的160或190,这个6进制160或190在连接一个4进制的190或D触发器,在连接一个1000HZ的信号发生器(555),然后在用这个555除以一个1000的160或190器件,然后在连接6个74ls160的计数器,这6个从1秒到100000秒,他们在分别连接3个74ls244,这3个在连接一个74ls48,然后再连接6个数码管。看不懂,我还画了个简易的表达意思的图,我穿不上来,可以给哪位大侠发过去,帮帮忙啊~~真的是不会啊~~~我的QQ46540631,邮箱46540631qq.com~谢谢啊~~

因为是用语言做你的6位数字动态扫描电路,所以你大可不必追求某个器件,某个引脚,因为器件是你自己编,有用的端口做出来,没用的就可以不做,哥们我耗时3个小时帮你做了这个,时间紧凑,只是实现了你的需求,没有更多的修饰,当然想我帮你修饰也可以,条件嘛,面谈! 好了,现在开始给你帖我的做法,对了,我是用vhdl实现的! 并且在quartus II 5.1版本软件下编译成功! 首先是4位锁存器代码:library ieee;
use ieee.std_logic_1164.all;entity reg4 is
port(
din : in std_logic_vector(3 downto 0);
dout: out std_logic_vector(3 downto 0);
ena: in std_logic
);
end reg4;

architecture art of reg4 is
begin
process(ena)
begin
if ena='1' then dout<=din; --ena=1时,置数
else dout<="ZZZZ"; --ena=0时,高阻
end if;
end process;
end art; 这个是6位译码器(其实就是3-8译码,最高2位不用)用来选择锁存器的输出与数码管:library ieee;
use ieee.std_logic_1164.all;entity decoder is
port(
add:in std_logic_vector(2 downto 0);
sel:out std_logic_vector(5 downto 0)
);
end decoder;architecture art of decoder is
begin
sel(5)<='1' when add="110" else '0';
sel(4)<='1' when add="101" else '0';
sel(3)<='1' when add="011" else '0';
sel(2)<='1' when add="010" else '0';
sel(1)<='1' when add="001" else '0';
sel(0)<='1' when add="000" else '0';
end art; 这个是6位计数器,用来提供选址(时钟信号需要50HZ,因为人眼暂留时间临界为25HZ,而我的程序中是二分频后的计数):library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;entity cnt6 is
port(
clk: in std_logic;
cq: out std_logic_vector(2 downto 0)
);
end cnt6;

architecture art of cnt6 is
signal cqi: std_logic_vector(2 downto 0);
begin
process(clk)
begin
if clk 'event and clk='1' then --同步清零
if cqi<"101" then
cqi<=cqi+1;
else
cqi<="000";
end if;
end if;
end process;
end art; 这个是类似与7448的7段译码器,没写那么多控制引脚,因为这个简易版用不到:entity decoder7 is
port(
inp: in std_logic_vector(3 downto 0);
outp:out std_logic_vector(6 downto 0)
);
end decoder7;

architecture art of decoder7 is --因为你需要接共阴极数码管,所以输出高电平驱动
begin
with inp select
outp<="1111110" when "0000",
"0110000" when "0001",
"1101101" when "0010",
"1111001" when "0011",
"0110011" when "0100",
"1011011" when "0101",
"0011111" when "0110",
"1110000" when "0111",
"1111111" when "1000",
"1110011" when "1001",
"ZZZZZZZ" when others;
end art; 接下来是总程序:……不行,毫无保留的给你,你这家伙肯定要赖账,答谢我以后给你! 给你来张原理图,让你更明白点: 请追加分数,要不你实在对不起哥!!
温馨提示:答案为网友推荐,仅供参考