I've had problems in a past life with RTC crystals drifting due to mismatched capacitance. The purchasing guy bought a different crystal to the one designed in because it was cheaper, and we wondered why the clocks were drifting by large amounts. This was my first job after college, so I was a little green, and it took me a while to work out the cause. Check the data sheet for the crystal you have, and double-check you have loaded it with the correct capacitance.
Cheers, Matthew van de Werken - Electronics Engineer CSIRO E&M - Rock Mass Characterisation - 1 Technology Court - Pullenvale - 4069 p: (07) 3327 4142 * f: (07) 3327 4455 * e: [EMAIL PROTECTED] "We do not inherit the earth from our ancestors, we borrow it from our children." -- Native American Proverb > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > On Behalf Of Hugo González Monteverde > Sent: Wednesday, 24 May 2006 2:46 PM > To: [EMAIL PROTECTED] > Cc: AVR-CHAT > Subject: Re: [avr-chat] 32768 Hz clock > > > > > 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 > _______________________________________________ AVR-chat mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-chat
