EEPROM Versus RAM which way to go?

rigidigital

Senior Member
To continuously store and send/clear data. I read that EEPROM has limits as to how many times it can be written. Could anyone elaborate ? I have the 14M chip in mind ..,(make that the 40X if things don't go so well :)
prices are a factor.
32K Serial EEPROM. 8 pin DIP $3.00 or
256 x 8 I2C RAM $8.25

thanks,
Mick





3.00

MIC052


1


256 x 8 I2C RAM








8.25





8.25
 

hippy

Technical Support
Staff member
Eeprom has the advantage that anything written to it stays there until changed, even when the power is removed. It's disadvantage are that you can only write to it a limited number of times and writing is quite slow, in the region of milliseconds. Being able to write 1,000,000 times is not unusual these days, and that is a lot unless you are writing to it frequently when it would soon be worn out.

Ram on the other hand has the advantage that it can be written to an unlimited number of times, writing is quick but data is lost as soon as power is removed. It is possible to 'battery backup' Ram in some cases.

As to which is best to use, it all depends upon what you want to do.

Don't forget that PICAXE's have internal Eeprom ( READ/WRITE ) and all but the 08 have Ram ( PEEK/POKE ) which may be used without using external chips.
 

MORA99

Senior Member
Is it only the write that is limited in eeprom?
so you can read and compare before overwriting to avoid writing redundant data ?
 

hippy

Technical Support
Staff member
Yes, Eeprom has an unlimited ability to read ( and quickly ) so a good technique is to check that what is to be written isn't already there before writing it.
 

demonicpicaxeguy

Senior Member
ok claiming fame here ,,,

acording to manufacturers eeprom cells will last 1 million cycles if you look up "endurance testing" you find a topic started by me where i destructively tested a pic's eeprom cell under normal everyday conditions and it failed at 4,931,271 cycles almost 5 times what it's rated for

 

BeanieBots

Moderator
Sample size 1 @ room temperature & humidity with nominal Vcc.
Not sure what your test demonstrated.

Arizona Microchip have tested millions at extreme specified conditions.
(I use to make the test gear!).
 

demonicpicaxeguy

Senior Member
the whole point was that while they are rated for 1 million they are tested under extreme conditions high temp... etc,
my test was at a more realistic room tempreture in conditions the everyday tinkerer on here was going to be using them under
 

BeanieBots

Moderator
I take your point but the largest variation will be on which production run the sample came from. If you test another bin, you will probably find one that will do 50 million. Get a 'Friday' bin and it will drop to about 2M testing at 25C 5v and only just over 1M at 60C 6v.
The major factor is contaminants diffused into the substrate and the depth of dopant implanted at the first stage. When semiconductor making equipment is stopped for maintenance, the contaminants will be high for the first few runs, then drops down until it starts to rise again prior to the next maintenance slot.
The implant process is more "black art" and can be influenced significantly by the individual who does the tuning. Hence the need to give conservative specifications.

I spent 15 years as a designer of semiconductor manufacturing equipment. My main involvement was the robotics side but inevitably I picked up a fair amount of knowledge about how the actual semiconductors are made and in particular, what destroys them.

Nearly forgot, writing to two or more cells that are physically close to each other (not necessarily close address wise) will cause an earlier death.

Edited by - beaniebots on 25/08/2007 01:19:08
 

rigidigital

Senior Member
Thanks for the enlightenment. That was pretty interesting. I think im going to have to use one method.
My code is only 40 lines and storing 80 bytes of data and its over the limit of the current 08M unless there is some error in code.

 
 

demonicpicaxeguy

Senior Member
i got to know this but why when there is a bigger chip with more memmory and features
why is it that people still try to get so much out of an 08m ? it's got me puzzled
grated it's quite a powerfull little thing, but i got to ask why..? it's just interesting
 

andrewpro

New Member
You could also take a look at FRAM. No, not the oil filters...Ferroelectric RAM. It may be tough to find, but it IS out there.

It's got the speed of ram, and is non volatile with no need for a battery backup. It can also be erased and re-written somewheres around One Hundred Million Billion times. I'm not making that number up either! It's really nice stuff.

-Andy P
 

premelec

Senior Member
www.ramtron.com.... I use 08s to see how much I can do with how little! A challenge left over from the days of small memory [e.g. Sinclair 1K byte computer - my first].
 

demonicpicaxeguy

Senior Member
fair enough,i just had to ask because i see people trying to do all sorts of things with the o8m and you think quietly to yourself "if you need more outputs use a bigger chip".....
what would be interesting is a interfacing an sd card to am 08m, 80 lines of code...... hmmmmmmm might be possible,it's got enough pins


Edited by - demonicpicaxeguy on 25/08/2007 07:02:57
 

Jeremy Leach

Senior Member
DPG ..mine's exactly the same reason as premelec. (ZX81 etc). The satisfaction of getting more from less and acheiving 'the impossible'! I think thats a big appeal of picaxes in general though.
 

xstamp

Senior Member
FRAM devices are not difficult to find, at least in the UK. Farnell ( www.farnell.co.uk) stock a good range from Ramtron. Take a look at the PICAXE based Rocketry Flight Recorder article in the August issue of Nuts&Volts magazine for an example of how to use the FM24CL256 (www.ramtron.com). This 8-pin 32,768 x 8 device has an I2C clock speed of 1Hhz. The Flight Recorder is able to write data at over 500 bytes per second, not bad for a logger running Basic.

 

Dippy

Moderator
I think DPG should do his endurance tests on FRAM. He could give us updates once a year :)

