library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity blinklicht is Port ( clk : in STD_LOGIC; led : out STD_LOGIC_VECTOR (0 to 7); rs_inst_data : out STD_LOGIC; rw_read_write : out STD_LOGIC; e_enable : out STD_LOGIC; db_databus : out STD_LOGIC_VECTOR (7 downto 0); cs_chip_enable : out STD_LOGIC; res_reset : out STD_LOGIC; dis_off : out STD_LOGIC ); end blinklicht; architecture Behavioral of blinklicht is SIGNAL counter : STD_LOGIC_VECTOR (23 downto 0) := "000000000000000000000000"; SIGNAL status : STD_LOGIC_VECTOR (7 downto 0) := "00000000"; signal enable_puffer : STD_LOGIC := '0'; begin zaehler: process(clk) BEGIN IF RISING_EDGE(clk) THEN counter <= counter + '1'; END IF; end process zaehler; init: process(clk,counter,status) begin IF RISING_EDGE(clk) THEN if counter="000000000000000000000000" then enable_puffer<=not enable_puffer; if enable_puffer='0' then -------------------------------- if status="00000000" then db_databus <= "00000000"; -- mode control rs_inst_data <= '1'; end if; if status="00000001" then db_databus <= "00111100"; -- cursor blink with internal symbols rs_inst_data <= '0'; end if; -------------------------------- if status="00000010" then db_databus <= "00000001"; -- character pitch rs_inst_data <= '1'; end if; if status="00000011" then db_databus <= "01110111"; -- size = 8 rs_inst_data <= '0'; end if; --------------------------------- if status="00000100" then db_databus <= "00000010"; -- number of chars per line rs_inst_data <= '1'; end if; if status="00000101" then db_databus <= "00010011"; -- 19 ??? rs_inst_data <= '0'; end if; --------------------------------- if status="00000110" then db_databus <= "00000011"; -- number of time division rs_inst_data <= '1'; end if; if status="00000111" then db_databus <= "01010000"; -- 1/80 ???????? rs_inst_data <= '0'; end if; --------------------------------- if status="00001000" then db_databus <= "00000100"; -- cursor position rs_inst_data <= '1'; end if; if status="00001001" then db_databus <= "00000111"; -- 7 ?????????? rs_inst_data <= '0'; end if; --------------------------------- if status="00001010" then db_databus <= "00001000"; -- display start low rs_inst_data <= '1'; end if; if status="00001011" then db_databus <= "00000000"; -- 0 rs_inst_data <= '0'; end if; --------------------------------- if status="00001100" then db_databus <= "00001001"; -- display start high rs_inst_data <= '1'; end if; if status="00001101" then db_databus <= "00000000"; -- 0 rs_inst_data <= '0'; end if; --------------------------------- if status="00001110" then db_databus <= "00001010"; -- cursor low addr rs_inst_data <= '1'; end if; if status="00001111" then db_databus <= "00000000"; -- 0 rs_inst_data <= '0'; end if; --------------------------------- if status="00010000" then db_databus <= "00001011"; -- cursor high addr rs_inst_data <= '1'; end if; if status="00010001" then db_databus <= "00000000"; -- 0 rs_inst_data <= '0'; end if; --------------------------------- if status="00010010" or status="00010011" then if status="00010010" then db_databus <= "00001100"; -- write display data rs_inst_data <= '1'; status<="00010011"; else db_databus <= "00111100"; rs_inst_data <= '0'; status<="00010010"; end if; else status <= status + '1'; end if; end if; end if; END IF; end process init; led <= status; rw_read_write <= '0'; --- write = low e_enable <= enable_puffer; cs_chip_enable <= '0'; -- low = active res_reset <= '1'; --- reset = low dis_off <= '1'; ----- low = off end Behavioral;