Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help with ps/2 keyboard interface

Status
Not open for further replies.

siddharthakala

Member level 2
Joined
Jul 20, 2010
Messages
53
Helped
6
Reputation
12
Reaction score
5
Trophy points
1,288
Location
bangalore
Activity points
1,732
Hi,

I am trying to design a simple PS/2 keyboard interface for Nexys3 board. The design should just recognize some scancodes and turn on an LED and another LED to show connection of keyboard with FPGA.

My design is not working and what I dont understand is - why a PIC microcontroller is provided? Can I not just directly use the keyboard data and clock inputs without using the PIC controller for my design. I thought I should be able to implement the design on FPGA and use the PS/2 inputs directly. But its not working at all.

Nexys3 uses USB HID port for PS/2 inputs.

It would be great if someone could help me with this. Thanks a lot
 

try opencores - they have a ready-to-run PS/2 core (you'll need to hook the necessary interface to your LEDs of course

Good luck
 

the PIC controller acts as a keyboard controller and sends out data and clock in ps/2 interface.

you must have the proper command to send to keyboard initially after power-on before reading the ps/2 signals.
 
Some of the other Digilent boards have reference designs for PS/2 that you could use - have a look at Digilent Inc. - Digital Design Engineer's Source .

The PIC provides a USB host that emulates PS/2 devices, which are much simpler to deal with than USB in an FPGA. You could connect a PS/2 keyboard or mouse directly to the FPGA (with appropriate pull-ups) if you wanted to, but Digilent figure that most people have USB peripherals these days.
 
Thanks for the helpful suggestions.

I am assuming that I will need to run the power on sequence before being able to get the codes from the keyboard. I did not see any examples or designs doing that so I thought it is not needed.

Thanks a lot
 

It's been a while, and I'm not sure if the NEXYS3's PS/2 emulation requires it (I have a suspicion it does, because I recall that my ATLYS doesn't generate any output when a keyboard or mouse is attached and you don't do anything else), but normally you'd send 0xFF 0xF4 to the keyboard to reset it and enable reporting.

If you look at the PS/2 design I linked in my previous post ("PS2 Mouse Control reference component"), you'll see that it does actually initialise the mouse when the controller is reset.
 
Thanks.

This is what I was doubtful about. I was not doing the reset thing before performing the required task. I think it should work now.
 

Did u manage to connect the keyboard through USB-HID?
 

Hi guys,

can I use the EPP interface to connect the usb keyboard/mouse?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top