Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length



Pages: [1]
  Print  
Author Topic: using USBwiz to read a joystick  (Read 621 times)
shaunmcmaster
Newbie
*
Posts: 4


View Profile
« on: January 11, 2010, 04:03:22 AM »

I want to use my USBwiz to read a joystick.  I have looked at the HID tutorial, but it didn't give a specific example of how to do this.  Is there some info out there for this?  If not can you give me q uick run down of how you would go about reading the data from a joystick?  thank you
« Last Edit: January 11, 2010, 04:08:21 AM by shaunmcmaster » Logged
GHI_Support
Administrator
Hero Member
*****
Posts: 1252


View Profile
« Reply #1 on: January 11, 2010, 09:50:22 AM »

Different types of joysticks can work differently.
Initialize HID device.
Read HID data periodically.
When you press a button on joystick, or move an axis, the HID data will change.
You have to see what changes you are getting. Move one axis and see what data byte is changing and do the same for buttons...
Logged
SupportAdmin
Administrator
Hero Member
*****
Posts: 5394



View Profile WWW
« Reply #2 on: January 11, 2010, 10:30:12 AM »

You should consider our USBizi instead of USBwiz....or even FEZ http://www.tinyclr.com/
Logged
shaunmcmaster
Newbie
*
Posts: 4


View Profile
« Reply #3 on: January 11, 2010, 10:00:59 PM »

I want to read the joystick data via a Xilinx state machine and store HID data in register which then can be transmitted over a wireless digital link.  Think UAV or fly/drive by wire gizmo.

My first application will be to point a gyro stabilized camera platform.  But I have some other ideas as well.  Industrial/military joysticks are way to expensive for what I need and often cost more then my entire application.

I think Initializing the HID device, then polling the HID data, and registering it is a fine way to go.  There is no CPU in my remote application, it's pure hardware.  In fact the remote station does have any of the brains, the computer is on the other side of the wireless link.

Looked at the USBizi, that would probable work as well.  Interested in why you think that would be an advantage?

Thanks for the advice
« Last Edit: January 11, 2010, 10:02:57 PM by shaunmcmaster » Logged
SupportAdmin
Administrator
Hero Member
*****
Posts: 5394



View Profile WWW
« Reply #4 on: January 11, 2010, 10:51:07 PM »

USBizi has everything USBwiz has pus 1001 more features, this is why:)
Logged
shaunmcmaster
Newbie
*
Posts: 4


View Profile
« Reply #5 on: January 12, 2010, 01:48:44 AM »

Perhaps I am not looking in the right place. But the USBizi user guide doesn't look nearly as detailed as the USBwiz.  I am sure you are correct in your assertion that USBizi is better.  But where might I find a description of the 1001 more features that you are referring to.

For instance, using the serial interface mode, how would my Xilinx FPGA read both the joystick HID data and sample the A/D ports at the same time?  Is there a document that tells me these commands,  might be blind, but I could not find it...
« Last Edit: January 12, 2010, 01:53:11 AM by shaunmcmaster » Logged
SupportAdmin
Administrator
Hero Member
*****
Posts: 5394



View Profile WWW
« Reply #6 on: January 12, 2010, 08:55:57 AM »

USBizi a programmable chip. For example, a little C# program on USBizi (about 100 lines of code) will read the joystick and send the data out on serial port...then it will be easy for your xilinx to get the serial data. This is just an example...USBizi has many things because it runs NETMF
this is some example http://www.youtube.com/watch?v=BfBwSrs-38I
Logged
shaunmcmaster
Newbie
*
Posts: 4


View Profile
« Reply #7 on: January 12, 2010, 09:12:52 AM »

USBizi cost $!00 as opposed to $60 and I could not find any documentation that was as detailed as the USBwiz.  My application is very simple.  I like the idea of not having to write any code to make the part work.  So I purchased the USBwiz.  I am sure USBizi is a nice part, but for more money and features I would expect more documentation and I couldn't find it.

Thanks for the advice.  It is much appreciated...
Logged
Pages: [1]
  Print  
 
Jump to: