Shop OBEX P1 Docs P2 Docs Learn Events
Keyboard Emulator? PS/2 signals to computer — Parallax Forums

Keyboard Emulator? PS/2 signals to computer

DaemonDaemon Posts: 6
edited 2010-08-04 15:40 in Propeller 1
Hi there,

Looking through the OBEX, I'm wondering: There's a lot of work done on reading and using the input of keyboards, mouse and other input devices.·But has any work been done on emulating the PS/2 signals to a computer? The idea would be to take input from a keyboard (which is simple, given the available objects ·in OBEX) process it on given properties from the input (i.e. do with it whatever the heck I want to do with it) and depending on the input, send output to the PS/2 input of a computer. (Still with me? ;-) )

Has anybody any hint / clue / object about how to do that?


Thanks in advance.

Comments

  • KyeKye Posts: 2,200
    edited 2010-08-01 16:16
    No one's done it because the people who know how to do it aren't really interested in doing that.

    http://www.computer-engineering.org/

    This website has the protocol for you to follow however. Its alot of work but it can be done.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • TimmooreTimmoore Posts: 1,031
    edited 2010-08-01 16:50
    Sparkfun have a keycounter with source, its in c and for an atmega168 but between that and the reference Kye gave you should be able to work out what to do.
    http://www.sparkfun.com/commerce/product_info.php?products_id=8652
  • TimmooreTimmoore Posts: 1,031
    edited 2010-08-01 16:50
    Sparkfun have a keycounter with source, its in c and for an atmega168 but between that and the reference Kye gave you should be able to work out what to do.
    http://www.sparkfun.com/commerce/product_info.php?products_id=8652
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2010-08-01 17:13
    Let me know if you bother, Daemon. I've had to deal with this issue, looked up the specs on PS/2 and think it is unlikely to work with my skill set. I have needed to get date from SX chips to Flash programs on a PC but Flash can't talk to a serial port, so I did it with keypresses.

    Solution 1: I used an IPAC keyboard encoder for the arcade machines (i had a spare, www.ultimarc.com ) and high line signals ended up as keystrokes. I used a USB IPAC on the receiver for a set of wireless game show buttons because I was worried that PS/2 ports are on their way out.
    Solution 2: Serial port to keyboard buffer redirector (like sertokey, easily found online)
    Solution 3: Write up a PS/2 object. I second Kye in the discovery that the people who know how to do it are not interested in doing so.
    Solution 4: Write up a USB HID-object. I've seen kits for this on nuts and volts magazine but they are a bit pricey. From what I can tell, the prop well set up for USB work (but I may be wrong)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Talbot
    New Market, MD, USA
  • DaemonDaemon Posts: 6
    edited 2010-08-01 19:58
    Invent-O-Doc said...
    Solution 3: Write up a PS/2 object. I second Kye in the discovery that the people who know how to do it are not interested in doing so.
    Heh.. Talk about irony.. :P
    Hmm... I'm still quite a noob when it comes to Propeller, but I'm not entirely clueless.. The link to Computer-engineering.org provided a LOT of information about what the protocol is supposed to look like and I'm going out on a limb here, but I'd say it should be pretty easy to write a couple of bits out to something like a ps/2 port. At least looking at the matrial on that website.
    It just strikes me as surprising.. :P All this work done on reading keyboards, and nothing on writing signals from something emulating one.. It's Way less complex than some of the objects I see here on the OBEX and yet there's nothing on it.. Oh well, maybe because it indeed isn't interesting to do.. I might post an object for this, but don't hold your breath. I have something resembling a Propeller kit, but need new parts.. I'll get those after I come back from vacation.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-08-01 23:41
    Re "Solution 3: Write up a PS/2 object. I second Kye in the discovery that the people who know how to do it are not interested in doing so."

    It may not be irony. It may be because such a device could be used as a keyboard sniffer to steal passwords.

    Of course, if you want to code such a thing, it will be some spin and some pasm and anyone who codes this will learn a lot about propeller programming, so much so that they could be considered an expert programmer. And that can only be a Good Thing!

    There is a simpler solution too - use the propeller to translate keyboard to serial RS232, and read the serial data into the PC via a $2 USB to serial adaptor. The code to do this already exists - keyboard object and serial object and tie them together with a couple of lines of spin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
  • blittledblittled Posts: 681
    edited 2010-08-02 01:10
    I've been toying with an idea for a winter project which is to build an arcade machine. The control board running the track ball, joysticks, and buttons would be either the Propeller or the FEZ Domino. If I go with the Propeller I would be interested in the PS2 keyboard emulator so I would be willing to help with it. The FEZ Domino is the easier solution since they just released a SDK that permits keyboard emulation through a USB client.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Will work for Propeller parts!
  • anhingusanhingus Posts: 10
    edited 2010-08-04 15:40
    perhaps to accomplish your intent, you can use vince briel's pocket terminal object.

    i did a simple qbasic terminal routine for talking with the pocket terminal. one line of 6 or so following an input request was: if a$="[noparse][[/noparse]" then shell.

    poof - you are now talking to dos and can run anything you want to in the way of editors, programs, etc, using the pocket terminal - or demo board - as input to your computer.

    haven't done it yet, but since the most excellent decimalbasic can address any serial port in the computer system, i expect the same thing will work in windows xp environment.

    [noparse][[/noparse]with qbasic you are limited to addressing either com1 or com2]
Sign In or Register to comment.