VHDL HELP!!!!! Kepad decoder code

Joined
Sep 24, 2008
Messages
2
Reaction score
0
Help me to solve the problems about the keypad decode.
eg: output: col1 goes high when row1 is high and button press is 1
row 2 is high and button press is 4

i put case or if statements???

let me know that what wrong with it. thanks


Code:
entity prog5 is
Port ( reset , clk : in std_logic;
index : in integer range 1 to 12;
col : out std_logic_vector(2 downto 0);
row : in std_logic_vector(3 downto 0));
end prog5;

architecture Behavioral of prog5 is



begin

Process(clk,index)
begin
case col is
when "100" => "1000" <= row; index = 1;
when "100" => "0100" <= row; index = 4;
when "100" => "0010" <= row; index = 7;
end case;

end process ;
end Behavioral;


thanks
Regards
Mitsui9999


mitsui9999
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top