element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Forum USB keyboard decoder
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 11 replies
  • Answers 4 answers
  • Subscribers 531 subscribers
  • Views 3373 views
  • Users 0 members are here
  • fpga
Related

USB keyboard decoder

ahmedmohamed85
ahmedmohamed85 over 4 years ago

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?

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 4 years ago in reply to ahmedmohamed85 +3 suggested
    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…
  • michaelkellett
    michaelkellett over 4 years ago in reply to ahmedmohamed85 +3 verified
    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…
  • michaelkellett
    michaelkellett over 4 years ago +2 suggested
    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…
  • michaelkellett
    0 michaelkellett over 4 years ago

    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.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • ahmedmohamed85
    0 ahmedmohamed85 over 4 years ago in reply to michaelkellett

    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

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 4 years ago in reply to ahmedmohamed85

    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

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • narrucmot
    0 narrucmot over 4 years ago

    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

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 4 years ago in reply to narrucmot

    @ Tom,

    If Ahmed is already running Linux  - it would make sense - can you interface low speed USB to Artix without a USB phy ?

     

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ahmedmohamed85
    0 ahmedmohamed85 over 4 years ago in reply to michaelkellett

    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

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ahmedmohamed85
    0 ahmedmohamed85 over 4 years ago in reply to narrucmot

    Unfortunately its not possible to use Petalinux in this project

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 4 years ago in reply to ahmedmohamed85

    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

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • narrucmot
    0 narrucmot over 4 years ago in reply to michaelkellett

    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

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 4 years ago in reply to michaelkellett

    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 image

    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

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube