How to caculate the needed capacity of the SD flash memory card

  • Thread starter mz8e08
  • Start date
  • #1
3
0

Main Question or Discussion Point

Hi, I gonna interface a microcontroller with SD flash memory card for data log. How to caculate the needed memory capacity?

Thanks
 

Answers and Replies

  • #2
negitron
Science Advisor
842
1
The number of bytes your datalogger will put output per second times the number of seconds you want to record. Alternately, the number of bytes per sample times the number of samples per second times the number of seconds of desired recording time.
 
  • #3
berkeman
Mentor
56,602
6,506
Hi, I gonna interface a microcontroller with SD flash memory card for data log. How to caculate the needed memory capacity?

Thanks
Beyond negitron's answer, there are a bunch of things you need to look into before deciding. Flash memory is organized by sectors, where to write a byte in a sector, you need to first read the whole sector into your local RAM, erase the whole flash sector, change the byte in your local RAM copy, and then write the whole sector back to the flash.

Since the flash memory has a limited endurance (how many times it can be erased and re-written), and since you may accidentally get reset or lose power during the flash write process, you will generally use (or write) a "Flash File System" to manage the whole flash memory process. Using a FFS increases the required size of the flash memory, since multiple copies of things are kept at different times (a concept called "journaling").


This wikipedia article gives a pretty good description:

http://en.wikipedia.org/wiki/Flash_memory

.
 
  • #4
3
0
Hi berkeman,
I've planned to choose a SD card, and thought the bigger capacity the better. But, will it happen that some of the memory addresses can not be accessed? I chosed the msp430F2274 microcontroller.
 
Last edited:
  • #5
negitron
Science Advisor
842
1
Oh, that's an entirely different question than what it appeared you were asking about. There are a number of ways to tackle addressability issues but in this case, it's particularly simple, since the SD card uses a serial interface:

http://www.interfacebus.com/Secure_Digital_Card_Pinout.html

Any uC should be able to fully address any card on the market.
 

Related Threads for: How to caculate the needed capacity of the SD flash memory card

  • Last Post
Replies
1
Views
1K
Replies
3
Views
1K
  • Last Post
Replies
5
Views
2K
Replies
3
Views
3K
Replies
2
Views
921
Replies
1
Views
6K
Replies
1
Views
2K
Replies
2
Views
3K
Top