PS/2 ports on Arcade MegaWing


Cactus

Recommended Posts

Hi,

 

I'm trying to use the PS/2 port of the Arcade MegaWing using a Papilio One. Before diving into it headfirst, I thought I'd try some off-the-shelf code from someone who actually knows what he's doing, so I found a very simple PS/2 driver at http://soclab.cn.nctu.edu.tw/course/FPGA102/ps2_ctrl.pdf. The attached zipfile is a Xilinx ISE archive of my version of that code. All it tries to do is set LED3 to high after the first key is pressed. LED1 and LED2 are connected directly to the PS/2 Clock and Data ports.

 

Before I even connect my keyboard (a Microsoft Natural 4000 via a USB-to-PS2 dongle) to the FPGA, LED1 and LED2 are already continuously on. After I connect it, both LEDs stay on, and if I press a key, LED3 doesn't turn on. I should also add that there's a LED on the keyboard itself that shows that the keyboard is definitely at least connected to the power pins.

 

What am I doing wrong?

ps2.zip

Link to comment
Share on other sites

My goal is 100% learning VHDL and building stuff from first principles.

 

I've meanwhile found a Papilio-oriented tutorial at http://hamsterworks.co.nz/mediawiki/index.php/Papilio_Plus/PS2_Keyboard, which I tried to port over to the Papilio One by replacing the UCF file with the attached one. However, it also seems to have the same behaviour: pressing keys doesn't seem to result in any change to the LEDs.

keyboard-ucf.zip

Link to comment
Share on other sites

I have now also tried https://github.com/thelonious/ps2_io/tree/master/keyboard_scan_code again with a slight change that should light up LED<0> on the first successful keyscan (see attached), and that doesn't work either.

 

Does anyone have a full .bit file I can use to just smoke-test the Arcade PS/2 ports? I'm starting to think  the hw or the USB dongle might be at fault here.

keyboard_scan_code.zip

Link to comment
Share on other sites

I've added this question to Electronics.SE: http://electronics.stackexchange.com/questions/99277/using-the-ps-2-port-of-the-papilio-one-fpga-from-vhdl

 

Does someone have a ready-made .bit file I could upload to a Papilio One + Arcade megawing and smoke-test the PS/2 connectors? Something that flashes the LEDs when keys are pressed on an attached keyboard, etc.?

Link to comment
Share on other sites

I have now also tried the code from http://ec2-122-248-210-243.ap-southeast-1.compute.amazonaws.com/mediawiki/index.php/Papilio_S6/Keyboard_Joystick, by connecting joy_up directly to one of the LEDs. If I understand correctly, that should result in the LED lighting up as long as I am pushing the left cursor key on the keyboard, right? Still doesn't work.

Link to comment
Share on other sites

My understanding is that the USB PS/2  adapter is completely passive - the controller in an "dual interface" keyboard senses what it is connected to and works approprately.

 

However, I wouldn't be surprised if more recent keyboards have completely dropped the ability to use the PS/2 interface... maybe go to a "recycle shop" (aka "where stuff that is too good for the landfill ends up") and see if you can get a true PS/2 keyboard.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.