I'm using Atmega328, the capacity of its eeprom is not enough to sotre my data, so what is the best soution to add a external memory ? if you know that the data will be erased evey few weeks.
How much data?
can you give possibilities for less and more than this number, I mean 1MB
Cheap, quick and easy to interface.
I guess SD will be my choice
From my one week experience in attempting to make an SD to work (not yet successful ):
The IDE SD built-in library is huge (on my UNO this library alone is close to half of the available memory). Adafruit SD library is said to be smaller (I have no experience with this one).
There are some difficulties in coding SD on Arduino - seen from the forum posts (see pin 10 OUTPUT and HIGH solution).
Available formatting is FAT32, for most of the SD cards I can find (high capacity), FAT 16 looks obsolete
SD are 3.3. volts only, however there are readers able to work on 5 V (mine is some 4 USD).
I am going to explore other ways to store info as well. For me, SD uses excessive memory and is to much trouble.
Thank you falexandru for your reply,and I hope it will work well with you very soon. Im waiting to my sd card shield to arrive, so I only have a theoric idea.
From what I read, it seems easy to some people to use it, and others gave them a grief, so Im not sure what will be my case, but can you tell me which shield and library did you choose ,and what kind of problems did you face?
I use the built-in SD library in IDE (the one which appears in the menu).
First, I had to hunt for a microSD 5V module - fortunately I found one (I do not like to mix 3.3V with 5 V - so easy to mistake wiring).
The module is this one:
(some 4 EUR)
Then, my attempt to power the SD module on a breadboard source while keeping UNO on its own USB didnt work (I spent one day on this issue). I had to power microSD module from UNO 5V - that was ok.
Then comes the point to format the microSD - in which I am blocked right now. There is quite a lot of opinions on how to format an SD (SDHC) (either by dedicated SD formmatter or via Windows (7)) - but I found them almost useless in my case. One day spent already and still not successful.
A good tool I found is the SD tester (a sketch that debug the formatting action). I posted the code somewhere in the forum. Not my code.
Fortunately, to learn SD for 4 EUR is not a big deal, and 3 days of digging in SD issues may not be to much for learning purposes.
I am now going to explore the EEPROM. I found that recent ones are up to 1 million cycles, which I dare to say it suffices. Even 100,000 cycles looks to me a reasonable value, seen from the very low cost of these chips (some 2-3 EUR- > compare with the prices of a microSD). Well, of course, it depends on the purpose of the memory use.
Hi falexandru! hope you've fixed your problem with your sd card
I got my sd card module and I started my tests, the module is working well, so I can create, read, write in files, and also read the right volume.
anyway, I'm wondring now why you need to use a specific formatter, or even why you need to format you sdcard in the first place, because when I want to delete a file, I just do it with ordinary way, and it looks working well!