Author Topic: Need suggestion about data acquisition via USB  (Read 9259 times)

xihad

  • Member
  • ***
  • Posts: 5
Need suggestion about data acquisition via USB
« on: March 19, 2012, 06:09:40 am »
Hi Jan,

For one of my projects i need to transfer 2000 bytes of data in 40 microsecond guaranteed time interval. As i m a complete newbie with USB interfacing, can you please suggest me a possible combination of Micro controller and USB data transfer type i should use to accomplish the desired data acquisition.

Thanks in advance. take care.


Zihad

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Need suggestion about data acquisition via USB
« Reply #1 on: March 19, 2012, 10:17:41 am »
2000 bytes / 0.000040 sec = 50 MBytes/sec.

SuperSpeed isochronous transfers can do this but don't provide error-checking.

High speed is 480 Mbits/sec, which works out to 60 MBytes/sec, but the maximum data throughput is lower due to addressing, error-checking bits, etc. 

Compressing the data before sending is one way to reduce the amount of data to send.

Jan

xihad

  • Member
  • ***
  • Posts: 5
Re: Need suggestion about data acquisition via USB
« Reply #2 on: March 19, 2012, 11:06:02 am »
HI Jan,

Thank you very much for the response! In my previous post i actually made a mistake . I actually tried to mean i need to acquire total 2000 bytes of data at a rate of 1byte per 40 micro second.
Also can you please suggest me any micro-controller which would be useful in that case? really appreciate your help. Thanks!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Need suggestion about data acquisition via USB
« Reply #3 on: March 19, 2012, 11:43:24 am »
A high-speed interrupt endpoint can do this.

If you don't want to provide a host driver, take a look at HID:

www.lvr.com/hidpage.htm

or WinUSB:

http://www.lvr.com/winusb.htm

Some things that can affect throughput are the size of the data packets and the length of the transfer (whether each transfer is a single byte or multiple bytes).

Just about all general-purpose high-speed controllers support interrupt transfers. Look for one with example code:

http://www.lvr.com/usbchips.htm

If you have control over how busy the bus is with other traffic, you may be able to use bulk transfers. In that case, the easiest path may be the FT232H or similar.

Jan

Bret

  • Frequent Contributor
  • ****
  • Posts: 68
Re: Need suggestion about data acquisition via USB
« Reply #4 on: March 19, 2012, 04:07:51 pm »
Do you actually need each byte at precisely 40 microsecond intervals, or does this just need to be an average?  Do you care about latency or jitter in the timing?  Do you need to guarantee data delivery or integrity?  Just some of the questions you need to answer before you decide on an appropriate transfer mechanism in USB, or whether USB is even an appropriate medium to use.