PoC.io.pmod.KYPD

This module drives a 4-bit one-cold encoded column vector to read back a 4-bit rows vector. By scanning column-by-column it’s possible to extract the current button state of the whole keypad. This wrapper converts the high-active signals from PoC.io.KeypadScanner to low-active signals for the pmod. An additional debounce circuit filters the button signals. The scan frequency and bounce time can be configured.

Entity Declaration:

 1    BOUNCE_TIME   : T_TIME      := 10.0e-3
 2  );
 3  port (
 4    Clock         : in  std_logic;
 5    Reset         : in  std_logic;
 6    -- Matrix interface
 7    Keys          : out T_PMOD_KYPD_KEYPAD;
 8    -- KeyPad interface
 9    Columns_n     : out std_logic_vector(3 downto 0);
10    Rows_n        : in  std_logic_vector(3 downto 0)
11  );
12end entity;
13
14
15architecture rtl of pmod_KYPD is
16  signal ColumnVector     : std_logic_vector(3 downto 0);