If you have two lines on the PIC free, use one of them to sense power fail. After writing to the EEPROM's and verification, use the other line to turn on a LED and put the PIC in sleep or get into an infinate loop. This will discharge the cap and also ensure that the EEPROM writing is over. I use this method discharge the tank cap in a 6 digit counter after writing into the 16F84 EEPROM. Pailoor Chip Technologies Microchip Design Consultant No. 70, 9th Main Road, Mathikere, Bangalore - 560 054. INDIA Tel : +91-80-3362807 Fax : +91-80-3369451 Email : chiptech@vsnl.com Webpage : http://business.vsnl.com/chiptech