Software to get data throught  usb?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Software to get data throught  usb?

2,354 Views
fredycolombia
Contributor I
Hi all,

Actually I'm using Jm60 to get data using usb bulk transfers.
I test datalogger and works fine, Now I want to development  with  any software,  an interface to similar to datalogger,   when I can see the data acquired (adc).

What  software is   easy and  quick to configure to see my data or  when I can find it.
I need this software was compatible with freescale  mcu.

thanks in advance,

regards
fredy

Labels (1)
0 Kudos
Reply
3 Replies

495 Views
fabio
Contributor IV
Hi Fredy,

This is not an easy question. Most people believe USB is just like a COM port and that porting a serial application to USB is just a matter of changing the medium. Unfortunatelly it is not so easy.

The first thing to note is that USB is not just a serial line, it is a complete (and complex) protocol. USB is a master-slave assynchronous serial protocol where the master (the host) controls all aspects of the communication.

USB is based on frames and uses a multiplex scheme just like a TDM multiplex. There are special electric levels, packets, pipes, transactions, requests and descriptors used to support the configuration, control and data-flow.

When a USB device is plugged in a hub port, the host is notified of this event and starts a standardized protocol to read the device characteristics and capacities. These information are stored in descriptors. By reading these descriptors the host can decide which driver must be loaded to communicate with the device.

That said, I believe there are some ways to communicate with a USB device:

1- by using an HID firmware. HID devices are human interface devices (such as mouse, keyboard, joystick, etc) which interact with the user and send (or receive) information to the host. The HID class includes some interesting devices such as: displays, leds, keys, switches, etc. Some generic HID drivers are automatically loaded by the OS (such as mouse and keyboard drivers), but to use a HID display, you will need to write your own application. There are some websites describing how to do it: http://www.lvr.com/hidpage.htm and http://www.beyondlogic.org/usb/usbdevdrvs.htm are two of them. I have implemented HID devices (a mouse and a volume control) using a STR711 (ARM7) MCU, I would like to try the JM devices as soon as I get a kit. I also played with HID programming in windows (using Delphi and the JEDI library).

2- by using a CDC firmware. The CDC class is used for external USB modens and includes virtual COM ports. By using a virtual COM port, you don't need to modify your host application and this is an easy way to add USB functionallity to an existing device (the FTDI chips work this way). I also implemented CDC firmware, but only on the STR711 MCU.

3 - by using your own device class. This is the hardest way. You will need to write your own host driver ... Good luck!

This is just a beggining, hope it helps.

Best regards,


Message Edited by fabio on 2008-04-09 01:26 PM
0 Kudos
Reply

495 Views
JimDon
Senior Contributor III
I have sample software for the JM60 that is a re-write of the CMX HID examples. Using Generic Hid you canget  a reliable 16KBS throughput (this maps to about 170K baud on a serial port).

However, whether you use serial, CDC or hid you will have to write an application to display you data. I have a DLL that will work with any language, even LabView for HID.


Also, if you use the CMX CDC example, it does not need a custom device driver, just an inf file that points your device to the windows build in usb serial port drivers.

0 Kudos
Reply

495 Views
TurboBob
Contributor IV
Hey,
 
I am getting into the JM60 USB stuff now, and am not sure of the best place to start.  I have minimal data transfer requirements as we discussed in that other thread.  I want to exchange some data between my BCB5 application and the JM60 device at a rate of 10 hz or so.
 
I want to use the generic HID method.  Should I load the HID demo into my board and try to talk to it from my application?  Did your examples get posted yet?
 
Thanks a ton,
 
Bob
0 Kudos
Reply