>On Mon, 10 Mar 1997, TONY NIXON 54964 wrote: > >> I need to make a clock that is accurate. It will be powered by the >> mains, and I thought of using this as a time base as it is a fairly >> stable waveform. >hello, > i don't think using the mains for refrence frequency will give >you a stable clock. if you are using PIC for the clock the best idea is >to put it in some delay loop and keep on counting the number of passes. >PIC being driven by a crystal oscillator will give much more stable clock. > >vishram. My opinion, for what its worth, is that the AC mains in North America is EXTREMELY accurate and quite suitable for a clock timebase. Power generating utilities (agin, in North America) generally use atomic clocks to ensure accuracy. A clock that shows consistant time errors usually does not filter the noise present on the AC mains enough and it is the noise spikes that mess up the accuracy. As I said, just my opinion. I have built clocks that, except for power outages (I suppose that you could consider THAT to be an extensive noise spike!), have not deviated by more than 1 second over several months. Dwayne Reid Trinity Electronics Systems Ltd Edmonton, Alberta, CANADA (403) 489-3199 voice (403) 487-6397 fax