Jump to content
  • 0

Genesys 2 + USB keyboard not working properly


srce

Question

Hi,

I'm trying to use a USB keyboard with a Genesys 2. The keyboard is connected to J7-top and the FPGA firmware is Genesys-2-Keyboard-2016.4-1.zip (so the PIC is being used to translate between USB + PS/2)

My problem is that the keyboard only works intermittently. If you start pressing keys, nothing will happen for a second or two, then it will start working (so many keypresses are lost). If you stop pressing any keys for a second, it will revert to the not working state, and so on.

When in the not working state, LD11 (BUSY) is slowly blinking. When it is working, LD11 is off. The reference manual states: "A slow pulse means the microcontroller is waiting for a configuration medium to be plugged in." Is there any way to prevent this? Changing JP4 or JP5 doesn't seem to make a difference.

I've also noticed, that each time it starts working, it sends 0xaa, which according to the docs, indicates the self-test has passed. I'd only expect this to occur once, not each time it starts outputting scan codes. It's almost as if the PIC is continually being reset.

I've tried two different USB keyboards and both do not work. The same problem doesn't seem to happen with a mouse connected.

I've also noticed even when working, it doesn't seem to send correct scan codes for the arrow keys.  Right arrow just sends E0. Left arrow sends 6B. Is the source code for the PIC available?

edit: Seems a similar problem to this https://forum.digilentinc.com/topic/9403-nexys4-ddr-usb-interface-reset-with-keyboard/#comment-28956 - but that didn't seem to have a resolution. My keyboard USB IDs are: VID 1a2c PID 2124 and VID 046E PID 6000. I've just ordered a Microsoft Wired Keyboard 600 as mentioned in that thread, to see if it works.

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

The Microsoft Wired Keyboard 600 does not have this issue, so it seems like it is a problem with the PIC firmware not supporting some USB keyboards.

Unfortunately, there still is a problem with the scan codes generated for the arrow keys. The left, up and down arrows do not send the extended byte (e0). Only the right arrow does. This means these keys appear as the number pad, rather than the arrow keys: See http://www.philipstorr.id.au/pcbook/book3/scancode.htm

 

Link to comment
Share on other sites

Hi @srce,

I don't have a Genesys 2 with me at home to readily test this, but what settings do you have JP4 and JP5 set to? A picture of how they configured will work for me. I agree with your assessment that keyboard is continually being reset since that's the scancode it sends out when receiving a 0xFF from the host or upon keyboard power-up. Since that particular demo doesn't send any scancode commands to the downstream device at any point (it only reads them), this would make me think that the keyboard is instead being continually reset.

Edit: I see your latest post about the other keyboard working aside from some of the arrow keys. I will ask about the firmware used in the PIC24.

Thanks,
JColvin

Link to comment
Share on other sites

6 minutes ago, JColvin said:

I don't have a Genesys 2 with me at home to readily test this, but what settings do you have JP4 and JP5 set to?

I believe I tried every permutation. It seems it's related to the keyboard, rather than these jumper settings. Note that as per the link to the other thread in the OP, it seems to be a problem with other boards as well, not just the Genesys 2. Thanks.

Link to comment
Share on other sites

On 10/21/2020 at 4:31 PM, JColvin said:

Edit: I see your latest post about the other keyboard working aside from some of the arrow keys. I will ask about the firmware used in the PIC24.

Any updates on this? Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...