------------------------------------------------- ------------------------------------------------- -- EE552 ASL Translator and Handheld keyboard developement VHDL Code -- led_decoder.vhd -- This decorder decodes five bit data from the glove into 8 bit data -- The eight bit data will be used for hex LED display. library ieee; use ieee.std_logic_1164.all; -- The decoder has five inputs from the glove information -- The output is decorded into eight bit data. The data is eight bit -- hex data entity Ascii_decoder is PORT ( --interface in is valid data recieved from the glove interface_in : IN std_logic_vector(4 downto 0); enable: IN std_logic; Ascii_data_out: OUT std_logic_vector(7 downto 0)); end entity Ascii_decoder; architecture behavioral of Ascii_decoder is begin decode: process(interface_in,enable) is begin if enable = '1' then case interface_in is when "00001" => Ascii_data_out<= "01000001"; when "00010" => Ascii_data_out<= "01000010"; when "00011" => Ascii_data_out<= "01000011"; when "00100" => Ascii_data_out<= "01000100"; when "00101" => Ascii_data_out<= "01000101"; when "00110" => Ascii_data_out<= "01000110"; when "00111" => Ascii_data_out<= "01000111"; when "01000" => Ascii_data_out<= "01001000"; when "01001" => Ascii_data_out<= "01001001"; when "01010" => Ascii_data_out<= "01001010"; when "01011" => Ascii_data_out<= "01001011"; when "01100" => Ascii_data_out<= "01001100"; when "01101" => Ascii_data_out<= "01001101"; when "01110" => Ascii_data_out<= "01001110"; when "01111" => Ascii_data_out<= "01001111"; when "10000" => Ascii_data_out<= "01010000"; when "10001" => Ascii_data_out<= "01010001"; when "10010" => Ascii_data_out<= "01010010"; when "10011" => Ascii_data_out<= "01010011"; when "10100" => Ascii_data_out<= "01010100"; when "10101" => Ascii_data_out<= "01010101"; when "10110" => Ascii_data_out<= "01010110"; when "10111" => Ascii_data_out<= "01010111"; when "11000" => Ascii_data_out<= "01011000"; when "11001" => Ascii_data_out<= "01011001"; when "11010" => Ascii_data_out<= "01011010"; when "11011" => Ascii_data_out<= "00100000"; when "11100" => Ascii_data_out<= "00001000"; when "11101" => Ascii_data_out<= "00101110"; when "11110" => Ascii_data_out<= "00101100"; when "11111" => Ascii_data_out<= "00001101"; when others => Ascii_data_out<="00000000"; end case; --else --Ascii_data_out<="00000000"; end if; end process decode; end behavioral;