Re: Mouse??


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

Re: Mouse??



Here's something I found on the internet.  Hope this helps:

Date of release: 24 Oct 1993 Release 9

This is a summary on serial communication using the TTY protocol. It
contains information on the TTY protocol and hardware and software
implementations for IBM PCs which has been derived from National
Semiconductor data
sheets and practical experience of the author and his supporters.
Starting
with release 5, some information on modems has been added.

If you want to contribute to this file in any way, please email me
(probably
just reply to this posting). My email address is: chbl@stud.uni-sb.de or
chris@phil15.uni-sb.de.

See the end for details.

It's the nineth publication of this file. Some errors have been
corrected,
and some information has been added (which has surely brought other
errors
with it, see Murphy's Law).

[] brackets often indicate comments to sneaked material; copied lines
are
indented. I've made great efforts to always mention who's to be
credited.

This compilation of information is (C) Copyright 1993 by Christian Blum;
all
rights reserved. This file is not to be reproduced commercially, not
even
partially, without written permission. You are allowed to use it in any
other way you like. I don't want any (monetary) profit being drawn out
of it
(neither by me nor by others!! I don't mind if you have a look or two at
it
at work though... :-). Please feel free to provide this file to others
for
free or at your own expenses.

[snip]

The Microsoft mouse uses 1200 bps, 7n1, the Mouse Systems mouse uses
1200
bps, 8n1. See the Mouse chapter for details.

[snip again]

Mouses (mice?)
------

The Microsoft Serial Mouse (or compatibles) is the device that is most
often
used with the Serial Port of the PC; it's the one with the two buttons.
Mouse
Systems compatible mouses have three buttons. Here's some information I
received from Stephen Warner and Angelo Haritsis:

Pins Used:

TxD, RTS, DTR are used as power sources for the mouse.
RxD is used to receive data from the mouse.

Mouse reset:
Put UART to 'broken line' state (set bit 6 of the LCR) and clear the
bits
0-1 of the MCR; wait a while and reverse the bits again.

Serial Data Parameters:

Microsoft Mouse 1200 bps, 7 data bits, 1 stop bit, no parity
Mouse Systems Mouse 1200 bps, 8 data bits, 1 stop bit, no parity

Data packet format of the Microsoft mouse:

The data packet consists of 3 bytes. It is sent to the computer every
time
the mouse changes state (ie. the mouse moves or the buttons are
released/
pressed)

D6 D5 D4 D3 D2 D1 D0

1st byte 1 LB RB Y7 Y6 X7 X6
2nd byte 0 X5 X4 X3 X2 X1 X0
3rd byte 0 Y5 Y4 Y3 Y2 Y1 Y0

The byte marked with 1 is sent first and then the others. The bit D6 in
the
first byte is used for synchronizing the software to the mouse packets
if it goes out of sync.

LB is the state of the left button (1 being the LB is pressed)
RB is the state of the right button (1 being the RB is pressed)
X0-7 movement of the mouse in the X direction since last packet (+
right)
Y0-7 movement of the mouse in the Y direction since last packet (+ down
)

Data packet format of the Mouse Systems mouse:

The data packet consists of 5 bytes.

D7 D6 D5 D4 D3 D2 D1 D0

1st byte 1 0 0 0 0 LB MB RB
2nd byte X7 X6 X5 X4 X3 X2 X1 X0
3rd byte Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
4th byte equal to 2nd byte
5th byte equal to 3rd byte

Bits 7-3 of the 1st byte are used for synchronisation; it's rather
improbable that they appear the same way in any of the other bytes.

LB is the state of the left button (1 being the LB is pressed)
MB is the state of the middle button (1 being the MB is pressed)
RB is the state of the right button (1 being the RB is pressed)
X0-7 movement of the mouse in the X direction since last packet (+
right)
Y0-7 movement of the mouse in the Y direction since last packet (+ up )

The mouse should rather be used with the mouse driver software; this
ensures compatibility to future changes and greatly reduces software
overhead. See Ralf Brown's interrupt list, interrupt 33h.

>----------
>From:  Grant Stockly[SMTP:gussie@ALASKA.NET]
>Reply To:      Grant Stockly
>Sent:  Thursday, February 26, 1998 7:43 AM
>To:    CALC-TI@LISTS.PPP.TI.COM
>Subject:       Re: Mouse??
>
>I don't have too much tech info on it, but I will soon.  I'm still testing
>on whether or not I can just hook it directly to the linkport...  Does
>anyone in here know anything about mouse characters?
>