Skip to main content
Reformatted answer for eaasier reading
Source Link
John Burger
  • 1.9k
  • 1
  • 14
  • 24

A serial mouse is designed to connect to a PC's true serial port - it's an actual RS-232 device using ±5V. As such it won't connect directly to the Arduino's RX/TX pins, you'll have to go through an RS-232 transceiver chip.

It also gets its power from the RTS line, but I never knew what the current draw of one of those things was - be careful trying to power it from the Arduino!

Different mouse manufacturers used different protocols. The actual protocol isoriginal standard used a series of packets sentthree-byte protocol at 91,600200 bps (8N1): from memory7N1. The encoding had the early ones issued 5 data bytes then a line endfollowing properties:

  • The leading bit of the first two bytes werebyte of the Xpacket was set -delta; all future bytes had the leading bit cleared.
  • The second two bytes werefirst byte had the buttons' states, and the most significant bits of the X and Y-delta; deltas;
  • The fifth byteX delta was encoded in the different button states (one bit for each);second byte;
  • Then an <LF> (hex 0x0A)?The Y delta was encoded in the third byte.

I'll look up my old reference books...

http://paulbourke.net/dataformats/serialmouse/

EditOther manufacturers added things like extra buttons and scroll wheels that didn't fit in the packet structure. So they modified the protocol, but stuck with some features of the original:

  • Some quick Googling told me that the original protocol bears no resemblance to my memories:The data rate was http://paulbourke.net/dataformats/serialmouse/(usually) still 1,200 bps, although sometimes they used 7N2 or 8N1 instead.
  • And here's a page that describes a couple of other protocols: the last is much closerThe leading bit was still used to my memoryindicate start of packet;
  • The X, Y (albeit at 1,200 bpsand Z): http://www.cpcwiki.eu/index.php/Serial_RS232_Mouse wheels still indicated deltas.

http://www.cpcwiki.eu/index.php/Serial_RS232_Mouse

A serial mouse is designed to connect to a PC's true serial port - it's an actual RS-232 device using ±5V. As such it won't connect directly to the Arduino's RX/TX pins, you'll have to go through an RS-232 transceiver chip.

It also gets its power from the RTS line, but I never knew what the current draw of one of those things was - be careful trying to power it from the Arduino!

The actual protocol is a series of packets sent at 9,600 bps (8N1): from memory the early ones issued 5 data bytes then a line end:

  • The first two bytes were the X-delta;
  • The second two bytes were the Y-delta;
  • The fifth byte was the different button states (one bit for each);
  • Then an <LF> (hex 0x0A)?

I'll look up my old reference books...

Edit:

A serial mouse is designed to connect to a PC's true serial port - it's an actual RS-232 device using ±5V. As such it won't connect directly to the Arduino's RX/TX pins, you'll have to go through an RS-232 transceiver chip.

It also gets its power from the RTS line, but I never knew what the current draw of one of those things was - be careful trying to power it from the Arduino!

Different mouse manufacturers used different protocols. The original standard used a three-byte protocol at 1,200 bps 7N1. The encoding had the following properties:

  • The leading bit of the first byte of the packet was set - all future bytes had the leading bit cleared.
  • The first byte had the buttons' states, and the most significant bits of the X and Y deltas;
  • The X delta was encoded in the second byte;
  • The Y delta was encoded in the third byte.

http://paulbourke.net/dataformats/serialmouse/

Other manufacturers added things like extra buttons and scroll wheels that didn't fit in the packet structure. So they modified the protocol, but stuck with some features of the original:

  • The data rate was (usually) still 1,200 bps, although sometimes they used 7N2 or 8N1 instead.
  • The leading bit was still used to indicate start of packet;
  • The X, Y (and Z) wheels still indicated deltas.

http://www.cpcwiki.eu/index.php/Serial_RS232_Mouse

Added Google references
Source Link
John Burger
  • 1.9k
  • 1
  • 14
  • 24

A serial mouse is designed to connect to a PC's true serial port - it's an actual RS-232 device using ±5V. As such it won't connect directly to the Arduino's RX/TX pins, you'll have to go through an RS-232 transceiver chip.

It also gets its power from the RTS line, but I never knew what the current draw of one of those things was - be careful trying to power it from the Arduino!

The actual protocol is a series of packets sent at 9,600 bps (8N1): from memory the early ones issued 5 data bytes then a line end:

  • The first two bytes were the X-delta;
  • The second two bytes were the Y-delta;
  • The fifth byte was the different button states (one bit for each);
  • Then an <LF> (hex 0x0A)?

I'll look up my old reference books...

Edit:

A serial mouse is designed to connect to a PC's true serial port - it's an actual RS-232 device using ±5V. As such it won't connect directly to the Arduino's RX/TX pins, you'll have to go through an RS-232 transceiver chip.

It also gets its power from the RTS line, but I never knew what the current draw of one of those things was - be careful trying to power it from the Arduino!

The actual protocol is a series of packets sent at 9,600 bps (8N1): from memory the early ones issued 5 data bytes then a line end:

  • The first two bytes were the X-delta;
  • The second two bytes were the Y-delta;
  • The fifth byte was the different button states (one bit for each);
  • Then an <LF> (hex 0x0A)?

I'll look up my old reference books...

A serial mouse is designed to connect to a PC's true serial port - it's an actual RS-232 device using ±5V. As such it won't connect directly to the Arduino's RX/TX pins, you'll have to go through an RS-232 transceiver chip.

It also gets its power from the RTS line, but I never knew what the current draw of one of those things was - be careful trying to power it from the Arduino!

The actual protocol is a series of packets sent at 9,600 bps (8N1): from memory the early ones issued 5 data bytes then a line end:

  • The first two bytes were the X-delta;
  • The second two bytes were the Y-delta;
  • The fifth byte was the different button states (one bit for each);
  • Then an <LF> (hex 0x0A)?

I'll look up my old reference books...

Edit:

Source Link
John Burger
  • 1.9k
  • 1
  • 14
  • 24

A serial mouse is designed to connect to a PC's true serial port - it's an actual RS-232 device using ±5V. As such it won't connect directly to the Arduino's RX/TX pins, you'll have to go through an RS-232 transceiver chip.

It also gets its power from the RTS line, but I never knew what the current draw of one of those things was - be careful trying to power it from the Arduino!

The actual protocol is a series of packets sent at 9,600 bps (8N1): from memory the early ones issued 5 data bytes then a line end:

  • The first two bytes were the X-delta;
  • The second two bytes were the Y-delta;
  • The fifth byte was the different button states (one bit for each);
  • Then an <LF> (hex 0x0A)?

I'll look up my old reference books...