Em 21/2/2011 09:46, IB Peter Feucht escreveu: > no, there is only one initial eeprom write during flashing the PIC, then > only once again if mode is changed, which usually never happens and if, t= hen > months or even years may have gone by. As said, I'm initializing cell #0 = to > $00 for mode 1 and that's it. > > To answer another question: No, there is only address #0 written and read= , > all other cells are unused. > > A question from my side to this: Does "fail" mean here, that the eeprom c= ell > is falling back to $FF or is it possible, that it has any random value af= ter > "failing"? EEPROM (and other members of EPROM family) more usual failure mode is "0" bits reverting back to "1" due to charge leakage. You may have one or more "0" bits turning to "1". I think you could use Bob's majority method with only one byte. Just count how many zero and one bits you have. The value most probably correct is the one that have more bits at its state. If all bits don't agree, rewrite the entire byte with the most probably correct value. Isaac --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .