PS2/USB

Coyoteboy

Senior Member
I was just looking through a few ideas, one of which was interfacing with an optical mouse via the PS2 connection (simple 1-wire serial comms) when I realised lots of cheap mice are USB these days, but they usually come with a USB>PS2 converter. Considering the PS2 and USB dataflow protocols are totally different (USB being 2-wire to start with), this means the converter must be something more than just a re-wiring system (like the old 9-25 pin serial converters used to be). So in theory you could communicate directly with your USB mouse (or any USB item) via a PS2 style interface (just 5v, gnd, clock and data). Has anyone done anything similar, im sure I must be re-working the wheel here? I wasnt planning on implementing it on an 'axe as I fear the packet decoding may push the program space too far, but its interesting nonetheless.
 

alband

Senior Member
I think it entirely depends on the converter.
Say you have a PS/2 mouse and it came with a PS/2 to USB converter; this would just be a re-wiring converter and the drivers on the PC would do the rest.
Say you have a USB mouse that has a converter to convert USB into PS/2; that would have circuitry in it, but it would be designed to convert only the commands that that mouse gives into standard PS/2 format. I may be wrong, but I don't think you could take a USB to PS/2 converter from one type of mouse and expect everything to work on another.
It could be worth a try though...
 

InvaderZim

Senior Member
Being that the ones I have were both old and cheap, I'd assumed the USB-to-PS2 adapter I had was only an electrical adapter, that is, it only gets wire A to pin X. And that the "smarts" were in the mouse itself; therefore, the adapter would only work for a USB mouse designed to support both USB and PS2 (and autodetect which one was being used). I could surely be wrong, but I would use that assumption unless proven otherwise.

But yes, regardless of the details, if the mouse supports PS2, you could get information in that format. And for that matter, if you had a USB device with legacy PS2 ports, you could transmit to a PC that way; although just using a USB Serial Port is probably easier :p
 

hippy

Technical Support
Staff member
So in theory you could communicate directly with your USB mouse (or any USB item) via a PS2 style interface (just 5v, gnd, clock and data).
I'm not sure how far you could go beyond using your USB mouse as a PS/2 mouse. The bit-of-magic which lives in the interface is probably handling the USB side of things while emulating being a PS/2 mouse itself. Trying to do anything clever with the PS/2 signalling would probably only confuse that bit-of-magic.

It's unlikely to work as a generic PS/2 interface to all things USB. The interface probably wouldn't know what to do with anything other than a USB mouse plugged into it.
 

Coyoteboy

Senior Member
Yes, I'm thinking it depends entirely how it handles the packets. It depends if the magic is simply a packet re-packager or if it actually understands the data sent. The PS2 interface really is supremely simply and emulating a mouse would really only take re-formatting the packets and forwarding them on in USB "wrappings" - the core data is the same. But if, as suggested, the smart side of things is in the mouse and it can identify whether its being used through PS2 or USB and switch accordingly, the system would clearly not work for general items. As I actually want to use a mouse I'm fairly happy anyway, but it'll be worth a look to see what comes out of it. I'll take a scope home at xmas and play!
 
Top