Shop OBEX P1 Docs P2 Docs Learn Events
PS2 Keyboard input — Parallax Forums

PS2 Keyboard input

aladasaladas Posts: 18
edited 2008-02-12 11:25 in BASIC Stamp
Has anyone got any idea about how to use a PS/2 keyboard for input to a BS2? I have a USB keyboard which says it can function as a PS2 keyboard and I also have a PS2->USB adapter and a PS2 Socket which I made up to take input from a Haicom GPS unit. I see there is a keyboard unit from Parallax which appears to be part of a Propeller kit, but I can't find any sign of guidelines or sample code to let a BS2 use it as input. I do see threads out there about using a BS to send PS2 mimicking a keyboard's input back in to a PC with a PS2 socket, but of course that is not my objective.

In a generic way there seem to be a lot of concern for output to humans and input from them and on the output side the options include debug, LEDs, tones, morse,
and LCDs but input seems to rely on button presses, debug (or serial from PC via Serin) with possibilities via IR Remote, RC and bluetooth. Many of these will depend on havng one of a laptop or a second Stamp and it seems to me that taking a keyboard out in the field may be easier than those. I feel the keyboard solution cannot be new and is quite econonical of pins and that it is just that I can't yet find anyone's earlier solutions. Help!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-02-03 01:22
    If I've read what others have posted correctly the ps/2 keyboard uses syncronous serial and can be read using shiftin. You would need to know the scan codes the kbd outputs though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-02-03 01:53
  • MikeKMikeK Posts: 118
    edited 2008-02-03 03:10
    For $9.95 you can get 3 Picaxe 08M's, which has a KEYIN command that will read a PS/2 keyboard. Depends on how fancy you want to get.
    www.phanderson.com/picaxe/
  • aladasaladas Posts: 18
    edited 2008-02-12 10:35
    The picaxes sound very interesting - indeed for other purposes as well and will repay getting the kit and the progam editor - in fact as I am in the UK they are even cheaper here. For the moment though, have you or has anyone on the Stamp forum ever done this? Wiring diagrams ... pbasic code...? I am pretty new to all this and am the world's worst solderer.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2008-02-12 11:25
    This question comes up often so you might want to do a search on the Basic Stamps forum for keyboard or PS2.

    Here is a project using common IC chips that I built from someone else's design. It works ok but there are cheaper (or less chip count) methods like using a PIC or PAK or maybe even an SX28 chip perhaps·(as stated earlier in this post - or other postings from the search).

    http://forums.parallax.com/showthread.php?p=629467
Sign In or Register to comment.