PDA

View Full Version : EEPROM issues



timmers
- 25th March 2010, 15:57
Hi all,
Been having problems with EEPROM locations getting overwritten.

Device is 18F2620
We run interrupts from pbp (ON INTERRUPT GOTO ...)
Now re-reading the pbp manual we find that we should have been masking interrupts before WRITEing. ahhemm, well we do now....

We have used the DEFINE WRITE_INT 1 which appears to have cured the problem, so check your code.

Is there any other tips for reliable EEPROM data management you would like to suggest?

I have been told that to allways follow a READ or WRITE with a PAUSE. This may date back from the original flash devices being slow (16F84) and i'm unsure as to how valid this information is and should I worry with 18F's

Thanks,
Tim.

Acetronics2
- 25th March 2010, 16:19
Hi all,


I have been told that to allways follow a READ or WRITE with a PAUSE.
Thanks,
Tim.

Hi, Tim

reading the EEPROM needs " no time " ... PBP Write command Polls the EEPROM EEIF flag ... so, there's no time to add to those PBP commands. ( this 'to add" pause is one more " urban legend " ...)

"To be sure" you can read the written value and compare to the intended value to write ... can be useful if numerous writings used ... or very long device life expected ...

Alain