- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Im doing a project that need an input from user so Im using 4x4 keypad
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 ;
- Tags:
- Vhdl
Link Copied
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page