> However, comparing to my wristwatch, I find my clock falls behind about
> 1 minute every hour, so after 10 hrs, it's behind by 10 mins! My code
> above seems OK. Are there any hardware issues I need to address? Thanks
> for any help!
>
Totally.
This is realted to the capacitances you connect to the crystal. I am
not an expert at this, but check application notes for crystal
considerations, such as the one from Dallas. They actually explain a bit:
"The frequency accuracy of a crystal-based oscillator circuit is mainly
dependent upon the accuracy of the crystal and the accuracy of the match
between the crystal and the oscillator capacitive load."
Take a look at it :
http://www.maxim-ic.com/appnotes.cfm/appnote_number/58
Hope that helps.
Hugo
_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat