19
The PS/2 specifi cation calls out the following default mouse report format. Byte 0 is the button data (1=pressed, 0=re-
leased), X and Y optics sign bits, and X and Y overfl ow bits. Byte 1 is the X optics data in 2’s complement format. Byte 2
has the Y optics data in 2’s complement format. At reset or power-on the standard PS/2 reporting format is enabled.
Bit
7
Bit
0
Byte 0
Y Overfl ow X Overfl ow Y sign
X sign
Reserved 0 Reserved 0 Right button Left button
Byte
1
X X X X X X X X
Byte
2
Y Y Y Y Y Y Y Y
After the following sequence of commands, the wheel report format is enabled.
0xF3, 0xC8
Set Sampling Rate 200 per second
0xF3, 0x64
Set Sampling Rate 100 per second
0xF3, 0x32
Set Sampling Rate 50 per second
0xF2, 0x03
Read Device Type returns a value of 0x03
After the Read Device Type command returns 0x03 to indicate that this is a Microsoft compatible three button-wheel
mouse, the wheel report format is enabled. After this initialization sequence, the PS/2 wheel reporting format is
enabled. The fourth byte represents the wheel data. This byte is assigned 0x01 for forward wheel movement and 0xFF
for backward wheel movement. When the wheel is idle, this value is 0x00.
Bit
7
Bit
0
Byte 0
Y Overfl ow X Overfl ow Y sign
X sign
Always 1
Middle Button
Right Left
button
button
Byte
1
X X X X X X X X
Byte
2
Y Y Y Y Y Y Y Y
Byte
3
Wheel* Wheel* Wheel* Wheel* Wheel* Wheel* Wheel* Wheel*
The PS2 data transmission according to the PS/2 Hardware Interface Technical Reference including eleven bits for
each byte sent. The bits are sent in the following order with data valid on the falling edge of the clock. See the PS/2
Hardware Interface Technical Reference manual for timing information.
Start Bit
Data
Data
Data
Data
Data
Data
Data
Data Bit 7
Odd
Stop Bit
(Always 0)
Bit 0
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 6
Parity Bit
(Always 1)