Hi,
i have a project where i need to interface Artix7 FPGA, with usb keyboard, what is the best module or component to do this?
Hi,
i have a project where i need to interface Artix7 FPGA, with usb keyboard, what is the best module or component to do this?
You need to tell us a lot more about the project.
Do you want to do this once, or for production.
Do you care about cost.
Is you FPGA on a board or will you be designing a board.
Is this a task you have been set for study or do you just need the quickest way of getting keyboard data into the FPGA.
Ar you running a soft processor on the FPGA or must the keyboard talk directly to RTL ?
Do you mean a music keyboard or a computer keyboard ?
etc etc.
The answers will be different for every application.
Thanks for your reply
1- this project is not for large scale production
2-i dont care about cost but i care about reliability
3- i will be designing the board using FPGA module and dip componenets or soic components
4-its not a study task, i need the fastest way
5- i mean pc keyboard
I think the best quick and dirty way to do it is with something like this:
https://www.hobbytronics.co.uk/usb-host-keyboard
There are several such devices around, best look somewhere local to you, or maybe Amazon for one in stock and cheap.
Then it will be really easy to add a UART style interface to your FPGA.
Or you could try one of the modules from FTDI that uses theri Vinculum device.
https://www.ftdichip.com/Products/ICs/VNC2.htm
MK
At the risk of over-engineering this, and depending on what your software requirements are, a possible solution here is to run PetaLinux on a MicroBlaze in the Artix-7 FPGA device, and then plug in any USB keyboard of your choice.
--Tom
@ Tom,
If Ahmed is already running Linux - it would make sense - can you interface low speed USB to Artix without a USB phy ?
MK
Thanks a lot for this information, but i have a last question, in my board there is 5v to 3.3v level shifters, can i use them and connect directly to ps2 keyboard wires ? I mean ps2 data and ps2 clock
Unfortunately its not possible to use Petalinux in this project
I don't see why not, PS/2 interface uses open collector drivers with the pull ups normally to 5V. If there are no pull ups in the keyboard
and you don't want to talk back to the keyboard, you might be able to pull up to only 3.3V.
It's still worth having something between the FPGA and the keyboard to give it some protection, the keyboard will need 5V power.
MK
You are correct - I believe one would also need a USB PHY on the board (and accompanying USB IP in the FPGA). Perhaps I have been playing with Zynq and ZU+ designs for too long. I had overlooked some of the complexities of a pure FPGA design with a MicroBlaze.
Cheers,
Tom
I had a play with the idea - there is a snag - of course PS2 keyboards work the way they are described and if you connect one to power with the required 2 pull up resistors it works just the way you expect.
The cheap little USB Keyboard to PS2 motherboard adaptors don't contain any works (tested three different ones) - just 4 straight through connections .
The keyboard has to know how to do PS2, I tried an HP USB keyboard and a Logitech K200 keyboard with the PS adapters and neither would work
It's hard to find out, but the rumour on the web is that modern USB keyboards don't have any support for PS2.
The good news is that you can buy a new PS2 type keyboard from Amazon for less than the Hobbytronics USB to UART converter - I suggest you consider that.
But do take a look at the PS2 keyboard protocol - it's a bit of pain to work with.
MK