Shop OBEX P1 Docs P2 Docs Learn Events
Trying to control cursor position, quickly & accurately, using BS2pe — Parallax Forums

Trying to control cursor position, quickly & accurately, using BS2pe

connolly113connolly113 Posts: 8
edited 2008-07-08 20:00 in BASIC Stamp
Hi there,
···········I am trying to use a basic stamp to control the cursor on the screen; to simplify things I am controlling the inputs to the mouse processor by using an AND gate instead of trying to communicate directly with the host computer. The problem I am having is this:· if I command the cursor to move really slow then the·cursor will always arrive precisely to the point on the screen I want it to go to, but when I speed things up the accuracy is way off. ·I figure this is normal because a person using the mouse will correct for this and won't notice it. I think my options from here would be to a. try a newer mouse (more accurate), b. try using a PAK-XI chip to read the output of my mouse processor and correct the position using the stamp·(although not sure if I can force the PAK-XI to read only mode, as host /mouse-emulator is already talking to mouse) c. try to use a UART with the stamp and try to master the communication protocol between mouse and host (this method would reduce the chip count in my project but not sure if it would even work). If anyone has experience of any of this or believe they could help me out, I'd greatly appreciate it.
Brian.
(ps/2 mouse)

Comments

  • MSDTechMSDTech Posts: 342
    edited 2008-07-08 17:54
    One other item you might look at is the mouse driver on the PC. These often include an acceleration function that increases the mouse movement if you move the mouse faster. It figures you're in a hurry and you want the cursor to move even faster than the speed of the mouse. If this is kicking in, it would explain why you get good precision at slow speed but are off at higher speeds from your project. You may need to calibrate the amount of movement based on the speed you change the output to the PC.
  • connolly113connolly113 Posts: 8
    edited 2008-07-08 20:00
    Something I should have added here is the fact that the inaccuracy is random from one try to the next. I use the PAINT program in windows and get the·cursor to mark the point where it lands each time. The dots make a pattern roughly the shape of an inverted "L", showing me that there are missing counts sometimes on the x-axis and sometimes on the y-axis, my cursor origin point is bottom left corner of screen. It's not sometihing I can use software to compensate for though. I really think that communicating directly·with the host is how I will eventually go with this, but not sure if the stamp is fast enough to both send and receive.
Sign In or Register to comment.