0
\$\begingroup\$

I am trying to interface an old PS/2 mouse with a PIC microcontroller but I don't know how exactly the protocol works. Does it work exactly like the keyboard protocol, thus sending to the host 11 bit data packets each containing 1 byte of data? I know the mouse sends 3 data packets each time it detects a movement or click, but does that mean it sends 3 11-bit-packets each time or just a single 27 data packet (1 for start , 8+8+8 for data, a parity bit, end bit)

\$\endgroup\$
1
  • \$\begingroup\$ Deleted answer because I would agree that it was more commentary... Anyways, Microchip has an application design (and fair warning, this link starts a download for the document). The document talks about hardware design, timing, data transfer, message frames, etc: ww1.microchip.com/downloads/en/appnotes/91055c.pdf \$\endgroup\$
    – Colin
    Commented Dec 29, 2023 at 18:20

1 Answer 1

0
\$\begingroup\$

The mouse sends each byte separately with the said 11-bit start/parity/stop sequence. It does not combine the bytes into a packet.

But before the mouse sends anything to you, you must send a command to the mouse which makes the mouse to start reporting data back to you.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.