On Sun, May 08, 2005 at 03:00:40PM +0100, Dave Turner wrote: > Hi, > > I know I now have a 31.768KHz clock connected to timer1. I am trying > to set this to be the system clock. Do I need to adjust OSCCON at > all? Also will just setting up T1CON correctly do this, or are there > other settings that need to be changed? Dave, Having been there and done that you're never going to be pleased with the results. Even when you get into the low PPM range for drift, it's still going to drift due to lack of temp compensation and the like. Also why would you want the 32.768 Khz to be the system clock? Is this battery powered? If not then just run the PIC from the nanowatt clock module, and use T1 to keep track of time. You can find the 16F877 code I used for my sunrise/sunset outdoor light controller here: http://www.finitesite.com/d3jsys/clock.asm It drifts, but because it doesn't need precise edges for turn on/turn off I've left it alone. Hope this helps, BAJ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist