Shop OBEX P1 Docs P2 Docs Learn Events
Problem reading a PS/2 mouse — Parallax Forums

Problem reading a PS/2 mouse

KlasKlas Posts: 3
edited 2006-05-09 15:13 in BASIC Stamp
I trying to read data from a PS/2 mouse from a bs2px but having some problems.
The mouse uses 2 signals, one data and one clock. The big problem is that the mouse generates the clock signal.

It doesnt seem that I can make the shiftin to use a external clock which make me have to write the "shiftin" code myself.
The problem is that the mouse generates the clock signal somewhere between 10.000-16.000 Hz and the bs2px can do 19.000 "instruction-Hz" which is not enough to read the clock and data with if-statements etc. The microcontroller itself and other pbasic commands have no problems reading the clock-signal, the count command reads the exact number of clock pulses for example.

Anyone have an idea? confused.gif

Can I make the shiftin to use an external clock?
Can I have a assembly part in the code which I can make more optimized?

·

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-05-09 08:59
    Klas -

    Due to the very reasons you mention, you can not process signals from a PS/2 mouse successfully with a PBASIC Stamp. Such processing is generally done with a co-procesor such as this one:
    http://www.awce.com/pak11.htm

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • ForrestForrest Posts: 1,341
    edited 2006-05-09 10:35
    Another option is the ezMouse www.multilabs.net/ezMOUSE.html
  • KlasKlas Posts: 3
    edited 2006-05-09 15:13
    Thanks for the answers, I ordered 2 PAK XI's. Hope the shipping to Sweden goes fast..
Sign In or Register to comment.