[Icc-avr] SD card sollutions

Sean Ryan sryan at pmsi.cc
Tue Nov 13 12:28:02 PST 2007


One idea that we have used is to use a large circular buffer file on a
pre-written fat file system..  Then treat that buffer however you want on
the pc..

On Nov 13, 2007 2:14 AM, Bengt Ragnemalm <benra at imt.liu.se> wrote:

>  I'm building a device with a data logger function using a SD card. There
> are some questions someone maybe have answers to
>
>
>
> The SD card is accessed using SPI.
>
>
>
> 1. Saving data to SD cards is always done in 512 bytes block. Now the
> question is there should I save my temporary data until I can write to the
> card? If I save the block in the controller, it will be more complicated to
> write all the 512 bytes without disturbing my sampling. To save power, the
> microcontroller is in power save mode between samples. An alternative would
> be to use a software bit-bang SPI explicit to the SD card and hold the card
> open all the time. This sound like a simple solution but maybe this will
> consume more power?
>
>
>
> 2. I need fast sampling rate and therefore I plan not to use a FAT system.
> Also full support of a FAT system will need more CPU recourses. A solution
> could be to always start with a formatted card but I still have to deal with
> updating the FAT sometimes or my file(s) will be lost if power is switched
> off. A problem with not using FAT is that I need to write my own reader in
> the PC program. I have no code for that. Anyone who have or now there I can
> get it? We use C#. Java will do also.
>
>
>
> /Bengt
>
>
>
> ________________________________________________________________
>
> Bengt Ragnemalm                        Tel +46 13 22 24 97
>
> Research engineer                                       FAX: +46 13 10 19
> 02
>
> Linköpings Universitet
> mailto:bengt.ragnemalm at imt.liu.se <bengt.ragnemalm at imt.liu.se>
>
> Inst. för Medicinsk Teknik Internet:        http://www.imt.liu.se
>
> S-581 85 Linköping SWEDEN
>
>
>
>
>
> _______________________________________________
> Icc-avr mailing list
> Icc-avr at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-avr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20071113/24ddb51c/attachment.html


More information about the Icc-avr mailing list