Jason Crawford <
[email protected]> wrote in message news:<1075949641.602326@sj-nntpcache-3>...
> I have a Xilinx SpartanII part on my custom keyboard and I am
> looking to implement a PS/2 keyboard interface so that I can
> plug my custom keyboard into a standard PC PS/2 port.
>
> Googling for an opencore has so far been fruitless.
>
> I've tried opencores.org, but they only have a PS/2 keyboard interface
> that would be implemented on the host side (not keyboard side).
Build one yourself.
To receive the codes is more complicated then sending them and in a
lab course I teach it takes my students about four hours to build a
PS2 receiver.
So a sender should be no problem.
The protocol is described here:
http://govschl.ndsu.nodak.edu/%7Each...ro/PS2/ps2.htm
The scancodes are here
http://govschl.ndsu.nodak.edu/%7Each...cancodes2.html
For most keys you just have to shift out one byte when the key is
pressed and two bytes when it is released.
I expect that interpreting whatever it is that you use for your keys
is a lot more complicated then the PS2 part which I estimate at 10
lines VHDL at most.
(Plus any FIFOs that you might want to add)
Kolja Sulimma