Shop OBEX P1 Docs P2 Docs Learn Events
Alternative PC Kybd & Mouse hardware — Parallax Forums

Alternative PC Kybd & Mouse hardware

nyznyz Posts: 6
edited 2007-07-16 13:05 in Propeller 1
Hi All,

Does anyone know if its possible to get PS2 keybd & mouse compatible hardware? e.g. :

1 : A bunch of ( perhaps panel mounted) momentary push switches that when pressed send PS2 kybd presses.

2 : An X/Y controller, or other controller that would send the appropriate mouse XY over PS2.

I think that with the bonus of having kybd/mouse drivers for the prop, this would be useful where kybd commands & mouse movement are used for control, but when I want to be able to build a custom design. i.e. I dont have to use a standard kybd and mouse (which I hate! because gives me such a shoulder pain!)

cheers
Dave

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-07-15 10:53
    You can easily augment the mouse driver to know different hardware... I think this is one of the strengths of the COG concept to standardize the S/W interfaces. I am exactly doing this with a cheap incremental encoder (ALPS EC12, around $3,- ) that will emulate x-movement of a mouse. Same can be done for similiar prized resistor based joystick modules. They however need an ad-hoc ADC (a capacitor smile.gif ) to allow a (albeit unprecise) reading of their values...

    Post Edited (deSilva) : 7/15/2007 1:40:58 PM GMT
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-07-15 13:00
    1) You could just use an old keyboard, remove the keyboard and wire up your own matrix.
    2) Mice with balls have optical encoders, it would not take much effort to remove them and wire up other encoders or a pulse generator circuit controlled by a potentiometer joystick.

    Or you could go full custom. I don't unfortunately know of any convenient PS/2 driver chips to make it super simple.

    Graham
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-07-15 13:54
    Dave,

    In answer to your question, sure it's possible. In fact, I'm surprised I haven't seen an object to do this yet. I did something similar years ago using a PIC, that would send PS2 keyboard codes. Based on that experience, I know that the Propeller is fully capable of doing the same. There are a few objects that go the other way around and read a Keyboard or Mouse, so I know all of the information is there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • gwk_auburngwk_auburn Posts: 6
    edited 2007-07-15 21:08
    If you have free input pins you can setup your own input matrics. I used a 4x4 keypad and this code to scan.


    OBJ
    text : "tv_text"

    VAR
    long key,row,col

    PUB start | i
    text.out($00)
    text.start(12) 'start terminal
    text.str(string($A,1,$B,1))

    repeat
    getkey
    text.hex(key,1)

    pub getkey
    dira[noparse][[/noparse]23..20]~~ 'output columns
    dira[noparse][[/noparse]19..16]~ 'input rows
    col :=1
    repeat
    outa [noparse][[/noparse]23..20] := !col 'pull one column low at a time
    row := ina[noparse][[/noparse]19..16]
    if row <> $f 'if low row, look at $colrow
    key := lookdown(ina[noparse][[/noparse]23..16]: $ee,$de,$be,$ed,$dd,$bd,$eb,$db,$bb,$7e,$7d,$7b,$77,$e7,$b7)
    waitcnt (10_000_000+cnt)
    waitpeq ($f0000,$f0000,0) 'wait key release
    quit
    col := col*2 'col = 1,2,4,8
    if col >8
    col := 1
  • nyznyz Posts: 6
    edited 2007-07-16 07:08
    A good site I've recently found is Bill Buxton's :

    http://www.billbuxton.com/InputSources.html

    from which I found this place

    http://www.electroneamericas.com

    which has pretty much exactly what I want. They do modular keyboards in 8x8 and other layouts. Normal (cheap) and industrial (very expensive!)

    Still looking down Bill's extensive list...

    cheers
    Dave
  • nyznyz Posts: 6
    edited 2007-07-16 13:05
    I decided to quickly hack apart a ps2 kybd. There is a 2x15 connector for the matrix on the pcb, which goes to an old 8049ucontroller and then out the ps2 connector.

    I wrote a minimal quick prog to output the symbol / hex code to my vga display. Enclosed below...

    cheers
    Dave
Sign In or Register to comment.