Thanks to all who answered my question. I think I'll stick with the mains frequency as a time base and use some of Eric's ideas for powerfail. Regards Tony Just when I thought I knew it all, I learned that I didn't.