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