Difference between revisions of "IOP16 PS/2 Keyboard"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) |
||
Line 37: | Line 37: | ||
<pre> | <pre> | ||
-- Strobes/Selects | -- Strobes/Selects | ||
− | w_kbcs <= '1' when (w_periphAdr(7 downto 1) = "0000110") and (w_periphRd = '1' | + | w_kbcs <= '1' when (w_periphAdr(7 downto 1) = "0000110") and (w_periphRd = '1') else '0'; |
-- Peripheral bus read mux | -- Peripheral bus read mux | ||
w_periphIn <= ... | w_periphIn <= ... | ||
− | w_KbdData when w_periphAdr(7 downto 1) = "0000110 | + | w_KbdData when w_periphAdr(7 downto 1) = "0000110" else |
... | ... | ||
</pre> | </pre> |
Revision as of 12:14, 14 April 2022
Contents
PS/2 Keyboard
- Wrapper for PS/2 keyboard interfaces
- PS/2 to ASCII conversion
Software Interface
Address i_RegSel - Register Select = 0 - Status register
- Value = 0x00, No data present
- Value = 0x01, Data present
Address i_RegSel - Register Select = 0 - Data register
- ASCII Data
Hook-up
VHDL Entity
ENTITY Wrap_Keyboard IS port ( i_CLOCK_50 : IN STD_LOGIC; -- input clock i_n_reset : IN STD_LOGIC; -- i_kbCS : IN STD_LOGIC; -- i_RegSel : IN STD_LOGIC; -- address i_rd_Kbd : IN STD_LOGIC; -- i_ps2_clk : IN STD_LOGIC; -- i_ps2_data : IN STD_LOGIC; -- o_kbdDat : OUT STD_LOGIC_vector(7 downto 0)); end Wrap_Keyboard;
Hook-up
-- Strobes/Selects w_kbcs <= '1' when (w_periphAdr(7 downto 1) = "0000110") and (w_periphRd = '1') else '0'; -- Peripheral bus read mux w_periphIn <= ... w_KbdData when w_periphAdr(7 downto 1) = "0000110" else ...
Signals
-- Decodes/Strobes ... signal w_kbcs : std_logic; -- Interfaces ... signal w_KbdData : std_logic_vector(7 downto 0);