MSTOR Datasheet by Versalent
|
MSTOR Arduino Disk Shield
|
FEATURES
- Serial interface to standard USB drive, FAT formatted, PC compatible
- Easy access using standard file operations
- Onboard battery backed real-time clock
- Automatic error detection/correction communications
APPLICATIONS
- Arduinos without USB needing large/removal storage
- Systems requiring data/file portability with a PC
- Long term data logging
- Adds storage to existing systems
|
DESCRIPTION
MSTOR is a
standard Arduino Shield that brings up to 16 gig of mass storage to systems with no USB ports. The embedded file system allows a user to send simple commands to List Files and Directories, Read/Write/Append or Delete Files, Make/Delete Directories and more using familiar functions. A fully operational Arduino application is provided to exercise all features. Full manual here
See the code here to read a file. Similar code here to write to a file.
|
Resources Required
- A Serial Port -- SoftwareSerial operates up to 38.4k baud. HardwareSerial operates to 250k baud (sacrifices Serial Monitor)
- A Timer -- One interrupt-based timer running at 2-25ms.
- ~6k code space/150 bytes RAM for Mstor.cpp driver
- Programming skill needed to operate: LOW to MODERATE.
|
Software Applications
- Complete Arduino Uno sample application which provides a simple user interface to exercise all Mstor features. Can be used as a development guide, a cut/paste source for Mstor features, or an as-is application .. download here
- An Arduino application template to start a new application download here
|
EASY USAGE OVERVIEW
After an Mstor object is created: Mstor myMstor;
you have access to Mstor's methods and data.
- To send commands you invoke the command method with any needed parameters .. i.e. myMstor.fileOpen('R', filename);
Every method returns a result which is typically 0 for success, or non-zero indicating an error (codes listed at the end of the manual). And every method is timed so that a result is ALWAYS returned even if Mstor fails to respond
- When reading (records) from an open file data is returned in the myMstor.data[] array and the number of bytes returned is myMstor.data_count. To minimize Arduino data usage this array has a size of 32 bytes. If the number of bytes returned from a read operation is zero, Mstor has reached the end of data. view/copy simple read-file code here
- When writing (records) to an open file: you have the option of writing strings or binary data.
- To write Strings: myMstor.fileWrite("a file string") presents the string as a parameter of the command so does not use the myMstor.data[] array.
- To write binary data: you load up to 32 bytes in myMstor.data[] , set myMstor.data_count, and invoke myMstor.fileWrite() -- no parameters. The binary data is written to the file. view/copy code here
See the manual for a detailed description of configuration options.
|
|
Warranty
Home |