Hi shahidali55,

"tweeking the TimerConst" won't help. 1 count either direction will change the timing by more than you are off. @ 4mhz, 1 count will change the time by about 4 seconds per day.

At 2 seconds per day, it works out to around 23 PPM (parts per million), which is within the normal 50 PPM tolerance of the crystal. Not to mention the +/- 100 PPM variance due to temperature.

To get closer than that, you'll need to calibrate the crystal frequency. You may be able to use a small Trimmer Capacitor in place of one of the capacitors on the crystal. The size needed depends on your crystal, but 0-20pf will probably work.

Other than that, you could simply add 1 second every 12 hours. But if you build more units, that could be problamatic since they won't all be the same.

Here's a couple links to some more crystal info:
http://www.circuitcellar.com/library...ujanos91/3.htm
http://ww1.microchip.com/downloads/e...tes/00588b.pdf
http://ww1.microchip.com/downloads/e...tes/00949a.pdf