FRAM is great, but note that it's only available in Surface Mount now - unless you're lucky enough to find a dusty old shop with dusty old stock. soic8-dip8 adaptors are available of course.

SD? Newbies- forget flakey DIY. To make it practical/sensible you need FAT. If you've got a spare 6 months go ahead and try and write some code, but some cards are more sensitive to timing variations than others Just buy a chip/module. Expensive? Well it depends whether you value months of head-scratching being worth a few quid.
 

demonicpicaxeguy

Senior Member
it'd more like once a decade,

i know a few people here didn't see the point to my eeprom endurance test and thought it was a waste of time, but i think for a few people it opened a few eyes
as when some people see a rating they never test it or they write code that that avoids the 1million cycles mark like the plaige

as for my sd card crusade i think i'll give it another month after that i think i'll just follow the "pic-sheep" and just buy a module that already works
 

xstamp

Senior Member
Sorry, it should have been a clock speed of 1MHz!

I get around the surface mount problem by soldering the FRAM chip on top of a turn-pin DIL socket and then plugging this assembly into an identical board mounted 8-pin socket. However, you need to splay out the chip leads a bit to reach the sockets.


 
G

Guest

Guest
rigidigital does'nt mention how much he wants to store. If it is only to hold the values of vaiables, to overcome the limited amount of variables in the picaxe, then do what I do, use the scratchpad in a RTC.

OK, only 56 bytes, but if you mod your program or reset the your variables are still there.

Also usefull for storing last adress used in eeprom.
 

jaka

Member
rigidigital does'nt mention how much he wants to store. If it is only to hold the values of vaiables, to overcome the limited amount of variables in the picaxe, then do what I do, use the scratchpad in a RTC.

OK, only 56 bytes, but if you mod your program or reset the your variables are still there.

Also usefull for storing last adress used in eeprom.
 

inglewoodpete

Senior Member
Since DPG asked, here's why I tend to use an 08M whenever I can:

An 8-pin chip is <i>SO </i> much easier to design a circuit board for.

On the other hand, I have found the 08M's EEPROM difficult to use effectively and the RAM is almost impossible to use: both simply because of program space overheads to fit the code needed to use the EEPROM and RAM.
 

rigidigital

