Shop OBEX P1 Docs P2 Docs Learn Events
USB Keyboard with PS2 adapter.... — Parallax Forums

USB Keyboard with PS2 adapter....

Jorge PJorge P Posts: 385
edited 2010-07-15 03:09 in Propeller 1
Will a USB keyboard/Mouse work on the propeller with a PS2-to-USB adapter?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
http://WhatsAvailable.org Software and Gadgets for Windows 7.

Comments

  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2010-07-14 17:13
    I believe it depends on whether the keyboard encoder chip inside the keyboard has the capability to auto-recognize a PS/2 connection and subsequently generate signals according to that protocol.· Many of them currently do, but, apparently, not all of them.· I'd guess that fewer-and-fewer of them will provide that "backwards compatibility"·in the future as USB becomes more-and-more entrenched as the default standard.· That's probably a factor of the supply of keyboard encoder chips that are available to manufacturers (the last one I tried to look at was covered in "goop" as if it was a state secret).· But if the keyboard was sold with a PS/2 physical adapter (4-wire interface), then that would seem to basically imply that the encoder chip inside the keyboard is capable of·handling the·PS/2 protocol and connectivity.· I think that's the basics, but there might be more to it than that or some weird exceptions.· I have no idea what risks are involved (if·any)·in simply trying an adapter with a keyboard terminated with a USB plug.· If trying it, though,·you might want to connect to a machine that you can "sacrifice" (if something goes wrong).· It might (keyword "might") just be the case that a Propeller-based system is one of the more robost systems one could try in terms of avoiding (or minimizing) damage.· If something were damaged, you could likely narrow it down to one chip, the Propeller, but I'd guess that such a Propeller system·has a much less chance of being damaged than your average motherboard.
  • Jorge PJorge P Posts: 385
    edited 2010-07-14 18:19
    I've tested the keyboard (and mouse) with the PS2 connector on my PC and they both work fine. Does that mean that it will work, or is it that there may be a windows driver at work?

    I am going to try and test it, the keyboard is roughly 2 years old so I am not to concerned if anything breaks on it, I just dont want to damage the prop just yet.

    The mouse I dont like so I am hoping to fry it, it is one of the laser mice that dont have a ball. It just keeps jumping all over the place as I use my PC, so if it dont break I will place it behind, or infront, of my cars tire and give it some gas devil.gif . No, but I may disassemble it and see what kind of goodies are inside. It is new, but not worth returning to the store as it would take more in fuel than the cost of it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    http://WhatsAvailable.org Software and Gadgets for Windows 7.
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2010-07-14 19:32
    I'm pretty sure that means it has a very good chance of working with your Prop system and almost no chance of frying it. If that PS/2 keyboard (or mouse) doesn't work, try another one, particularly one advertised as PS/2 compatible (if it also does USB). Well, it might not be advertised that way, but if it comes with a PS/2 adapter, then such should be the case.


    I doubt that there's any "driver-magic" going on with your PC to somehow skip interpreting the signals from the PS/2 connector on the motherboard as anything other than PS/2 signals. That would be deceiving to the consumer, as it would suggest the presence of a PS/2 interface and the ability to use old-style PS/2-only devices (i.e., not USB), when, in fact, if such were the case, it couldn't actually use PS/2-only devices. It's worth speculating about, of course, but seems highly unlikely. I don't know about modern motherboards, but I believe that older ones employed a separate microcontroller to interpret the PS/2 mouse/keyboard signals. Perhaps things have changed a bit (such as incorporating such into a bridge chip or whatever), but it still seems likely that there is a hardware interface of some sort configured for PS/2 signals between the system CPU and the physical PS/2 connector on the motherboard. Of course, one way to verify that would be to plug an old-style PS/2-only keyboard or mouse into the connector on the motherboard and see if it works. Even if some kind of software-only solution were being used to interpret the PS/2 signals for use by the PC system, it wouldn't change the fact that the original signals were PS/2 signals. But you might not have an old-style PS/2-only device handy to try that. Nevertheless, I think you're quite safe in proceding with connecting to the Propeller based on the checking/thinking you've already done. Disclaimer/Full Disclosure: my knowledge about the P2/2 standard, motherboards and electronics in general is pretty limited; just trying to help. --Jim
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2010-07-14 19:56
    BTW:· Those adapters are just physical adapters that route the USB wiring to PS/2 wiring; there's no signal conversion going on inside.· Of course, it would be possible to put a chip inside such an adapter that could do protocol conversion (such might exist), but it'd likely be somewhat expensive, and is not what is typically supplied with a keyboard that can handle both (such keyboards typically having a "native" USB connector with a PS/2 adapter thrown in).· Therefore, if the keyboard can work as both a USB and a PS/2 keyboard, the "magic" is in the keyboard encoder chip inside the keyboard, not in that little adapter they supply or that one can purchase separately.· That is, the situation is somewhat analogous to those plug adapters that allow one to connect a US-style electrical plug to a European (or what/wherever) plug (and vice-versa).· The cheap ones only handle the physical part of the electrical connection; they don't change the voltage (between 110 and 220 V) or the line frequency (between 60 and 50 Hz).· The more expensive (and considerably heavier) ones advertised as such do so (at least for the voltage), but not the cheap (light)·ones.· Anyway, there's probably not much of a market for·a keyboard adapter that can do·USB-PS/2 protocol conversion because [noparse][[/noparse]1] many keyboards do that themselves, already, [noparse][[/noparse]2]·the PS/2 standard is a legacy connector that is rapidly disappearing from products, and, [noparse][[/noparse]3] keyboards have gotten so cheap that,·if one didn't have the kind that one needed (i.e., a PS/2 keyboard for an old non-USB system), one could just go out and buy one of the backwards-compatible keyboards that could handle both (USB & PS/2).· It's probably getting difficult to find a PS/2-only keyboard.· Hmm...check that:· Parallax sells a nifty small one (with a PS/2 connector-terminated cable), though it's advertised as only being intended for use with the Propeller (i.e., not guaranteed for use with a PC system).· While on the subject, I think it's ingenious that those keyboard engineers figured out a way to make their keyboards backwards compatible (i.e., sense what kind of connectivity was being used on the PC-end).· And I'm glad that such is the case so that we propellerheads can have a nice 2-pin keyboard interface (or 1-pin interface using Cluso's solution).· I do wonder how long the easy availability of cheap PS/2-capable keyboards will persist, but I guess it will be awhile.· I attended the Computex show in Taipei and spoke with a Chinese maker of keyboards that can offer PS/2 keyboards in large·quantities for around·$2.50 a piece (not the cute little ones, unfortunately), whereas the USB-capable keyboards cost more, perhaps partly due to licensing matters.·

    Post Edited (JRetSapDoog) : 7/14/2010 8:15:11 PM GMT
  • TimmooreTimmoore Posts: 1,031
    edited 2010-07-14 20:07
    I looked a the code one time for a PS2/USB mouse and its the mouse end that detects PS2/USB. It looked at whether the connections were high or low during power up. PS2 has pullups so its high, USB will be low. It then ran different code for the 2 interfaces.
    I have run across a keyboard that didn't work on the prop even though it worked as a PS2 with a PC (it was a USB/PS2 keyboard). I didn't track down what the problem was, I suspect it was because the prop was 3.3V signals and the PC was 5V but I just used a different keyboard and it was the only one out of a few I have tried that didn't work.
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2010-07-14 20:31
    About the PS/2 keyboard that didn't work with the Prop, that's good to know, Timmoore. I recall reading that before, too, now that you mention it. Fortunately, in general, it seems that most PS/2-capable keyboards seem to work okay with the Prop. I've tried two different ones (with the adapter) that do, anyway (though maybe I got lucky). And you've have good luck, overall. @Jorge, based on what Timmoore reports, if your USB-PS/2 keyboard with a PS/2 adapter doesn't work with your Prop system, probably try another keyboard (perhaps from a different mfg.), though that's kind of stating the obvious. Anyway, don't assume that you've done something wrong or that there's something wrong with your Prop system, per se. Who knows, it could just be a slight timing problem with respect to the driver or perhaps something voltage-wise that puts it just out of spec, so to speak. In general, such should work. Again, though, the keyboard (at least at a minimum) must have the PS/2-recognition and protocol ability built in, which yours apparently does. Give it a try! Or would you like a money-back-guarantee if something fries? Hmm...after all of this, I might be liable (as court matters go these days), though I hope that you (or the court) will limit my liability to the 8-buck cost of a Prop (in single-piece quantity).
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-07-15 03:09
    When I did my 1pin driver I found that the timing on some keyboards was out of spec. This could be the reason the prop driver does not work with some keyboards.

    I don't believe you can do anything to kill either the prop or keyboard or mouse by trying the adapter. They are just wires and the prop (provided you are using the resistor circuit) and the series resistors will protect the devices.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
Sign In or Register to comment.