Professional Documents
Culture Documents
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.std_logic_unsigned.all;
--use IEEE.NUMERIC_STD.ALL;
--library UNISIM;
--use UNISIM.VComponents.all;
entity CONTADOR_81HZ is
PARE : in STD_LOGIC;
BORRAR : in STD_LOGIC;
end CONTADOR_81HZ;
begin
PROCESS (CLK_50MHZ,PARE)
BEGIN
CONTA:= 25000000;
ELSE
IF PARE='0' THEN
CONTA:= CONTA-1;
ELSE
CONTA:=CONTA;
END IF;
END IF;
END IF;
CLK_1HZ<=aux;
END PROCESS;
process (clk_1hz)
begin
if RISING_EDGE(CLK_1HZ) then
if BORRAR='1' then
AUXILIAR:="00000000";
else
AUXILIAR := AUXILIAR+1;
end if;
end if;
CONTADOR<=AUXILIAR;
end process;
end Behavioral;