Senior Member
The memory requirements are to sore ten decimal digits. From a keypad. I would like to enable a 1 being entered, a 2 being entered, and that saved as 12 in a byte. So my coding attemt at with has failed.
eg. b0 = 1 + 2 = 3 'wrong answer
b0 = 1 and 2 = 12 'wrong.

I want to store up 2k of data.
I have 32k eeprm I2C
and also bought 256 * 8 RAM (netsever something)
found an artice to hook up the eeprom but not just yet for the RAM or how it needs to be accesd.

I dug in deep to my wallet and bought lots of picxechips, and uhf jaycar(for the moment)

Stil tring to get cheap LCD 's.

Was going to get the USB stick interface but just for now it was too expensive to my hobby limit at 60 odd dollars.

So eventually Ill get back to smartCards one day.

 
 

BeanieBots

Moderator
Umm... so the data to be stored comes from a keypad? Entered by a human pressing the keys?

Assuming the EEPROM is good for a million writes, how long do you think it would take to make a million keypad entries?
Also, does the specsheet for the keypad give a contact rating? I'd hazard a guess that it is probaly only rated for a million pushes on each button so you'll probably wear out the keypad before the EEPROM!
 

demonicpicaxeguy

Senior Member
i wouldn't even bother taking the 1million cycle limit into account with this application,the keypad would probably be on the way out before the eeprom would be and even before that it'll probably outlive it's use anyway
 

Dippy

Moderator
That's what BB just said.

Rigidigital needs to give a bit more info really.
He/she hasn't said whether the data storage needs to be non-volatile or what. But I2C EEPROM is cheap and easy to use.

Is this 2K data all from the keypad? Or is a bit from the keypad and rest from elsewhere? If all from keypad then BB and DPG are completely right.

Saving bytes is admirable if really required. How to store &quot;1&quot; and then &quot;2&quot; as &quot;12&quot; in a single byte? Well I suggest you have a quick think at how the decimal system works. 12 is, after all, 1x10 + 2x1?
But if you have more than 10 buttons on your keypad (or you have variable length keystroke input) then you might have to think again. Just spend an extra 50p and get a bigger EEPROM and blow saving space.
Let's not mention page boundaries yet.
 

rigidigital

Senior Member
I'll try and explain the system I an working on clearly.I have to find electronics courses or electronics clubs in nesrby town to no avail.
However this forum is unbeleviable in the help that is provided .


1, Is all the data from the keypad: YES IT IS
2. The key pads have 12 buttons. (0-9), and( '#' , ' * ')
3 . at tis satge I am using 32k IC2 EEPROM
3. Ram might be beter for speed , i bought it but for now I will be happy to get the eeprom working


Thanks for the help refering me to rethink decimal. i see now that I have to determine if the first kety pressed was a 1, and then multiply by 10, or if '2' was pressed first it has to be multiplied by 10 etc etc.


 
 
For cheap LCDs try RS --&gt; <A href='http://rswww.com/cgi-bin/bv/rswww/searchBrowseAction.do?Nr=avl%3auk&amp;N=4294961950&amp;callingPage=/jsp/browse/browse.jsp&amp;Ns=I18NPrc1_uk&amp;No=0&amp;BV_SessionID=@@@@2005406350.1188811460@@@@&amp;BV_EngineID=ccdfaddlljdlfdhcefeceeldgkidhgi.0&amp;cacheID=uknetscape' Target=_Blank>External Web Link</a> - not sure what the postage to Australia would be though...

As to the RAM chip, it can fit into the same socket as the EEPROM and its datasheet is here... <A href='http://www.rev-ed.co.uk/docs/mic052.pdf' Target=_Blank>External Web Link</a>
Hope this helps
notwhoyouthink
 

Dippy

Moderator
Good find nwyt.

But DOES the memory have to be non-volatile? Or are you OK with bat backup?
Speed? For saving keystrokes? EEPROM too slow? You must be a fast typer.
 
Top