Hi glaugle,
We don't work for meLabs, but we still like to help out.
You might take a look at this...
EEPROM Variables (EE_Vars.pbp)
http://www.picbasic.co.uk/forum/showthread.php?t=2444
Even if you don't use the whole thing, look at the Write2EE: subroutine at the bottom of the EE_Vars.PBP file.
It makes a pre-defined number of attempts to write to EEPROM, and reads it back each time. If it doesn't read the same thing back, it tries again, otherwise it succeded.
If it doesn't succeed after so many attempts, it turns off the interrupts and does it one last time.
I've tried it with several different interrupt programs, and have never had it actually turn-off the interrupts. It always gets it written within a few tries.
HTH,
Darrel




Bookmarks