Jeff Weisberg on Mon, 7 Oct 2002 18:14:45 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] OT: Mouse Protocols



| > An adapter just changes the connector style.  Like you wrote, ps/2 and
| > serial signals may be conveyed in a different way.  Does every mouse
| > know how to handle both sets of signals?  On the computer end there are
| > different drivers for ps/2, serial, and USB mouses.  (Then there are bus
| > mouses, but that's another story.)
|[...] 
| 
| All a mouse sends is an x offset, a y offset, and a set of button
| signals. The pinouts may be different, but it's the same number of
| pins for all of the above. You *may* lose some granularity on the
| offsets if the various different protocols can't detect as fine a
| grain in voltage differential. I'm out on a limb here already,
| though.


while at the "/dev/mouse" level, ps/2, serial, and USB mice all
look pretty much the same (a set of numbers indicating how the mouse
moved and/or which buttons are pressed), at the "wire level" they
are all different.

the wire on a serial mouse carries an EIA-232 asynchronous
serial signal. the standard serial interface we are all generally
familiar with: start bits, stop bits, baud rate; just like a modem.

the wire on a ps/2 mouse is a TTL synchronous serial signal, consisting
of a data and clock line. the protocol permits multiple devices to
share the interface (such as mouse and keyboard).

both of the above are similar, consisting of the same data (8 bits at time)
with different signaling "overhead" (clock signal/no clock signal, start bits,
stop bits) and different voltage levels. and many mice can auto-detect and
speak both (a "combo-mouse") using a simple adapter.


the wire on a USB device, is much different. in addition to the
few bytes indicating how it moved and what was pressed, the USB
protocol adds a lot of overhead (various identifiers indicating
what the data is, where it came from, ...)


	--jeff

see also:
	USB mouse - http://www.usb.org/developers/data/devclass/hid1_1.pdf
	PS/2 Mouse, etc - http://www.tavi.co.uk/ps2pages/ohland/mouse.html

_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug