Shop OBEX P1 Docs P2 Docs Learn Events
USB Support for Joysticks? — Parallax Forums

USB Support for Joysticks?

__red____red__ Posts: 470
edited 2013-05-19 09:39 in Propeller 1
Greetings!

One of my class members is wanting to plug a USB joystick into the propeller board that we're building. I foresee two issues that I don't know how to solve yet :) I'm hoping for some pointers :D

The first is how to connect the device to the prop pins. I assume I'll need some kind of 5V <-> 3V bi-directional bridge. I've done a circuit in each direction but I'm assuming that there is already an IC I can use which would would do both?
Secondly, where do I start in finding / writing a driver for this?

Alternatively, what about MAX3421E or its ilk? Any dedicated ICs I could consider to make this easier?

Comments

  • PliersPliers Posts: 280
    edited 2013-05-19 08:34
    Sounds like a great project. I did a little WEB searching and found this. JOYSTICK CODE.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-19 09:04
    The Propeller can handle USB directly with a USB socket and a few resistors along with the information in this thread. The object is in the ObEx (here). There's a code repository mentioned in the thread that includes some other device drivers including an HID driver which would talk to the joystick. There's no direct joystick support in that the joystick appears as a bunch of registers which you'd have to read and interpret and you'd have to do some research to see which register is which, but a lot of the registers are standard for pointing devices.

    As you may have noticed, it's much easier to use a PS/2 joystick or mouse with the Propeller. There's ready-to-go code and some examples of its use. It's "old, but reliable" technology, harder and harder to find as time goes on.
  • Heater.Heater. Posts: 21,230
    edited 2013-05-19 09:30
    It would be much easier to rip out all the USB gunk from the joystick and wire whatever sensors it has more directly to the Propeller.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-05-19 09:39
    Heater. wrote: »
    It would be much easier to rip out all the USB gunk from the joystick and wire whatever sensors it has more directly to the Propeller.

    I have an old force feedback joystick I intend to modify this way.

    @red, Besides the options Mike listed, there are also objects for controlling many game console controllers. One of my favorites is the PlayStation 2 controller. I added support for the analog buttons on the PS2 controller (many people don't realize most of the buttons on a PS2 controller are pressure sensitive).
Sign In or Register to comment.