FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5984 Discussions

how to interface keypad with FPGA

fAlja
Beginner
684 Views

Im doing a project that need an input from user so Im using 4x4 keypad 4x4 keypad-1-750x750.jpg

and this is my VHDL code , I dont know what is the problem . when the reset button is 1 there is no output but when it is low all the leds are 1

 

part of the code

 

 

 entity keypad is

 Port ( 

 

 

reset : IN STD_LOGIC;

row : IN STD_LOGIC_VECTOR( 4 DOWNTO 1); 

col : IN STD_LOGIC_VECTOR( 4 DOWNTO 1); 

leds : OUT STD_LOGIC_VECTOR ( 9 DOWNTO 1)

 );

end keypad;

 

 

architecture Behavioral of keypad is

begin

 

PROCESS(reset)

BEGIN 

IF reset='1' THEN leds<="000000000";

ELSE

CASE row IS

WHEN "1000" => --ROW 1 

IF col="1000" THEN leds <="000000001";

ELSIF col="0100" THEN leds <="000000010";

ELSIF col="0010" THEN leds <="000000100";

ELSIF col="0001" THEN leds <="000000000";

END IF ; 

0 Kudos
0 Replies
Reply