Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] SD Card Feedback + FAT16 information

2006-05-08 by Jesper Hansen

If you're just using this for a logger, you can do it the easy way.
Format the card as usual on a PC, and (with the PC) create a big txt 
file that will be big enough for your logging data.
Write a 4 byte unique tag to the start of that file, and leave the rest 
as spaces or nulls.

When writing with the logger:
* scan sectors for the tag
* write your data at that location and onwards simply linearly stepping 
to the next sector if you pass the 512 byte limit.
* write back the tag.
repeat

This is simple and works great. No need to hassle with FAT tables or 
directory entries.

/Jesper



kernels_nz wrote:
> Does anybody have any documentation that will get me started in
> generating a FAT16 filesystem on the SD card, so I can log data from a
> microcontroller to SD card and read as a .txt file on a computer ? Ive
> had a quick search on google, but would prefer seeing a memory map of
> what it should look like.
> 
> Thanks again guys.
> 
> Regards
> Hein Beyleveld
> Auckland, New Zealand.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.