PDA

View Full Version : EEPROM writes



tallen
- 22nd June 2010, 18:13
I have a PIC16F84A that I'm writing a number to memory to keep if case of loss of power. I think I have read that you can only write to a location so many times. I'm sure this is a high number, but my code writes to the pic every 100ms or so. Is this a problem or should I slow down my writes?

Thanks,

Terry

Darrel Taylor
- 22nd June 2010, 18:56
The 16F84A has a typical endurance of 10,000,000 writes.
It seems like a big number, but if you write every 100ms, that EEPROM location will stop functioning in 11.5 days.

Of course, that's the "typical" endurance. The minimum endurance is 1,000,000.
So it could stop working in as little as 1.1 days.

It would be a good idea to slow it down considerably.

languer
- 22nd June 2010, 20:54
Look at the following threads:

Saving variable(s) contents before power is removed (http://www.picbasic.co.uk/forum/showthread.php?t=5649)
PIC power backup with "super capacitor (http://www.picbasic.co.uk/forum/showthread.php?t=5600)


Ideally, for content saving before a power failure, you would monitor the supply voltage and only save contents to EEPROM when a power failure is detected. Of course, this means you have to keep the PIC alive during the content saves (the links provide this info).

jellis00
- 25th June 2010, 19:45
The 16F84A has a typical endurance of 10,000,000 writes.
It seems like a big number, but if you write every 100ms, that EEPROM location will stop functioning in 11.5 days.

Of course, that's the "typical" endurance. The minimum endurance is 1,000,000.
So it could stop working in as little as 1.1 days.


I have been observing intermittent success in flashing the program on a 18F4550 I am using, which I have been using for almost a year in a development board...probably 100,000 flashings.

Does intermittent flashing success mean that the chip is approaching its end of life cycle for the number of times the program has been burned to the chip?? How many programming cycles should I expect for an 18F4550 or 18F2550??

languer
- 25th June 2010, 20:43
Read table 28-1, 100K erase-write cycles typical and 10k minimum (for each cell).

jellis00
- 26th June 2010, 00:32
Read table 28-1, 100K erase-write cycles typical and 10k minimum (for each cell).

Thanks, languer for this info. Do you know the answer to my other question as to whether intermittent flashing success is an indication of end of programming life?

languer
- 26th June 2010, 07:19
If you really believe you have probably flashed it that much, then it certainly could be.

tallen
- 28th June 2010, 21:57
My Pic did die in less than 2 day.

I only have 5VDC available to the board. I added a diode in between the 5V rail and the PIC. I put a 220uf cap across catode of the diode feeding the pic with 4.3V. I then monitor 5V rail for loss of power. When this pin goes low i write the necessary info to the EEPROM. This works fine except for the PWM out will only go up the the 4.3V now instead of the original 5V. I can put a shotkey diode in that should give me another .3V or .4V. Does anyone have a better option to monnitor loss of power and save a vairable?

Thanks,

Terry

Acetronics2
- 30th June 2010, 14:09
Hi,

you can use a MC33064P5 ( TO92 Package ) as a voltage ref : its output will turn low if voltage goes under 4.65v ... ;)

enough time to save data to EEPROM, then ...

Alain