Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------------------------------------------------------------
- -- Company:
- -- Engineer:
- --
- -- Create Date: 09:48:09 03/20/2019
- -- Design Name:
- -- Module Name: display - 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;
- use IEEE.std_logic_unsigned.all;
- -- Uncomment the following library declaration if using
- -- arithmetic functions with Signed or Unsigned values
- --use IEEE.NUMERIC_STD.ALL;
- -- Uncomment the following library declaration if instantiating
- -- any Xilinx primitives in this code.
- --library UNISIM;
- --use UNISIM.VComponents.all;
- entity display is
- Port ( anoda : out STD_LOGIC_VECTOR (3 downto 0);
- LDisplay : out STD_LOGIC_VECTOR (6 downto 0);
- jed, dzi, set, tys : in STD_LOGIC_VECTOR (3 downto 0);
- clock : in STD_LOGIC);
- end display;
- architecture Behavioral of display is
- signal mux: STD_LOGIC_VECTOR (3 downto 0);
- signal clk_200Hz :std_logic;
- signal zlicz : std_logic_vector (1 downto 0);
- begin
- process (clk_200Hz)
- begin
- if ( clk_200Hz'event and clk_200Hz = '1') then
- zlicz <= zlicz + 1;
- end if;
- end process;
- process (clock)
- variable temp: natural range 0 to 50000000;
- begin
- if (clock'event and clock = '1') then
- temp :=temp+1;
- if temp = 20000 then
- temp:=0;
- clk_200Hz <= not clk_200Hz;
- end if;
- end if;
- end process;
- With zlicz Select
- anoda <= not "0001" when "00",
- not "0010" when "01",
- not "0100" when "10",
- not "1000" when "11";
- with zlicz Select
- mux <= jed when "00",
- dzi when "01",
- set when "10",
- tys when "11";
- With mux Select
- LDisplay <= NOT "1111110" when "0000",
- NOT "0110000" when "0001",
- NOT "1101101" when "0010",
- NOT "1111001" when "0011",
- NOT "0110011" when "0100",
- NOT "1011011" when "0101",
- NOT "1011111" when "0110",
- NOT "1110000" when "0111",
- NOT "1111111" when "1000",
- NOT "1111011" when "1001",
- NOT "1110111" when "1010",
- NOT "0011111" when "1011",
- NOT "1001110" when "1100",
- NOT "0111101" when "1101",
- NOT "1001111" when "1110",
- NOT "1000111" when "1111";
- end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement