Searching \ for 'Simulating a mouse' 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=simulating+mouse
Search entire site for: 'Simulating a mouse'.

Truncated match.
PICList Thread
'Simulating a mouse'
1997\04\09@205143 by Robert Zeff

flavicon
face
Hi,
I want to simulate a serial mouse with the PIC.
I know that Windows detects a mouse, so I also
need to know how this is accomplished.  Is there
some information available on this subject?

Many thanks!


                     \\\|///
                   \\  ~ ~  //
                    (  @ @  )
    --------------oOOo-(_)-oOOo---------------
    |                                         |
    |               Robert Zeff               |
    |            Nikola Engineering           |
    |               209-599-6176              |
    |            spam_OUTrzeffTakeThisOuTspamnikola.com             |
    |   Free Spice for Windows NT / Win95:    |
    |        WWW:  http://Nikola.com          |
    |                                         |
    ----------------------Oooo.---------------
                .oooO     (   )
                (   )      ) /
                 \ (      (_/
                  \_)

1997\04\09@220517 by Michael S. Hagberg

flavicon
face
At 05:49 PM 4/9/97 -0700, you wrote:
>Hi,
>I want to simulate a serial mouse with the PIC.
>I know that Windows detects a mouse, so I also
>need to know how this is accomplished.  Is there
>some information available on this subject?
>
>Many thanks!

yes microchip has a program with source code in their apps. check the
web site

michael

1997\04\10@000714 by Robert Zeff

flavicon
face
Thanks, this is helpful.  I wonder, though, how an
operating system knows that it is a mouse upon
boot...

Regards,


                     \\\|///
                   \\  ~ ~  //
                    (  @ @  )
    --------------oOOo-(_)-oOOo---------------
    |                                         |
    |               Robert Zeff               |
    |            Nikola Engineering           |
    |               209-599-6176              |
    |            .....rzeffKILLspamspam@spam@nikola.com             |
    |   Free Spice for Windows NT / Win95:    |
    |        WWW:  http://Nikola.com          |
    |                                         |
    ----------------------Oooo.---------------
                .oooO     (   )
                (   )      ) /
                 \ (      (_/
                  \_)



{Original Message removed}

1997\04\10@010904 by Kevin Timmerman

flavicon
face
part 0 1162 bytes
Most mice use handshake lines for power and Txd for a source of negative voltage for sending data to the computer.  So....

If you send data out the Txd line it will be echoed back on Rxd.  Could be a modem or a mouse, how do you know?? Send AT<CR> and see if you get an OK<CR> back.  If you do it is a modem, otherwise may be a mouse.

If you toggle the handshake lines the mouse will power down/power up.  The mouse could send identifying information at power up.

I have noticed Windows can sometimes determine what kind of mouse you have (Microsoft, Logitech, etc), have not had time to find out how it does this.

BTW... Current Microsoft Home Mouse, J-Mouse (retail) and IntelliMouse use a Microchip PIC.  I assume they are code protected, but I have not checked.  The OEM J-Mouse uses a mouse "chip".

Hope this helps
       Kevin Timmerman

-----Original Message-----
From:   Robert Zeff [SMTP:rzeffspamKILLspamAINET.COM]
Sent:   Thursday, April 10, 1997 12:05 AM
To:     .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
Subject:        Re: Simulating a mouse

Thanks, this is helpful.  I wonder, though, how an
operating system knows that it is a mouse upon
boot...

1997\04\10@041514 by mauricio

flavicon
face
Hi!


> Date:        Wed, 9 Apr 1997 17:49:11 -0700
> Subject:     Simulating a mouse
>
> Hi,
> I want to simulate a serial mouse with the PIC.
> I know that Windows detects a mouse, so I also
> need to know how this is accomplished.  Is there
> some information available on this subject?
>
> Many thanks!
>


You should look at Microchip web/ech for source code of a mouse
(communication etc.).

Regarding the mouse detection, the things are going like this:

the mouse driver (on PC, or other computer) first power off the mouse
(this is done by deactivating signals like CTS, DTR ... I do not
remember now because I experimented with this about a year ago) then
prepare itself to receive a char on RX line, then power the mouse (again
by setting the CTS, DTR... lines on COM port). At the moment of
power-up, the mouse sends a character via RS232 to the host (PC). The
mouse driver detects the mouse presence and type from this character
(and another line DSR, RTS? I'm not shure about this).
If the character received is a "M", then the mouse is Microsoft
compatibile and sends data as described in Microchip ECH, I think "L"
stands for Genius but I'm not shure.
Ah, not to forget, in most cases the communication parameters are
1200 (bps) ,n (no parity) ,8 (or 7 data bits),1 (or 2 stop bits), but
some models of Logitech mice, do comunicate at 9600 bps (wireless mouse,
mouseman...). By knowing the characters the mouse can send you, you can
auto detect the boud rate.

I got this by debuging one of the mouse drivers for PC computers.


Hope this helps,

1997\04\10@102159 by Carl Watley

picon face
I believe the mouse sends a "M" when it is reset.

Carl Watley

On Wed, 9 Apr 1997 21:04:55 -0700 Robert Zeff <EraseMErzeffspam_OUTspamTakeThisOuTAINET.COM> writes:
{Quote hidden}

>{Original Message removed}

1997\04\11@100308 by impmeister

picon face
Robert Zeff wrote:
>
> Hi,
> I want to simulate a serial mouse with the PIC.
.....etc.

Assuming you're talking about a serial mouse, you basically need to
respond to an RTS Toggle (if initially positive, RTS goes low for at
least 100ms, then positive; if initially low, as with most PCs when they
boot, then respond when RTS goes high).

The simplest response (at 1200 Baud, 1 start bit, 2 stop bits, no
parity) is an ASCII M character (cleverly, meaning Mouse or Microsoft-
take your pick). You should send it 10-20 ms after rising edge of RTS.

Assuming you've managed the above (note that you need worry about how
the PIC is powered- if you're stealing power from serial port, things
get a bit more complicated) the PC will now think there is a
Microsoft-compatible mouse installed (assuming you've got a serial mouse
driver running on the PC). Note also that everything should be
physically connected before power on and boot- most mouse drivers aren't
smart enough to look for a mouse on the fly- though "Add New Hardware"
in W95 causes the standard serial driver to toggle RTS as described
above).

OK- you're connected. Now you need to send well formed protocol packets-
3 bytes, with bits packed in a specific way. The protocol is documented
many places, so I won't duplicate it here (Winn Rosch hardware bible,
The Programmer's PC Source Book, some of Logitech's documentation,
etc.).

The most important thing is to respond consistently and correctly to the
RTS toggle- otherwise the PC driver will not know there's a "mouse"
attached. And, make sure you use the right cable: DTR-DSR and RTS-CTS
must NOT be shorted; get TX and RD connections right (particularly if
you're trying to steal power from the port).

If you are interested in the PS/2 port, it's a whole different story-
documented in IBM Technical manuals. The basic protocol at the byte
level is the same (for simple motion), but the signal twiddling is much
different.

Have fun..
Jack Copper

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