Use MSC when people should read your data as ordinary files on a removable drive. Start with the three small RAM files used in this guide.
Choose Mass Storage Class (MSC) to make the PIC appear as a removable drive. The PC uses its normal storage driver, so users can read your files without a special PC program.
You choose the filenames and sizes in advance. The library creates the drive layout, and your program supplies the file bytes when the PC asks for them. A file can contain fixed text, a saved reading, settings in RAM, or data from external memory. For a writable file, your program also handles the bytes sent by the PC.
The drive uses a fixed 1024 KiB FAT12 layout: 2048 sectors of 512 bytes, with 2034 sectors available for file data. You do not need a megabyte of PIC RAM. The library creates the disk information as needed and moves file data through a 64-byte array.
These are fixed files. You can offer 1–8 files. The PC can read them and overwrite files marked writable. It cannot add, delete, rename or resize files, change their disk allocation, or format the drive. For a stream of commands and fresh readings, choose HID, CDC or browser mode instead.
Created with the Personal Edition of HelpNDoc: Elevate Your Documentation Process with HelpNDoc's Advanced Features