PS/2 Woes...

Status
Not open for further replies.

bsodmike

New Member
Hello all,

I've gotten to the point where I can see some data coming off the PS/2 interface (with respect to the mouse) and according to the page by Adam Chapweske, bits 4 and 5 on the first received byte tell you the direction in which the mouse is moving. Actually this is the 9th bit, i.e.:

Code:
  8          7      6     5     4   3   2   1   0
-255      128   64   32   16   8   4   2   1

hence a 9 bit 2's complement integer.

So as a test I had my PIC test these 2 bits for X/Y and display it on an LCD:

**broken link removed**

The annoying part comes here - it sits @ showing '+' only, which means that both bits are 0 and this is confusing.

To try and help me sort this out I've developed a little program in python (with GUI) which will grab these packets via RS232 and display it on screen and log the data to a log file.

Any ideas at all would be greatly appreciated. Oh, I'm using unsigned chars to store them as well (on the PIC, in C at least).

Cheers, Mike
 
Thanks dude, I only saw your reply today d'oh. I got this sorted last Wednesday 'yay'. The timing is very sensitive hehe...

Cheers, Mike
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…