Shop OBEX P1 Docs P2 Docs Learn Events
did anybody build an USB-keyboard to serial adapter? — Parallax Forums

did anybody build an USB-keyboard to serial adapter?

StefanL38StefanL38 Posts: 2,292
edited 2009-07-28 21:13 in Propeller 1
Hello,

I know PS/2-keyboards and mice are still available and can be directly connected to the propeller
and there are drivers for it.

Anyway I would like to ask

did anybody build a USB-keyboard to serial adapter?
NOT directly to the propellerchip as I know that this is very difficult.
But by using any kind of additional hardware Atmel 90USB1287 FTDI-chips or what ever

I mean connect a PURE USB-keyboard (which has NO PS/2-protocol implemented) to this adapter
and the adapter is outputting serial string messages or is outputting on PS/2-protocol ?

best regards

Stefan

Post Edited (StefanL38) : 7/28/2009 4:36:39 PM GMT

Comments

  • LeonLeon Posts: 7,620
    edited 2009-07-28 14:53
    It's difficult, because host mode is required on the USB interface. It could be done with a Vinculum chip, or a PIC or something like it with USB OTG.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • SamMishalSamMishal Posts: 468
    edited 2009-07-28 18:37
    Stefan,

    There are converter plugs that cost a few $ that convert a USB board to PS2

    I did not open one of them so I do not know what is inside. However from the size and

    looks of it, it seems to me just a matter of wiring.



    These plugs convert the purely USB keyboard to a PS2 and work perfectly even on

    PCs that predate the USB era and do not know anything about a USB (like Windows 95).

    I have one and I use it with my antiquated PC running W95 and Even a sometimes with the

    DOS 6.2 machine that I keep for the sake of running some REAL old programs.



    The USB keyboard works perfectly with the plug converter....it is about an inch by two

    by 1/4 inch thick with a female USB on one end and a PS2 on the other.



    I bought it from CompUSA back when they were still a store.



    Samuel
  • localrogerlocalroger Posts: 3,452
    edited 2009-07-28 18:59
    SamMishal, those wiring-only converters only work with keyboards whose electronics are PS/2 aware. They don't convert USB to PS/2, they depend on the keyboard doing a check and going into PS/2 mode (with the pins on its USB connector redefined so that they work as redirected by the PS/2 adapter).

    There are also converters for converting PS/2 keyboard/mice to USB for people who have PS/2 peripherals and newer computers with USB ports only. But I've never seen a commercial device that goes the other way, adapting a pure USB keyboard or mouse that isn't PS/2 aware for PS/2 service. The market for such a thing would be extremely limited (mainly to industry) and it would probably be very expensive if anyone bothered to make it.

    In DIY land you would need a controller capable of doing USB host mode and running the PS/2 interface at the same time.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2009-07-28 19:00
    I believe you may be looking for an adapter like this:

    http://www.microcenter.com/single_product_results.phtml?product_id=0280942

    It is supposed to work with USB only keyboards and may have a bit more smarts inside than just mapping pins from one connector to another.

    Robert

    Post Edited (RobotWorkshop) : 7/28/2009 9:34:55 PM GMT
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-07-28 19:02
    Hello Sam,

    I think most keyboards do (still) support both protocols USB and PS/2. But how long will this be available ?

    So this kind of plug-converter will only work with USB / PS/2-keyboards but not with pure USB-keyboards

    best regards

    Stefan
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2009-07-28 19:41
    USB to PS2 adapters are a simple relayout of pins to a different connector. For a USB keyboard/mouse to work on a PS2 port, however, it must support the PS2 protocol. Usually the box or device will state "PS2 compatible" or "USB/PS2". Sometimes they even come with a USB-PS2 adapter. (the two PS2 compatible keyboards I have came with adapters).

    More info:

    USB to PS2 Pinout:
    pinouts.ru/InputCables/usb_ps2_mouse_pinout.shtml

    PS2 Protocol:
    www.computer-engineering.org/index.php?title=PS/2_Mouse/Keyboard_Protocol

    There are numerous active devices on the market that utilize only PS2 (think dumb terminals, thin clients, machinery, etc) so PS2 mice and keyboards have a long way to go before they are end of life.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    IT / Web / PCB / Audio
  • Marka32Marka32 Posts: 41
    edited 2009-07-28 21:13
    Is there a particular reason for this? What are you trying to do? Is there a particular keyboard that you are trying to convert? There are ways to do it, but I wonder if maybe just chopping off the USB hardware would make it easier. Or, buying a bare keyboard (which will likely have much better quality than a Pee-Cee keyboard) and wiring it for serial output. I haven't checked the catalogs lately for the chips, but I'm sure there are still keyboard chips available. Or, use an old PC/XT keyboard, and convert the scan codes. Or use just the controller.
Sign In or Register to comment.