Shop OBEX P1 Docs P2 Docs Learn Events
USB Mouse Interface — Parallax Forums

USB Mouse Interface

mynet43mynet43 Posts: 644
edited 2010-07-23 15:02 in Propeller 1
Does someone know of code to interface with a standard USB Mouse or Trackball?

I have a Logitech trackball that seems to have a standard mouse interface that is automatically recognized by XP.

I need to interface it to the Propeller.

Thank you for your help.

Jim

Comments

  • w8anw8an Posts: 176
    edited 2010-07-23 02:46
    I wonder if one of those little usb to ps/2 adapters would work?

    Steve
  • smbakersmbaker Posts: 164
    edited 2010-07-23 03:35
    Aren't those little adapters USB on the computer side and PS/2 on the mouse side? At least the type I'm thinking of that actually convert between the two protocols...

    There are other ones that shipped with earlier dual-mode PS2/USB mice, but I believe those adapters didn't do any protocol conversion; the smarts was in the dual-mode mouse which would either talk serial or USB depending on what it ended up plugged into.
  • mynet43mynet43 Posts: 644
    edited 2010-07-23 03:48
    Thanks for the feedback. I actually went out and bought a USB to PS2 mouse adapter since I posted this.

    It seems to work fine on the PC. I "assume" it will work with Chip's driver on the Propeller.

    My preference is to use the USB interface directly, since this is going on a circuit board.

    Does anyone have any experience working with this type of USB device direct to the Propeller, with or without the FT232RL interface chip?

    Thanks again,

    Jim
  • ErNaErNa Posts: 1,752
    edited 2010-07-23 09:50
    as far as I know, the mice are quite intelligent. Means: they ( an USB mouse) can decide, if they are connected to a USB port or to a PS2 port. The only problem is to wire the usb-pins to a PS2 connector. This is done by simple adaptors without any electronical components. Raymans PSB allows to solder a PS2 or USB socket, so the mouse can be connected without adaptor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cmapspublic3.ihmc.us:80/servlet/SBReadResourceServlet?rid=1181572927203_421963583_5511&partName=htmltext
    Hello Rest Of The World
    Hello Debris
    Install a propeller and blow them away wink.gif
  • heaterheater Posts: 3,370
    edited 2010-07-23 10:33
    You need USB host mode on the Prop to handle a mouse with USB, or any other USB device.
    I think Micah Dowty's USB host package for the Propeller will do it. http://forums.parallax.com/showthread.php?p=894757
    It's a lot of code and COGs just to listen to a mouse though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • mynet43mynet43 Posts: 644
    edited 2010-07-23 12:33
    Thanks for the great feedback!

    heater: Micah's project looks like it might work, but it's kind of overkill. I'm trying to get this working on a regular setup and it needs a special xtal and several cogs. That's a lot just for a mouse interface. I like Bill Henning's suggestion to make a simple mouse/keyboard usb interface that would work in one cog at 80 mHz. Thanks for the link!

    ErNa: I may try your suggestion of wiring the usb pins to the PS2 input of the Prop. Do you know the wiring between USB and PS2? If not, I may be able to hack it from the adapter I bought last night.

    Thanks again! Let me know if you have any other ideas.

    Jim
  • mynet43mynet43 Posts: 644
    edited 2010-07-23 15:02
    I located the wiring diagram to go from USB to PS2 (attached). The green adapter in the diagram looks exactly what I just bought, which works fine with XP on the PC.

    I plan to try it on my Prop Proto Board later today, with Chip's mouse driver.

    If it works, it looks like it will be a handy shortcut for getting a USB mouse on a board without all the pain.

    Let me know if you have any suggestions.
Sign In or Register to comment.