Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 2b500f15 authored by Hachemin Pierre-Yves's avatar Hachemin Pierre-Yves

modify shutter

parent 60c349b6
......@@ -4,41 +4,19 @@ use IEEE.STD_LOGIC_1164.ALL;
entity Int_Shutter is
Port (
trig_shutter : in STD_LOGIC;
shutter7 : in STD_LOGIC_VECTOR (6 downto 0);
shutter8 : in STD_LOGIC_VECTOR (7 downto 0);
shutter : out STD_LOGIC_VECTOR (7 downto 0));
end Int_Shutter;
architecture Behavioral of Int_Shutter is
signal mem_shutter : STD_LOGIC_VECTOR(7 downto 0) := "00000000";
signal mem_shutterpan : STD_LOGIC_VECTOR(8 downto 0) := "00000000";
begin
shutter <=mem_shutter;
memory : process(trig_shutter)
begin
If trig_shutter'event and trig_shutter='1' then
CASE shutter7 IS
WHEN "00000000" =>
mem_shutter <= "00000000"; --0 black-out
WHEN "00000001" =>
mem_shutter <= "01000000"; --64 Dimmer
WHEN "00000010" =>
mem_shutter <= "10000000"; --128 Open
--Do not send between 3 and 8 !!
WHEN "00000011" =>
mem_shutter <= "00000000"; --0 black-out
WHEN "00000100" =>
mem_shutter <= "00000000"; --0 black-out
WHEN "00000101" =>
mem_shutter <= "00000000"; --0 black-out
WHEN "00000110" =>
mem_shutter <= "00000000"; --0 black-out
WHEN "00000111" =>
mem_shutter <= "00000000"; --0 black-out
WHEN others =>
mem_shutter <= '1' & shutter7; --translation of 128
end case;
mem_shutter <= shutter8;
end if;
end process;
end Behavioral;
--8 à 119
\ No newline at end of file
end Behavioral;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment