1

I have a logitech keyboard with a ps/2 connection. I also have a Baysis2 fpga that I would like to use to read keyboard input. The problem is, the keyboard doesn't seem to be receiving power. I may be wrong, but non of the lights on the keyboard turn on when I connect it to my board.

My question is: is this normal? I assume that the lights should turn on since the board is supposed to power the keyboard.

Can anyone provide me with some simple code to definitively test whether or not my keyboard is receiving data? Nothing I've tried has worked.

Noah Mendoza
  • 777
  • 1
  • 7
  • 17
  • 1
    Does the keyboard require an external voltage? What voltage does the Baysis2 FPGA provide? I've done a PS2 project, and I needed to use an external 5V supply to talk to my mouse. The board I was using only provided 3.3V. Additionally, try echoing any received data to a UART. I found this helpful during debug. – Russell Nov 21 '15 at 01:09

1 Answers1

1

The LEDs on a keyboard need to be enabled by the host controller. They are defaulted to "off". If the keyboard is working can be tested if PS2_CLK is active when you press a key, because the keyboard is the bus master (clock source).

Further reading: PS/2 Protocol in Detail

Paebbels
  • 15,573
  • 13
  • 70
  • 139
  • Thanks for the help. I did what you suggested, but it seems that the ps/2 ports are always logical high on the baysis 2? I have a simple module that binds the two signals ps2c and ps2d to the keyboard ports and to two leds. Even if there is no keyboard plugged in, the LEDs always light up. Do you have any idea why? – Noah Mendoza Nov 23 '15 at 07:49
  • @noahmendoza Did you assign the correct pin locations in the UCF file? Did you set the output driver to `Z` while reading the input? – Paebbels Nov 23 '15 at 09:12