anodeDecoder.vhd

-- msTimer - Anode Decoder

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity anodeDecoder is
port( i0:                in        std_logic_vector(1 downto 0);
        y0,y1,y2,y3:    out    std_logic);
end anodeDecoder;

architecture Behavioral of anodeDecoder is
begin

    process(i0) begin
        case i0 is
            when "00" =>
                y0 <= '0';
                y1 <= '1';
                y2 <= '1';
                y3 <= '1';
            when "01" =>
                y0 <= '1';
                y1 <= '0';
                y2 <= '1';
                y3 <= '1';
            when "10" =>
                y0 <= '1';
                y1 <= '1';
                y2 <= '0';
                y3 <= '1';
            when others =>
                y0 <= '1';
                y1 <= '1';
                y2 <= '1';
                y3 <= '0';
        end case;
    end process;

end Behavioral;

Creative Commons License
Milisecond Precsion Timer by Patrick Kramer is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

<< BACK

  1. No comments yet.

  1. No trackbacks yet.