Difference between revisions of "IOP16 PS/2 Keyboard"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) |
||
Line 17: | Line 17: | ||
== Hook-up == | == Hook-up == | ||
− | === VHDL | + | === VHDL Instance === |
<pre> | <pre> | ||
− | ENTITY Wrap_Keyboard | + | -- PS/2 keyboard/mapper to ANSI |
− | port ( | + | KEYBOARD : ENTITY WORK.Wrap_Keyboard |
− | i_CLOCK_50 | + | port MAP ( |
− | i_n_reset | + | i_CLOCK_50 => i_clk, |
− | i_kbCS | + | i_n_reset => w_resetClean_n, |
− | i_RegSel | + | i_kbCS => w_kbcs, |
− | i_rd_Kbd | + | i_RegSel => w_periphAdr(0), |
− | i_ps2_clk | + | i_rd_Kbd => w_kbcs, |
− | i_ps2_data | + | i_ps2_clk => ps2Clk, |
− | o_kbdDat | + | i_ps2_data => ps2Data, |
− | + | o_kbdDat => w_KbdData | |
+ | ); | ||
</pre> | </pre> | ||
Revision as of 12:16, 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 Instance
-- PS/2 keyboard/mapper to ANSI KEYBOARD : ENTITY WORK.Wrap_Keyboard port MAP ( i_CLOCK_50 => i_clk, i_n_reset => w_resetClean_n, i_kbCS => w_kbcs, i_RegSel => w_periphAdr(0), i_rd_Kbd => w_kbcs, i_ps2_clk => ps2Clk, i_ps2_data => ps2Data, o_kbdDat => w_KbdData );
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);