Hmmm,

I fully expected the test to show that the new timer would keep accurate time and give a good indication how far off the Elapsed Timer was, but instead after 24hrs, the Elapsed Timer (T1) was still within 1 second of actual time, and the new timer (T0) had gained almost 8 seconds. Also, my PC's clock was 3 seconds slow. (interesting, but not relevant)<br>
<br>
Since then, I've turned Roman's routine into a subroutine and ran it in loops just to verify it's counting, and can say that it does accuratly count 1 million instructions per second. &nbsp; Well, actually, it counts 3 seconds at 999,936 instructions and every 4th second at 1,000,192. Which over the 4 seconds averages out to exactly 4,000,000 instructions. So in a perfect world, with a 4.000000mhz crystal, it should count perfect time. But it doesn't. (in my case)

This leads me to beilieve that My crystal is off.
So, continuing with with the perfect world theory...

There's 86,400 seconds per day
or 86,400,000,000 instructions per day

an additional 8 seconds is 8,000,000 instructions
for a total of 86,408,000,000

that divided by the 86,400 seconds per day gives
1,000,092.593 instructions per day or a freq. of
4,000,370.37 hz.

That's 93PPM off center frequency. So I've either got a crystal that's almost twice the tolerance. OR I'm still missing something big time.
<br>