Serial Mouse
Posted: Thu Feb 23, 2006 3:16 am
And so. I've reprogrammed UART to 7data bits and 1stop bit, following the documentation in this mode mouse should send 3 bytes. I've created my serial mouse service but it didn't work so i've debugged it.
As far as i know mouse first byte should containt it's 6th bit equal to logical 1, i've printed all 3 bytes in binary and i was surprised that when i press a key, mouse send 3 bytes and all contains their 6th bits equal to 1. I can't get it, i see that button bits are changed when i press a key, but why other 2 bytes ar very similar to the 1st(not equal but similar) ? When i just move the mouse sometimes all bytes contains 0's.
So in some word, the problem is that my mouse doesn't send bytes in the right order, sometimes it send 3 bytes as all of them are 1st bytes and etc....
As far as i know mouse first byte should containt it's 6th bit equal to logical 1, i've printed all 3 bytes in binary and i was surprised that when i press a key, mouse send 3 bytes and all contains their 6th bits equal to 1. I can't get it, i see that button bits are changed when i press a key, but why other 2 bytes ar very similar to the 1st(not equal but similar) ? When i just move the mouse sometimes all bytes contains 0's.
So in some word, the problem is that my mouse doesn't send bytes in the right order, sometimes it send 3 bytes as all of them are 1st bytes and etc....