About useing Optical mouse sensor data (help)
Nemo
Posts: 1
I'm trying to use a optical mouse to·read the·data of motion·, but there is a big problem I have met,
I·need using a bs2 controller·to read data from·ADNS-6010 chip(avago)·but·the data transform are·Synchronous Serial Port, the following is the code I wrote:
' {$STAMP BS2px}
' {$PBASIC 2.5}
Ncs············ PIN···· 0
MISO··········· PIN···· 1
MOSI··········· PIN···· 3
Clk············ PIN···· 2
lay············ PIN···· 4
res············ PIN···· 8
mot········ VAR···· Byte
dx········· VAR···· Byte
dy········· VAR···· Byte
squal······ VAR···· Byte
shut_up···· VAR···· Byte
shut_low··· VAR···· Byte
mx_pix····· VAR···· Byte
Setup:
· HIGH Ncs
· LOW lay
Main:
· DO
··· LOW Ncs
··· SHIFTOUT MOSI, Clk, MSBFIRST, [noparse][[/noparse]$50]
··· SHIFTIN MISO , Clk, MSBPRE, [noparse][[/noparse]mot\8, dx\8, dy\8, squal\8, shut_up\8, shut_low\8, mx_pix\8]
··· HIGH Ncs
··· HIGH lay
··· SEROUT 15, 16780, [noparse][[/noparse]dx,dy,mot]···· ' useing rs232 to pc
· LOOP
==========================================================================
Unfortunately, the MISO prot data which bs2 controller·read was·not right·, pc rs232 view (0,0,0)
why , i want to know how to write the code to reading the mouse motion data?
please help me , thx
Post Edited (Nemo) : 2/9/2009 4:17:22 PM GMT
I·need using a bs2 controller·to read data from·ADNS-6010 chip(avago)·but·the data transform are·Synchronous Serial Port, the following is the code I wrote:
' {$STAMP BS2px}
' {$PBASIC 2.5}
Ncs············ PIN···· 0
MISO··········· PIN···· 1
MOSI··········· PIN···· 3
Clk············ PIN···· 2
lay············ PIN···· 4
res············ PIN···· 8
mot········ VAR···· Byte
dx········· VAR···· Byte
dy········· VAR···· Byte
squal······ VAR···· Byte
shut_up···· VAR···· Byte
shut_low··· VAR···· Byte
mx_pix····· VAR···· Byte
Setup:
· HIGH Ncs
· LOW lay
Main:
· DO
··· LOW Ncs
··· SHIFTOUT MOSI, Clk, MSBFIRST, [noparse][[/noparse]$50]
··· SHIFTIN MISO , Clk, MSBPRE, [noparse][[/noparse]mot\8, dx\8, dy\8, squal\8, shut_up\8, shut_low\8, mx_pix\8]
··· HIGH Ncs
··· HIGH lay
··· SEROUT 15, 16780, [noparse][[/noparse]dx,dy,mot]···· ' useing rs232 to pc
· LOOP
==========================================================================
Unfortunately, the MISO prot data which bs2 controller·read was·not right·, pc rs232 view (0,0,0)
why , i want to know how to write the code to reading the mouse motion data?
please help me , thx
Post Edited (Nemo) : 2/9/2009 4:17:22 PM GMT
Comments
I tried the Al williams PAK, But again it just wasnt what i was looking for as it had the same problem with accuracy.· I would like to say the he was VERY HELPFUL.
··Quote from another·post:····· "Al Williams has coprocessors to read a mouse and output serial position data. http://www.awce.com/pak11.htm"
I also tinkered with the "seeing·eye mouse" and still had mild success. Again here the guy was VERY HELPFUL
···Post about it····· http://forums.parallax.com/showthread.php?p=693372
You might also try looking at the EZMOUSE. this one i had the least success with.
·· ·http://www.multilabs.net/ezMOUSE.html
·now that i got all of the writing done·i found my old posts.... my best offer to you would be to get in touch with·Tristan T: http://forums.parallax.com/member.php?u=46431
my original posts are· here
······ http://forums.parallax.com/showthread.php?p=581246