Dear PICCERs, I have a task, where I have to build a operation time counter, means somethings, which adds the time a device was switched on. There is only a 5V DC supply, if 5V is present the device works, if not, the device is switched off. The total time to be checked is 5 years and the resolution has to be 1 minute. Now first the task is very simple: When the PIC (I intend to use a 12F629) is powered up, it reads the already elapsed time from EEPROM, then simply starts to count minutes (by TMR1 and an added software divider) and when a minute is over it stores the new total time into EEPROM. Now the problem is, when calculating the total number of storages you'll get 5 years x 365 days x 24 hours x 60 minutes = about 2,6 x 10E6 write cycles, but the spec only says 10E6 cycles for EEPROM memory. Further thinking showed that the result is never bigger than 3 Bytes (FFFFF&h = 16,7 x 10E6) and the high and middle byte can be stored only, if they have changed, so I have no more than 2,6x10E6 / 256 = about 10000 write cycles for the middle byte and even 2,6x10E6 / 65536 = 40 write cycles for the high byte which is inside spec. The problem is to find a way to store 2,6x10E6 time one byte into EEPROM. Has anybody an idea? Any help greatly appreciated! Best regards Peter -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist