Shop OBEX P1 Docs P2 Docs Learn Events
connecting keyboard — Parallax Forums

connecting keyboard

brandanbrandan Posts: 52
edited 2014-06-17 09:06 in Propeller 1
How do I connect a keyboard to the propellor? I didn't see anyplace saying how to do this.

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-06-16 20:05
    brandan wrote: »
    How do I connect a keyboard to the propellor? I didn't see anyplace saying how to do this.
    Google "parallax propeller ps/2 keyboard" as there are many relevant links there. Be aware that this is mainly for PS/2 keyboards but there are some USB keyboards which will also work as a PS/2 and sometimes these come with a USB to PS/2 adaptor, however the smarts are in the keyboard and you can use a normal USB socket but wire as a PS/2 with clock and data.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-06-16 21:19
    There's demo code in the Propeller Tool's library which uses a keyboard. The Propeller tool also has a schematic for the Propeller Demo Board under "Help". The Propeller Demo Board includes a keyboard connection so you can use this schematic to see how to hook up your own keyboard.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-17 01:00
    If you can buy a keyboard that has a PS/2 to USB adapter included, that is a sure bet it will work with the Propeller PS/2 keyboard code. There is code in OBEX and in the Examples section of the Propeller IDE, called the Propeller Tool

    http://www.adafruit.com/products/857

    http://www.parallax.com/downloads/propeller-tool-software.

    If you are using Brad's Spin Tool or SimpleIDE, you don't get than nice library of Examples unless you copy it over from the Propeller Tool software package (requires installing the same on a Windows machine).

    +++++++++++
    Wiring the keyboard or mouse requires +5 VDC and the conventional PS/2 lines with pullup resistors. The Propeller Demo Board or the Propeller Proto Board have schematics that show how to properly wire for these.

    +++++++++++
    I suppose that you can make an adapter for a USB keyboard to PS/2, but I just saved the one's that came with keyboards that have since died.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-06-17 01:15
    If you can buy a keyboard that has a PS/2 to USB adapter included, that is a sure bet it will work with the Propeller PS/2 keyboard code. There is code in OBEX and in the Examples section of the Propeller IDE, called the Propeller Tool

    http://www.adafruit.com/products/857

    http://www.parallax.com/downloads/propeller-tool-software.

    If you are using Brad's Spin Tool or SimpleIDE, you don't get than nice library of Examples unless you copy it over from the Propeller Tool software package (requires installing the same on a Windows machine).

    +++++++++++
    Wiring the keyboard or mouse requires +5 VDC and the conventional PS/2 lines with pullup resistors. The Propeller Demo Board or the Propeller Proto Board have schematics that show how to properly wire for these.

    +++++++++++
    I suppose that you can make an adapter for a USB keyboard to PS/2, but I just saved the one's that came with keyboards that have since died.

    The adaptor is just a dumb gender bender plus it's bulky so if you are designing in a keyboard socket then skip the old old PS/2 and just make it a USB socket but wired for PS/2. This is what I have done for several of my products plus I have solder jumpers for the USB socket so that I could use it as pure USB (though that is very resource hungry).
  • cavelambcavelamb Posts: 720
    edited 2014-06-17 07:30
    The adaptor is just a dumb gender bender plus it's bulky so if you are designing in a keyboard socket then skip the old old PS/2 and just make it a USB socket but wired for PS/2. This is what I have done for several of my products plus I have solder jumpers for the USB socket so that I could use it as pure USB (though that is very resource hungry).

    Pinout PS2 - USB.jpg


    A long dissertation on using a keyboard with a microcontroller
    http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM014.pdf

    Interrupts (yech!), protocols and scan codes
    http://www.nerdkits.com/videos/interrupts_and_ps2_keyboard/
    1024 x 609 - 58K
  • brandanbrandan Posts: 52
    edited 2014-06-17 09:06
    I found what I was looking for.
Sign In or Register to comment.