Searching \ for 'Re[2]: [OT] Using a mouse as a cheap incremental e' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=
Search entire site for: '[OT] Using a mouse as a cheap incremental e'.

Truncated match.
PICList Thread
'Re[2]: [OT] Using a mouse as a cheap incremental e'
1998\06\23@152027 by Martin Green

flavicon
face
    The interface to a PS/2 mouse is NOT TTL. It is open collector and is
    very similar in concept to I2C. Just because the interface is
    bidirectional doesn't mean you have to use it that way. Just pull the
    clock and data lines up with a resistor (the active pullups in a PIC
    should work ok) and read the levels with a PIC. It is much simpler to
    use a PS/2 mouse than a serial one since there are no rigid timing
    requirements or level translations needed as with RS-232 (everything
    is 5V). It is a simple matter of using the CLOCK line to determine
    when the level on the DATA line is valid. In fact, it is so simple you
    could probably capture mouse output with a common shift register.

    Definitely go with the PS/2 mouse instead of the serial one.


    CIAO - All.


______________________________ Reply Separator _________________________________
Subject: Re: [OT] Using a mouse as a cheap incremental encoder?
Author:  pic microcontroller discussion list <spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU> at
Internet
Date:    6/23/98 12:52 PM


On Tue, 23 Jun 1998 09:20:36 +0200 Charlos Potma <.....Charlos.PotmaKILLspamspam@spam@RIVM.NL>
writes:
> I am now considering using a
>PC mouse, or at least some part of it as an encoder.
>The standard PC mouse seems to have a DATA and CLOCK
>output. Does anyone here have detailed information on the
>protocol used?

Sounds like a PS/2 type mouse.  These use two TTL lines with
bidirectional synchronous signals very similar to a keyboard.  A serial
mouse would be simpler to use a since it sends data one way over one
wire.  The data is just standard asynchronous at 1200 baud.  Microchip
made some pre-programmed PICs once to use as mouse controllers.  The data
for these had fairly good descriptions of the signal format.

For a Microsoft-type serial mouse, groups of three 7-bit characters are
sent LSB first with start and stop bits just like standard async data.
The data is sent only after the user activates something on the mouse, if
it is sitting still no data is sent.  The characters are:

1(LB)(RB)(V7)(V6)(H7)(H6) - (LB, RB are 1 if the button is pressed)
0(H5)(H4)(H3)(H2)(H1)(H0)
0(V5)(V4)(V3)(V2)(V1)(V0)

The PIC would look at the MSB of each character and wait until one with a
1 is found, indicating the start of a new packet.  Then it could
accumulate the V and H bits in proper order.  I think the two 8-bit
numbers are two's complement reperesentation of how far the mouse has
moved since the last report.



_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\06\23@153048 by Martin Green

flavicon
face
    The adaptors you describe rely on the mouse encoder chip being able to
    "auto-detect" the type of interface it is connected to. Many newer
    mice can, but el-cheapo's or older mice often can't. I have a
    beautiful older Logitech 3-button mouse that unfortunatly is serial
    only (the internal mechanics of this thing make all other mice I've
    opened look like toys, it has NEVER needed cleaning in 5 years,
    including the ball). If I remember correctly, the Logitech M-series
    mice are auto-detect, while the C-series mice are not.

    So you see, the adapter you describe just allows the physical
    connection of one connector type to another. It is the mouse itself
    which behaves totally differently depending on whether it is connected
    to a serial port or a PS/2 connector.


    CIAO - Martin.


______________________________ Reply Separator _________________________________
Subject: Re: [OT] Using a mouse as a cheap incremental encoder?
Author:  pic microcontroller discussion list <PICLISTspamKILLspamMITVMA.MIT.EDU> at
Internet
Date:    6/23/98 2:09 PM


On Tue, 23 Jun 1998, Mike Keitz wrote:

{Quote hidden}

I thought that I'd seen simple (no IC's or active components, just wires)
adapters to go between a serial mouse and a PS/2 bus mouse port. If what
you are saying is true, how can a simple adaptor convert an asynchronous
signal to a bi-directional synchronus signal? I could be wrong, its just
that I seem to remember these adaptors.

THanks,

Sean


{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...