Article 43376 of sci.electronics: Path: earth.armory.com!gorn!hobbes!uunet!pipex!uknet!cf-cm!cybaswan!ccphil2.swan.ac.uk!P.R.Brady From: P.R.Brady@swan.ac.uk (Phil Brady) Newsgroups: sci.electronics Subject: Re: Output from a mouse Message-ID: Date: 22 Nov 93 11:33:24 GMT References: Sender: news@swan.pyr (0000-news(0000)) Organization: Computer Centre, Swansea University, UK Lines: 44 Nntp-Posting-Host: ccphil2.swan.ac.uk soowm@slc37.queensu.ca (Soo Wei Meng) asks: >I'm trying to incorporate a serial PC mouse in a robot project of mine to` >determine location, distance travelled, etc... >Does anyone know the serial output of a mouse? I took apart my Logitech >and saw that there was a chip on board which does some decoding on the >output of the optical sensors. Anyone know what the chip does and what >the specs are? >I don't really want to look at the optical outputs since it will tie up >four inputs on the board. I posed this question about 6 months ago and had a very helpful reply from Dmitry Stefankov which I reproduce below. Regards Phil Brady Original-Sender: wizard Sender: wizard%uucp.npimsu%su.kiae.sequent@net.eu.britain Dmitry Stefankov 1. PC Mouse Systems Serial UART: 1200 baud, data=8,start=1,parity=none Mouse Protocol of Transmission bit: 7 6 5 4 3 2 1 0 byte 1 (sync) 1 0 0 0 0 L M R (0=depressed button) byte 2 (dX) x7 x6 x5 x4 x3 x2 x1 x0 (bit 7 -> 0=pos,1=neg) byte 3 (dY) y7 y6 y5 y4 y3 y2 y1 y0 byte 4 (dX') x7 x6 x5 x4 x3 x2 x1 x0 byte 5 (dY') y7 y6 y5 y4 y3 y2 y1 y0 Notes: - all bytes are two's complement binary - dX, dY = relative moves after last transmission - dX',dY' = relative moves since dX, dY were transmitted 2. Microsoft Mouse Serial UART: 1200 baud, data=7,stop=1,parity=none Mouse Protocol of Transmission (normal mode) bit: 7 6 5 4 3 2 1 0 byte 1 (sync) 0 1 L R y7 y6 x7 x6 (1=depressed button) byte 2 (dX) 0 0 x5 x4 x3 x2 x1 x0 (MSB-> 0=pos,1=neg) byte 3 (dY) 0 0 y5 y4 y3 y2 y1 y0 Notes: - all moves bytes are two's complement binary (you must collect all bits together)