Shop OBEX P1 Docs P2 Docs Learn Events
PS/2 Interface Driver — Parallax Forums

PS/2 Interface Driver

jburke71jburke71 Posts: 10
edited 2008-05-08 21:08 in Propeller 1
Hey All,

I'm thinking about working on a project that will require interfacing to a computer via the PS/2 port. I'm not familiar with the PS/2 spec, so I thought I would ask for some guidance and/or resources.

A couple of questions:

1.) Has anyone done this? If so, how did you go about doing it.
2.) Is there an existing driver? If not, what's the best way to go about creating one and are there resources for the PS/2 spec?
3.) Would it be easier to use USB instead of PS/2?

My understanding of the PS/2 interface (what little I have) has come from interfacing a keyboard with the Prop using the existing drivers, but with this project, I want to go from the Prop to the Keyboard input on the computer. I think that's enough to start with. Any thoughts, ideas, suggestions or pointers are greatly appreciated.

Thanks,

Jason

PS: As an interesting aside, part of this project might include designing a binary keyboard for my girlfriend's father. As a result of a childhood accident he's blind and missing both hands. A challenge to be sure, but my thought was to use a three button interface (1, 0 and <enter>) to input binary ASCII codes for each letter along with an attached speaker to say the letter after every 8 bits. The <enter> button is either for an actual enter key, or to send the letter to the computer.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There's nothing to see down here. Move along...

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-05-08 16:04
    Yes, the Demo Board already has 2 PS/2 connectors on it, and there are drivers for both mouse and keyboard located in the home directory of the Tool: (mouse.spin and keyboard.spin), btw PS/2 is much easier than USB.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 5/8/2008 4:09:37 PM GMT
  • jburke71jburke71 Posts: 10
    edited 2008-05-08 16:56
    Paul Baker (Parallax) said...
    Yes, the Demo Board already has 2 PS/2 connectors on it, and there are drivers for both mouse and keyboard located in the home directory of the Tool: (mouse.spin and keyboard.spin), btw PS/2 is much easier than USB.

    Hi Paul,

    Thanks for the quick response and info. I've actually wired up (on a breakout board) a PS/2 input for my Prop Education Kit, and connected a keyboard to it and used the drivers to read from the keyboard.

    However, I want use the Prop as a custom keyboard controller (i.e.: send keyboard make/break codes to PC via PS/2 port based on button pressed), and it doesn't look like the keyboard driver supports doing this. I could only find methods to read the keyboard state.

    Jason

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There's nothing to see down here. Move along...
  • Agent420Agent420 Posts: 439
    edited 2008-05-08 17:21
    yeah, there's a difference between reading a keyboard and emulating one.· The protocol is the same, but you're on the other side of the master / slave device fence.

    I've done a couple of ps2 projects in the past, but I'm fairly new to the Propeller.· A quick glance at the ps2 demo files suggests that it only offers the keyboard input functionality.

    here's the reference material I've used in the past...· Hope it's some help.

    http://www.burtonsys.com/ps2_chapweske.htm
  • jburke71jburke71 Posts: 10
    edited 2008-05-08 18:42
    Agent420 said...
    yeah, there's a difference between reading a keyboard and emulating one. The protocol is the same, but you're on the other side of the master / slave device fence.



    I've done a couple of ps2 projects in the past, but I'm fairly new to the Propeller. A quick glance at the ps2 demo files suggests that it only offers the keyboard input functionality.



    here's the reference material I've used in the past... Hope it's some help.



    http://www.burtonsys.com/ps2_chapweske.htm

    Thanks for the reference. It seems to be the only thing out there when I do a google search for "PS/2 Keyboard Interface|Protocol".

    After reading this article (and another one by the same author), I'm wondering if I can use one of the serial drivers for this. A PS/2 keyboard is, after all, talking to the PC serially. The timing might need to be more exacting though. Hmm...

    Thanks for the thoughts Agent420, very helpful.

    Jason

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There's nothing to see down here. Move along...
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-05-08 21:08
    There was someone on the forums here that was working on PS2 output to a computer. It may have been deSilva but I can't remember. Try having a look in the obex, OBCs project index and the prop magazines here http://forums.parallax.com/showthread.php?p=716256
    http://forums.parallax.com/showthread.php?p=717404
    http://forums.parallax.com/showthread.php?p=721797
Sign In or Register to comment.