Low Cost PCB's Low Cost Components

Author Topic: PIC EEPROM Memory Retention  (Read 213 times)

0 Members and 1 Guest are viewing this topic.

Offline tarun172

  • Contributor
  • Posts: 28
PIC EEPROM Memory Retention
« on: October 13, 2017, 08:14:01 AM »
All,
    I noticed some unusual behavior PIC processor EEPROM. In my program, once user completes steps 1-10 (for example), the values get stores in EEPROM and the flag/status bit is set to high indicating that step 1 -10 write to EEPROM is complete. If user makes a mistake he obviously would have to hit "reset" before trying again. Problem I am facing is, I notice is EEPROM write to a particular memory location has very small finite write cycles. After erasing say 20-25 times, the EEPROM memory location is unable hold a value. I read a zero value at the memory location as soon as write operation is complete and status flag is set high. If I change memory location, it seems to work fine.
    Above behavior has got me baffled. I looked through the datasheet and nothing seems to stand out for this behavior. Can somebody assist?

- tarun172
 

Offline wraper

  • Supporter
  • ****
  • Posts: 6061
  • Country: lv
Re: PIC EEPROM Memory Retention
« Reply #1 on: October 13, 2017, 08:17:54 AM »
Sounds like a bug in the code. Worst EEPROMs survive 10s of thousands write cycles. Average ones survive 100s of thousands.
 

Offline tarun172

  • Contributor
  • Posts: 28
Re: PIC EEPROM Memory Retention
« Reply #2 on: October 13, 2017, 08:25:40 AM »
If this is indeed the case, I should see this problem right away every time and not after 20-25 write cycles. Changing to new memory location seems to temporarily fix this issue. If I use just a variable and restrict the access to it, then I do not see this problem.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 6061
  • Country: lv
Re: PIC EEPROM Memory Retention
« Reply #3 on: October 13, 2017, 08:32:52 AM »
Does this problem persist on the cell if you reprogram the MCU? If it does. the only thing I can imagine is that you bombard single cell with thousands of writes because of some bug in the code. Or MCU works on too low voltage which is out of spec for EEPROM operations. I don't know about PIC, and you did not say particular model, but for some AVR MCUs EEPROM is not functional at lowest voltages on which MCU can operate.
 

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 1833
Re: PIC EEPROM Memory Retention
« Reply #4 on: October 13, 2017, 08:34:37 AM »
Perhaps at some point in code dev, u unwittingly ran a program that wrote to that location repeatedly without any break/wait for user input. And used up your 100K cycles.
 

Offline NivagSwerdna

  • Frequent Contributor
  • **
  • Posts: 932
  • Country: gb
Re: PIC EEPROM Memory Retention
« Reply #5 on: October 13, 2017, 08:59:22 AM »
You should get many thousands of cycles.

You MUST check the errata for the chip you are using and if using a compiler also check the bug list for that... EEPROM errors are not unknown but normally work around-able.
 
The following users thanked this post: kg4arn


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf