So
After yet another week trying to read as much as possible on the net about USB data transfer I am now even more confused.
I have data collected in a pic32 (10,000 bytes) and want to know the fastest way to transfer this to an App running on my pc without the use of the HID and its size limitations.
I've been looking at CDC, MSC, HID
I don't want to use a virtual Comm port if possible and I don't want the pic appearing as a drive on the PC.
Just simple data transfer between the pic and a dedicated App.
Any ideas from anyone?
USB Data Transfer Question
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: USB Data Transfer Question
Hi,
Basically, if you choose to use USB HID device:
In that case, data are read from and write to USB devices using the HID protocol.
If I am not wrong, it is limited to 64 Bytes/ms (~64K/second) per endpoint used.
What is important, no driver at PC side is required.
USB CDC device:
In that case data are read from and write to USB devices using the CDC protocol.
USB device look like a serial port and you need to have appropriate driver installed on the PC.
It uses Bulk transfers so theoretically you can have a good bandwidth but it is not guaranteed.
USB MSD device:
Makes the PIC32 connected with an SD card to look like an external drive to the PC.
Also, no driver at PC side is required.
You can take a look at USB Libraries which we provided:
http://www.libstock.com/projects/view/5 ... st-library
http://www.libstock.com/projects/view/5 ... ce-library
Also, so,e of our users posted their libraries which can help you, for example:
http://www.libstock.com/projects/view/1 ... ite-device
http://www.libstock.com/projects/view/71/usb-oa
http://www.libstock.com/projects/view/72/usb-na
I only give you some general explanations, but you should study little bit more about very USB classes.
There are some very useful books about USB which can help you.
Best regards,
Marina
Basically, if you choose to use USB HID device:
In that case, data are read from and write to USB devices using the HID protocol.
If I am not wrong, it is limited to 64 Bytes/ms (~64K/second) per endpoint used.
What is important, no driver at PC side is required.
USB CDC device:
In that case data are read from and write to USB devices using the CDC protocol.
USB device look like a serial port and you need to have appropriate driver installed on the PC.
It uses Bulk transfers so theoretically you can have a good bandwidth but it is not guaranteed.
USB MSD device:
Makes the PIC32 connected with an SD card to look like an external drive to the PC.
Also, no driver at PC side is required.
You can take a look at USB Libraries which we provided:
http://www.libstock.com/projects/view/5 ... st-library
http://www.libstock.com/projects/view/5 ... ce-library
Also, so,e of our users posted their libraries which can help you, for example:
http://www.libstock.com/projects/view/1 ... ite-device
http://www.libstock.com/projects/view/71/usb-oa
http://www.libstock.com/projects/view/72/usb-na
I only give you some general explanations, but you should study little bit more about very USB classes.
There are some very useful books about USB which can help you.
Best regards,
Marina
-
- Posts: 78
- Joined: 17 Jun 2008 13:38
Re: USB Data Transfer Question
Thank you for your responce Marina
You have confirmed what I thought I already had learned.
I will definitely learn more aboiut the protocols available.
I think that I will remain using the HID protocol for the reasons you have stated and I will just modify my processes to hide the delays from the users.
You have confirmed what I thought I already had learned.
I will definitely learn more aboiut the protocols available.
I think that I will remain using the HID protocol for the reasons you have stated and I will just modify my processes to hide the delays from the users.