Yahoo Groups archive

AVR-Chat

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

Message

Re: Looking at doing a datalogger using an XMEGA part - not sure which storage technology to use

2010-02-01 by Donald H

--- In AVR-Chat@yahoogroups.com, Dean Claxton <deanclaxton@...> wrote:
>
> Hi all,
> 
>  I've been a little out of touch with AVR's of late, and was surprised to
> see the XMEGA part on the web site. Looks like a very capable little chip -
> lots of goodies built in that could be very useful. When did it come out?
> The datasheet revisions date back to 2008 - I must have been living under a
> rock.
> 
> The project is a datalogger for automotive use, and the XMEGA part looks
> quite attractive, but I'm still undecided on the storage side.
> 
> I understand that dataflash is fast, but realistically what sort of speeds
> could I expect if I used an SD card for data? SD would offer a much larger
> capacity than dataflash, and low cost too, but how well do they go?
> 
> Anyone here with experience with both? I have quite a number of 64Mbit
> dataflash chips on hand so it would make sense to use them, but I dont want
> to compromise the design just because the parts are on the shelf.
> 
> Thanks
> Dean
> 
> 
> [Non-text portions of this message have been removed]
>


The speed has two timing requirements.

1) actual speed of the part to transfer to its internal buffer
2) write speed.

Dataflash and SD cards are basically the same speed, limited by the SPI port clock.

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.

Google has some interesting test results for SD cards in cameras and SPI testing.

good luck, let us know how you get along.

don

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.