Select category:
TI LaunchPad

and use any of my projects or libraries, and would like to encourage further development you can donate through PayPal here:

Rather donate hardware directly? Then click here.

Library: tinyFAT

This library was made because I wanted to learn more about SPI communication and filesystems. I also could not find a ready-made library that did what I wanted it to do.

SD CardsmicroSD card with adapterSD card shield from ITead Studio

The library supports FAT16 formatted SD cards up to 2GB in size. 4GB FAT16 formatted SD cards does not work. Long filenames are not supported. Keep your filenames compliant with the old 8.3 standard.

The SD card should be connected to the SPI-pins on your Arduino. Pin connections are available in the documentation in the download.


Due to the difficulties in getting hold of SD/microSD cards that are suitable for use with this library (2GB or smaller) I have decided that it is no longer worth the time and effort to continue developing this library any further.

This also means that there will not be any support for more microcontrollers or development boards than there currently is. So no support for Arduino Due, Teensy or chipKit will be added.


(Filesize is 368.14 KiB. Downloaded 42911 times)

Demos are included to demonstrate most of the functions.

Latest changes:
v3.003 Jun 2012added Arduino 1.0 support
  rewritten all the low-level functions
  fixed a bug making it possible to read past the first 32MB
For a full list of changes please see the file version.txt included in the download.

Nice to know:

Do not reset your Arduino while the SD card is being accessed. Doing so will usually result in the SD card locking up. If it should happen to you it is resolved by removing all power to the Arduino, waiting a few seconds, and the reconnecting the power.

If you want to use a non-standard SPI SS pin you must set the pin with file.setSSpin() before calling file.initFAT().


WorkingArduino Duemilanove w/ATmega328
WorkingArduino Uno
Not workingArduino Leonardo
WorkingArduino Mega
WorkingArduino Mega2560
Not workingArduino Due
Not tested, UnsupportedBobuino
Not workingTeensy 3.1
Working = Working   Not working: Not working
Not tested, Unsupported = Not tested, Unsupported


The manual is included in the download


By downloading the library you accept the following license:
Creative Commons BY-NC-SA Logo
Creative Commons (CC BY-NC-SA 3.0)
View SummaryView Legal