CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

The lifetime of DS1307 NVRAM

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

The lifetime of DS1307 NVRAM
PostPosted: Sat Feb 16, 2013 3:50 am     Reply with quote

Hi,

What is the life time of the NVRAM in a DS1307 ?? Is this an EEPROM or a FLASH based RAM.

I notice that the values are retained even when the +5V supply is switched OFF and with the lithium battery removed.

Is there any data on how many times data can be written or read to it ??

Also are the time/date values stored an EEPROM or a memory similar to NVRAM ??

The reason I need to know this is that I am planning to use the DS1307 NVRAM to save some data in case of power failure. Instead of doing this on the PICs EEPROM (which I know has limited write cycles)

thanks
a
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Sat Feb 16, 2013 4:27 am     Reply with quote

EEPROM, and flash are basically exactly the same. Flash is a type of EEPROM. However the term 'EEPROM', is reserved (normally) for memories that have a cell size of 1. Having an erase transistor for every cell, as opposed to a block of cells. This makes them more expensive to make, and bulkier. All memories of this type have limited erase cycles. The actual life depends on the exact cell structure and chemistry. Historically the structure used for EEPROM, was a relatively 'early' form, which had a lower erase life than most modern types.

The memory in the DS1307, is 'non volatile SRAM'. The form used actually does require voltage to hold it's contents, but the voltage needed is tiny, and the capacitances inside the chip and on the board will hold the contents often for days. I remember a guy from Dallas demonstrating that without a battery, and with no supply, normally it'd hold it's contents, even overnight. As such, there is no limit on the write life, but you do need to maintain the battery if you are to be _sure_ that the contents won't be lost.

Best Wishes
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

RE:
PostPosted: Sun Feb 17, 2013 4:31 am     Reply with quote

Thanks Ttelmah for clearing that up.

thanks
a
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Sun Feb 17, 2013 4:57 am     Reply with quote

I was lucky enough to have a guy from Dallas come and show me the chips when they were launched (admitting how long ago that was would be scarey...). We asked exactly that question about whether the battery was needed.....

Best Wishes
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Sun Feb 17, 2013 9:04 am     Reply with quote

Hi,

I think the premise of the original question is flawed. The Dallas 1307 datasheet refers to the memory on the chip as "Battery Backed SRAM", and does not use the term 'non-volatile' at all. SRAM, or static RAM, is memory that retains its contents so long as power is applied - remove the power, and lose the memory contents! As Ttelmah pointed out, the memory loss is not always instantaneous, but it will go away sooner rather than later....

You need a battery to maintain the DS1307 memory!

John
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun Feb 17, 2013 11:14 am     Reply with quote

ezflyr wrote:
Hi,
You need a battery to maintain the DS1307 memory!



I've also seen super-capacitors used for more temporary storage where battery replacement is undesired.

So the tradeoff is that the super cap will keep storage for maybe a week - (depending on capacitance value) and then poof out...

but you'll never have to replace the capacitor.

So if the device is mostly going to be on with temporary power outages and can have the time set easily, a super-cap might be a better choice.

It's up to you. :D

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Sun Feb 17, 2013 6:12 pm     Reply with quote

Hi Ben,

Yeah, I probably should have said something more generic like "external power source Very Happy !

John
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun Feb 17, 2013 7:04 pm     Reply with quote

No worries.

I just wanted to toss that idea out there... make sure it was covered.

If you had said, "external power source" - I could just see the next question of, "like what?"

So we covered both bases. Score!

Cheers,

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Mon Feb 18, 2013 2:01 am     Reply with quote

ezflyr wrote:
Hi,

I think the premise of the original question is flawed. The Dallas 1307 datasheet refers to the memory on the chip as "Battery Backed SRAM", and does not use the term 'non-volatile' at all. SRAM, or static RAM, is memory that retains its contents so long as power is applied - remove the power, and lose the memory contents! As Ttelmah pointed out, the memory loss is not always instantaneous, but it will go away sooner rather than later....

You need a battery to maintain the DS1307 memory!

John


The key here is which data sheet you have.

The original Dallas sheet, does not mention battery anywhere in relation to the SRAM. It just calls it '56 byte nonvolatile RAM for data storage'. The later Dallas sheet instead calls it 'NV SRAM'. Only the latest sheet has the line in the next column '56-Byte, Battery-Backed, General-Purpose RAM
with Unlimited Writes'. Now, this later line was obviously added because given the existence now of RAM with attached EEPROM, which automatically keeps itself backed up by writing to the EEPROM, and is quite often called 'NV SRAM', there was a potential confusion.

The RAM keeps it's contents down to about 0.5v, and once you drop below a couple of volts, the oscillator stops, so the holding current drops to the order of just 10nA. Even 1uF, will deliver this for over a couple of minutes (which is why on things like the PC, you can change the battery without losing the configuration data). You'll find quite a few bits of kit with messages like this "when changing the battery, insert the new one within xxx seconds, to avoid loss of data". Provided you don't want/need the clock, you can extend the 'hold time' massively on things like a super capacitor, by switching off the oscillator yourself.

Best Wishes
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

re
PostPosted: Tue Feb 19, 2013 6:58 am     Reply with quote

Quite right, the Dallas specs mentions it as battery backed NVRAM.

For my project it does not matter as I use the rtc as a battery backed stopwatch.

thanks
a
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group