Fat provides support for FAT16 and FAT32 formatted SD cards, and it is compatible with both 8-bit and 16-bit PIC microcontrollers.
This library includes a variety of user-oriented procedures designed to simplify the interaction with SD cards that are formatted using the FAT file system.
Throughout this guide, Fat.inc examples mostly use ASCII text for clarity — but the library itself only manages the FAT chain and byte-level I/O.
It has no concept of "text file" versus any other kind; what a file's bytes mean is entirely up to whoever writes and reads them.
Every text-oriented function in this library — File_WriteString(), File_LogLine(), and the rest — is really just a convenience wrapper around writing bytes one after another.
Underneath, you're never limited to text: if you know the structure you want, you can build any file format.
Log a temperature sensor's readings as raw binary instead of ASCII digits, for instance, and read it back byte-for-byte on your PC or another embedded device — as long as both sides agree on the layout.
This library already does exactly that internally: the screenshot feature builds a real .bmp file by writing its header and pixel data in the exact structure the BMP format requires — nothing text-like about it — and the result opens in any image viewer like any other bitmap.
Created with the Personal Edition of HelpNDoc: Free EPub producer