USB : USB Classes    USB Classes for Microcontrollers  

That FAT file system that you have to use on your microcontroller is complex to use as well.

The reason for that is that the Mass Storage Class specification was deliberately written (by Microsoft) to be a low level interface.  The commands that the PC sends to the device are set up to request or manipulate sectors of data: there are no high level MSD class commands like "give me a file named MyStuff.dat".

This was done to protect Microsoft, not to help you.  Microsoft Windows is supposed to "format" your MSD storage before you can use it.   And for the priviledge of letting them do that, you get to pay Microsoft a per-device royalty.

Ironically, this actually makes it *harder* for you to work with your data on the microcontroller, because you now have to have code in your device that can figure out how to construct a file (using "tracks" and "sectors" that don't really exist in your device) that can not only hold the data that your device collects, but also be readable by Windows.

When all is said and done, it's actually easier for you to create a high level interface (e.g., "device, give me all your data") between your USB device and a very simple Windows program (most of which can be automatically generated for you by HIDmaker FS) that can upload your data to the PC and store it to a file there. 

 
  

16 of 29
Copyright Notice and Author Information