Jump to content
  • 0

Does Basys-3 USB HID supports device with mouse+keyboard?


Gabriel Uribe Romero

Question

Hello,

I am using a Basys-3 board to build a prototype. One of the features of this prototype involves giving the user an access to a rugged wearable keyboard. The Basys-3 will be controlling this keyboard.

The keyboard has a USB Type A output connector and I am attaching that connector to the USB-Host connector (J2) on the Basys-3 board. Inside the Basys-3, there is an auxiliary function microcontroller (PIC24FJ128) that hides the USB HID protocol from the FPGA and emulates an old-style PS/2 bus.

image.png.bdb726f4dbed5da291c8812681a21298.png

Inside the FPGA, I am using an AXI PS/2 1.0 IP Core to take the PS/2 outputs from the PIC24FJ128 (PS2_CLK to pin C17 and PS2_DAT to pin B17 of the Artix-7 FPGA). Please refer to the attached PDF document to see the version I am using.

Finally, I am using an XINTC and an AXI Interconnect blocks to route the AXI PS/2 Core to a MicroBlaze softprocessor. On the attached document, I added a block diagram that shows the chain of devices that allow connection between the keyboard and the MicroBlaze softprocessor.

When building the software for the MicroBlaze, I based my application on the demo application for the Nexys board available on github: https://github.com/Digilent/Nexys-Video-AXI-PS2-Keyboard/blob/master/sdk/appsrc/demo.c

I have tested that my application is able to interact with regular keyboards for a PC. However, when I try to interact with this specific wearable keyboard, I am not being able to communicate with the actual keyboard device. I can only access a mouse device that is available as part of this wearable keyboard.

According to what I have researched, it is possible to put two devices (keyboard + mouse) through the USB HID protocol. But I am wondering if this access to the two devices is still available after the Auxiliary Function Microcontroller PIC24FJ128 converts the USB HID into PS/2 protocol. Based on the documentation of the Basys-3 board, you can only have either a mouse or a keyboard at the same.

My specific question to you is: Given my current HW setup, is there a way to access the keyboard + mouse inside the wearable keyboard?

I already tried the sequence to detect PS/2 devices described on this website: https://wiki.osdev.org/"8042"_PS/2_Controller#Detecting_PS.2F2_Device_Types

The wearable keyboard device reply that I am getting is 0x03 which means that the device is identified as a "Mouse with scroll wheel" based on the table below:

image.png.f08f6dfe4948cb565f0d596de2117dde.png

Sorry for giving you a lot of information. I am hoping you can provide me some support around the capabilities of the PIC microcontroller on the Basys-3 board.

Thanks,

Gabriel.

KeyboardToMicroBlazeBlockDiagram.pdf AXI PS2.pdf

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello,

Unfortunately, that the firmware used in the PIC24 present on the Basys 3 does not have Hub support so multiple devices (such as the keyboard + mouse combo) are not supported (based on the Reference Manual here: https://digilent.com/reference/programmable-logic/basys-3/reference-manual#usb_hid_host) which it appears you already determined based on the wording of your post.

It may be possible to send commands to a second PS/2 port based on same page you linked, https://wiki.osdev.org/"8042"_PS/2_Controller#Sending_Bytes_To_Device.2Fs, though the controller has not been updated (nor realistically will be updated) to make it aware of a second port.

My understanding is that the firmware converts the USB HID data to PS/2 (and vice versa). In theory the PIC24 firmware could be updated to work with more than one device or with "hub" support, but I do not anticipate this happening.

I'm sorry I could not be of more help.

Thank you,
JColvin

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...