James wrote: > > I am programming an interrupt service for 16F84A which provides a time base in units of seconds. My project is to make . . . yet another clock, but this "time" using a 4.000 MHZ xtal, which is not the most natural choice, but offers some > challenge, maybe more than I thought. Have not yet produced accurate time :-( and don't know why. Off by about 1 to 2 percent. Instead of adjusting the TMR0 value, which can cause large long term effects, try adjusting another value further down the time data chain. For example, if on TMR0 overflow, you increment some registers, and when these registers equal a set value, the seconds register increments and so forth. Try adjusting the comparison value for these registers, so that the value is lower if the time is slow, or raise the value if the time is fast. You will find that the clock will drift one way or the other depending on temperature, so using the mains as a frequency source is much more accurate. -- Best regards Tony mICro's http://www.picnpoke.com mailto:sales@picnpoke.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu