Hi everybody again.
I'm having some problems when using TIMER2 as a RTC module with a 32.768 khz crystal.
I already wrote some posts about configuration problems, but those were already solved.
The issue I have now is RTC accuracy.
I read a post, in the AVR forum, where they said that the xtal may need some calibration with external caps.
But the error I am getting is important.. about 1-2 seconds faster per hour.
I read somewhere that this is too big to be a capacity-matching problem, but a noise one.
It's strange since the AVR would sleep most of the time and only wake up every second to increment the "tick" counter.
I compared those ticks with the RTC in my PC, which wouldn't add 2 seconds in an hour! would it?
I correctly took care of the details about TIMER2 in async operation, as said in the datasheet.
To give some more info, I'm using a atmega644 and gcc.
I am 95% sure the code is not the problem,
Thanks in advance,