Connect a PS/2 keyboard to a microcontroller

The guys at Nerdkits have put together this tutorial on connecting a PS/2 keyboard to a microcontroller. Though this tutorial is written for one of the kits they sell, you should be able to apply this to pretty much any microcontroller. It is also a lesson in using interrupts instead of polling. They have several pre built examples ready to download as well as source code for the basic setup.

[via HackedGadgets]

Comments

  1. biozz says:

    is it really that hard to do it? i never found any need for a tutorial on this XD

  2. I once did this with bascom-avr… it has an integrated routine

  3. Agent420 says:

    It’s not that hard, but it’s different enough from std serial that you’ve got to think about it for a second.

    I have BASIC PS/2 code in my touchpad avr project…

    http://hackaday.com/2009/07/20/touchpad-and-vfd-hacking/

  4. sneakypoo says:

    @biozz: Can I touch you?

  5. biozz says:

    @Agent420
    first off LOVE the name XD, and thanks ill look in to it :3

    @sneakypoo … i get that allot … but yes you can touch me any time :3

  6. tom61 says:

    Much more impressive and a bit more useful, IMO, is bit-banging low speed USB host for HID devices like keyboards and mice. I don’t know a good guide for that off-hand, though.

    PS/2 keyboards are slowly getting harder to find, and a fairly new hacker is not very likely to have them just laying around. Additionally, really small keyboards which would be great for smaller projects that need input are USB only and will not work with passive USB to PS/2 adapters.

  7. Amnon says:

    I have used back on 2006 the reading of 2 PS2 optical mouse as a feed back for a robot navigation .

    and the protocol is very close to the keyboard one.

    this is a demo of the robot with just the optical mouses http://www.youtube.com/watch?v=_dBV5sSMCis

    and 2 platphorm working togther

  8. Amnon says:
  9. Entropia says:

    Very nice tutorial. Need moar like this.

  10. niquez says:

    Advantageously, the article is actually the freshest on this noteworthy topic. I fit in with your conclusions and will thirstily look forward to your future updates. Saying thanks will not just be adequate, for the fantasti c clarity in your writing. I will immediately grab your rss feed to stay informed of any updates. Admirable work and much success in your business dealings!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,369 other followers