Beruflich Dokumente
Kultur Dokumente
-- Company:
-- Engineer:
--
-- Create Date: 15:55:18 05/14/2018
-- Design Name:
-- Module Name: Contador - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity Contador is
Port (
S0 : outSTD_LOGIC;
S1 : outSTD_LOGIC;
M0 : outSTD_LOGIC;
M1 : outSTD_LOGIC;
H0 : outSTD_LOGIC;
H1 : out STD_LOGIC;
clk : in STD_LOGIC;
reset : in STD_LOGIC;
ajusteMM : in STD_LOGIC;
ajusteHH : in STD_LOGIC;
ajuste : in STD_LOGIC);
end Contador;
begin
process (clk, reset, ajuste,ajusteHH,ajusteMM)
begin
--Reseteo
if (reset ='1') then
ss0<="0000";
ss1<="000";
mm0<="0000";
mm1<="000";
hh0<="0000";
hh1<="000";
else
--contador de segundos
--contador minutos
--contaddor horas
if (clk_a2'event and clk_a2='1') then
hh0<= hh0+1;
clk5 <='0';
if (hh0=9) then
hh0<="0000";
clk5 <='1';
end if;
end if;
end if;
end process;
----Asignaci�n de se�ales
--H1 <= STD_LOGIC_VECTOR(hh1);
--H0 <= STD_LOGIC_VECTOR(hh0);
--M1 <= STD_LOGIC_VECTOR(mm1);
--M0 <= STD_LOGIC_VECTOR(mm0);
--S1 <= STD_LOGIC_VECTOR(ss1);
--S0 <= STD_LOGIC_VECTOR(ss0);
end Behavioral;