library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity ledlie is
port (clk:in std_logic;
hang: out std_logic_vector (15 downto 0);
liem: out std_logic_vector (3 downto 0));
end ledlie;
architecture behave of ledlie is
begin
process(clk)
variable ql:std_logic_vector(3 downto 0);
begin
if rising_edge(clk) then
if(ql="1111") then
ql:="0000";
else
ql := ql +1;
end if;
end if;
liem <=ql;
hang <="1011111111111111";
end process;
end behave;
一段遍历扫描点阵的程序,liem为四 十六译码器输入端 控制点阵的列,程序想实现一行亮,但是只有一个亮,请大神帮忙。
你的hang是控制对应某一行亮吗?看你的控制端是高电平还是低电平亮灯,如果是高电平,看起来hang会使得只有一个灯不亮,如果是低电平,那就只有一个灯亮。
题主还是把你的电路图一起发上来为好,并且具体描述你现在的亮灯状况。