> If you can, try to obtain a 50 or 60hz signal, rather than a crystal. > The 50/60hz pulse is incredibly accurate, usually within a second per > day, non-accumulative. I am about to do this with a PIC16F88. It will auto detect 50 or 60Hz as the product is intended to sell in two different countries. If power fails (but it's expected to be on 24/7) it will keep time using the internal RC oscillator. If I want to get really clever I could try and make it calibrate it's internal RC oscillator against the 50/60Hz signal, and even do temperature compensation. In reality however this app will handle minutes or 10's of minutes per day accuracy during periods of no mains power. It's not that I couldn't afford a few cents for a 32.768kHz crystal... I couldn't afford the micro pins! -- Brent Brown, Electronic Design Solutions 16 English Street, St Andrews, Hamilton 3200, New Zealand Ph: +64 7 849 0069 Fax: +64 7 849 0071 Cell: 027 433 4069 eMail: brent.brown@clear.net.nz -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist