EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Help on interfacing PS2 keyboard on spartan2.

Started by Animesh Pathak April 9, 2004
Hi all,
I am trying to interface a ps2 keyboard to the Xilinx Spartan2 FPGA I
have.
I have connected the keyboard to the Digilab DIO1 board and see no
activity on the PS2D and PS2C pins when I use a logic analyser, and
even when I pick inputs from the relevent FPGA pins and try to drive
LEDs with those inputs.
Anyone tried this?
Comments will be deeply appreciated.
Thanks
Animesh



Animesh:

Who's PS/2 keyboard code are you using ?
I'm not familiar with the Digilab DIO1. What size Spartan 2 is it ?

I converted the open cores PS/2 keyboard code from verilog to VHDL
and implemented it on my System09 using a XC2S300e.

I changed the time constants for the 49.125 MHz clock to those
required for a 12.5MHz, which is the clock speed of my CPU.

The open cores code needs a wrapper to interface to the microcomputer
bus to provide a bi-directional data register and a command / status
register.
The original code has provisions for a scan code output as well as the
ASCII code equivalent. I only implemented the ASCII code interface.

It seemed to work fine.

Using a micro in the FPGA gives you a way to examine registers to
see what the keyboard is receiving. You might like to use the XR16,
but I have not used it yet so I'm not sure what is involved.

http://members.optushome.com.au/jekent/system09/index.html

John.

Animesh Pathak wrote:

>Hi all,
>I am trying to interface a ps2 keyboard to the Xilinx Spartan2 FPGA I
>have.
>I have connected the keyboard to the Digilab DIO1 board and see no
>activity on the PS2D and PS2C pins when I use a logic analyser, and
>even when I pick inputs from the relevent FPGA pins and try to drive
>LEDs with those inputs.
>Anyone tried this?
>Comments will be deeply appreciated.
>Thanks
>Animesh >

--
http://members.optushome.com.au/jekent



Hi John,
Thanks for the pointers.
I am not 'coding' this. I am using ePD, the innoveda tool.
The Hardware is Spartan2. Xc2s30. TQ144
If anyone has used this, please let me know.
Thanks
Animesh

--- In , John Kent <jekent@o...> wrote:
> Animesh:
>
> Who's PS/2 keyboard code are you using ?
> I'm not familiar with the Digilab DIO1. What size Spartan 2 is it ?
>
> I converted the open cores PS/2 keyboard code from verilog to VHDL
> and implemented it on my System09 using a XC2S300e.
>
> I changed the time constants for the 49.125 MHz clock to those
> required for a 12.5MHz, which is the clock speed of my CPU.
>
> The open cores code needs a wrapper to interface to the
microcomputer
> bus to provide a bi-directional data register and a command /
status
> register.
> The original code has provisions for a scan code output as well as
the
> ASCII code equivalent. I only implemented the ASCII code interface.
>
> It seemed to work fine.
>
> Using a micro in the FPGA gives you a way to examine registers to
> see what the keyboard is receiving. You might like to use the XR16,
> but I have not used it yet so I'm not sure what is involved.
>
> http://members.optushome.com.au/jekent/system09/index.html
>
> John.
>
.com.au/jekent



Memfault Beyond the Launch