Connect with us

Interface a USB computer keyboard.

Discussion in 'General Electronics Discussion' started by Frankontheinterweb, Feb 12, 2012.

Scroll to continue with content
  1. Frankontheinterweb

    Frankontheinterweb

    2
    0
    Feb 12, 2012
    Hello,
    Would anyone know how i could get the data of the keystrokes from the keyboard.

    It's a USB connection and i can't find anywhere online that tells me how to get say ASCII codes from the usb keyboard.

    What i would like to do it be able to get the data and be able to see bit by bit the ASCII code.

    Could anyone give me any hints or suggestions on where to go from here?

    Thanks
     
  2. Raven Luni

    Raven Luni

    798
    7
    Oct 15, 2011
  3. Harald Kapp

    Harald Kapp Moderator Moderator

    9,659
    2,019
    Nov 17, 2011
  4. Raven Luni

    Raven Luni

    798
    7
    Oct 15, 2011
    If youre using simple bit banging it shouldnt matter - as long as youre following the protocols correctly.
     
  5. Harald Kapp

    Harald Kapp Moderator Moderator

    9,659
    2,019
    Nov 17, 2011
    Right.
    The tricky part is following the protocol.
    Personally I think this is easier using a UART protocol than a USB HID protocol.
    But then again, I'm only a hardware guy.

    Harald
     
  6. Raven Luni

    Raven Luni

    798
    7
    Oct 15, 2011
    Probably right. I'm only a software guy :p
     
  7. Frankontheinterweb

    Frankontheinterweb

    2
    0
    Feb 12, 2012
    Right thanks guys,
    I did look into ps/2 keyboards, but as i have thrown out my old keyboard i would have to buy another (this is why i wanted to use usb). Though there does seem to be alot more documentation on the ps/2 keyboard interfacing.

    The USB protocol seems amazingly complicated. It there anywhere on the web that gives info on someone who has done something similar? Rather than reading long protocol specifications.

    Thanks for the help. If worst comes to the worst i will buy a ps/2 keyboard, as i saw some pretty good documentation on that.

    Thanks
     
  8. Raven Luni

    Raven Luni

    798
    7
    Oct 15, 2011
    A keyboard will never use anything above 1.1 so that narrows the list a bit. I dont know of anyone personally whos working with it but I plan to at some point with my z80 projects (that doesnt help you right now though). You might want to try the linux community.
     
  9. Raven Luni

    Raven Luni

    798
    7
    Oct 15, 2011
    Then again theres probably an arduino module or something similar you could get. I wouldnt know much about that stuff though (I'm allergic to over-simplification :p )
     
  10. Harald Kapp

    Harald Kapp Moderator Moderator

    9,659
    2,019
    Nov 17, 2011
    You know that there are USB-to-PS/2 adapters? Starting at 1€ on the internet.

    Harald
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-