UsbFat - a FAT32/FAT16 library for USB drives.

I have posted a preview version of UsbFat here on GitHub.

The library has been tested with Uno, Mega, and Due using this host shield.

The library can also be used with the Mega ADK board.

I am working on support for Teensy 3.x using this mini host shield.

The library can be used with USB flash drives and USB hard drives that are formatted FAT32 or FAT16.

There are four example programs.

Here is output from UsbDriveInfo using a hard drive on a Due board.

UsbFat version: 20141220
FreeRam 93343
Type any character to begin
USB initialized.
Volume initialized.

Volume Size: 499982.60 MB (MB = 1,000,000 bytes)
Volume is FAT32
blocksPerCluster: 64
clusterCount: 15258258
fatStartBlock: 2080
fatCount: 2
blocksPerFat: 119206
rootDirStart: 2
dataStartBlock: 240492
Determining free cluster count - please wait.
freeClusters: 15258244
freeSpace: 499982.13 MB (MB = 1,000,000 bytes)


This hard drive has 15,258,258 clusters so scanning it for free space takes a while but works.

The other examples are

UsbFatBench - A read/write benchmark.

UsbFatDemo - A simple Demo program.

UsbLogger - A simple modifiable data logger.

Are the units for the drive size correct ?

Volume Size: 499982.60 MB (MB = 1,000,000 bytes)

a 500GB disk is really impressive if its a single drive, where do I get one?

It's just an old Seagate 2.5" 500GB drive that I am using for tests. Has a 08/2011 date code. Looks like you can still buy it here.

My apologies, I misread things entirely, I thought it was a 500 TB drive when I read your posting, then mistyped the units (which actually made them correct) when I put made my comment.