Yahoo Groups archive

AVR-Chat

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

Thread

RE: [AVR-Chat] Re: Looking at doing a datalogger using an XMEGA part - not sure which storage technology to use

RE: [AVR-Chat] Re: Looking at doing a datalogger using an XMEGA part - not sure which storage technology to use

2010-02-01 by Tim Mitchell

----Original Message----
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com
[mailto:AVR-Chat@yahoogroups.com] On Behalf Of Donald H
Sent: 01 February 2010 15:29 To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Re: Looking at doing a datalogger using
an XMEGA part - not sure which storage technology to use 

> 
> The biggest problem with SD cards is the assumptions
> about FAT16/FAT32. 
> 
> In the Dataflash you can write in a serial fashion with
> data flowing to the next block. 
> 
> With FAT files you need to know where to put the next
> block and to do that you need to read the directory and
> FAT table.  
> 
> After each block write it would be best if you re-wrote
> the FAT table so in case of a power failure, you would
> know where you left off.  
> 
> There has been discussion about "pre-formatting" the FAT
> table and directory so that your code can just use the
> "next block".  
> 
> But if someone sticks in a SD card with other data on it,
> it may be over written by you code. 
> 

Don't be scared of FAT, ChaN's FatFS filesystem is pretty good for this
sort of thing. You just need to provide a routine to read a block out of
the flash and to write a block into the flash. Then you've got a FAT
filesystem and you can read/append existing files on the card or
dataflash and write your own. Plus with an SD card you can take the card
out and stick it in a PC reader. Google for FATFS.

Dataflash is much more expensive for the same storage volume and you
have to be able to download the data in some way.

-- 
Tim Mitchell

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.