UsbFat for USB flash drives?

Any interest in a SdFat/SD.h API for USB flash drives.

I have a prototype working on Uno using this host shield

USB drives will require more memory than SD. My test program with ls() and a write call takes a lot of flash.

Binary sketch size: 25,206 bytes (of a 32,256 byte maximum)

Here is a small section of the code:

  Serial.print(F("FreeRam "));

  // Init the USB key.
  if (!key.begin(&usbBulk)) {
    Serial.println("key.begin failed");

  // list files on the key., LS_A | LS_DATE | LS_SIZE);

And here is the output:

FreeRam 945 2014-05-02 12:58:28 0 $RECYCLE.BIN/ 2014-11-11 09:14:56 65 With.Two dots.txt 2014-11-14 10:29:08 151 A long name can be 255 characters.txt 2014-11-11 09:03:54 45 LFN,NAME.TXT 2014-11-11 09:14:56 186 lower.txt 2014-11-11 09:14:56 188 MIXCASE.txt 2014-11-11 09:14:56 184 mixed.TXT 2014-11-11 07:57:28 67 Not_8_3.txt 2014-11-11 07:54:26 30 OK%83.TXT 2014-11-11 07:59:42 33 STD_8_3.TXT 2014-11-11 08:59:48 59 With Blank.txt

This is with Long File Names so you could save a little flash with short names. It would be fine on Mega.

Yes, I am very interested. I have an application at work which could use this. The microcontroller is an AT90CAN128, which hopefully has enough memory. The device currently uses a micro-SD card, which is glued into a socket mounted on a PCB, which in turn is enclosed in a box. In short, the card is not accessible. Replacing it with a removable USB thumb drive would solve a lot of issues.

I suspect he was asking in an Arduino sort of context..... :astonished:



Actually it is an Arduino of sorts. The software is Arduino-based, as is much of the hardware. The design started out as an Uno with a CAN shield, but morphed into the AT90 when we needed more CAN channels and more flash memory.