You are on page 1of 1

1.

Conteo de 3 leds propuesto

Solucin 2:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity contador_3 is
port( clk: in std_logic;
q: buffer std_logic_vector(2 downto 0));
end contador_3;

architecture solucion of contador_3 is


signal cuenta: std_logic_vector(24 downto 0);
begin
process(clk)
begin
if rising_edge(clk) then
cuenta <= cuenta + 1;
if cuenta = 24000000 then
cuenta <= (others=>'0');
q <= q + 1;
end if;
end if;
end process;
end solucion;

You might also like