VHDL HELP!!!!! Kepad decoder code

Discussion in 'VHDL' started by mitsui9999, Oct 17, 2008.

  1. mitsui9999

    mitsui9999

    Joined:
    Sep 24, 2008
    Messages:
    2
    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
    mitsui9999, Oct 17, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jacobo
    Replies:
    4
    Views:
    1,209
    Marc Randolph
    May 19, 2004
  2. Wilq
    Replies:
    0
    Views:
    1,360
  3. afd
    Replies:
    1
    Views:
    8,319
    Colin Paul Gloster
    Mar 23, 2007
  4. dkk1980

    Decoder using VHDL

    dkk1980, Apr 25, 2007, in forum: VHDL
    Replies:
    0
    Views:
    1,658
    dkk1980
    Apr 25, 2007
  5. zsisco@yahoo.com

    Decoder for obfuscated code?

    zsisco@yahoo.com, Sep 22, 2006, in forum: Javascript
    Replies:
    3
    Views:
    587
    zsisco@yahoo.com
    Sep 25, 2006
Loading...

Share This Page