Page 2 of 2

Re: RTCC MCP7940N running fast by min

PostPosted: Wed Oct 08, 2014 12:00 pm
by sara_123
Hi all,

As per previous discussions i have changed the crystal with a load capacitance 7pf as per rtc data sheet.

for calculating the Cx1 and Cx2 using the formula
CL=(Cx1*Cx2/(Cx1+Cx2))+Cstray

CL=7pf
Cstray is taken as 4.5pf

the values of Cx1 and Cx2 is getting as 5pf

so i put both cap values of 4.7 pf

the board was kept OFF for 4 days continuously and on 5th day the variation in time was of about 53 sec as compared with std time, and in ON condition for about 48 hours the variation is about 53 sec.

why there is a variation in seconds at ON and OFF conditions??

whether the values of cap selected is correct or not?

please help...

in the data sheet for calibration of the RTC the bit CRSTRIM can be considered as "1" or "0".please explain the difference of setting CRSTRIM bit as "1" and "0"

Thank you in advance..

sara

Re: RTCC MCP7940N running fast by min

PostPosted: Wed Oct 08, 2014 2:42 pm
by PhilB
Sara,
4.5pF for stray capacitance sounds too much to me. I would guess 1.5 to 2pF. Say 2pF, that leaves 5pF for the two capacitors in series. So 10pF each. Microchip recommends making one slightly larger than the other to get a good startup, but I have had no problem with using the same value for both. You could try 12pF and 8 pF if you like.
You can get different frequency tolerances of crystal, are you using the right one? Try to calculate what a worst case crystal would gain/lose over several days. That will give you an idea of what to expect.
Maybe the IC is running at a different voltage when the board is ON, and if the caps aren't right maybe the oscillator is pulling a bit more off centre frequency. Don't know really - that's a guess.
I don't know CSTRIM - it doesn't appear on the datasheet that I have.
Hope the above helps.
Phil

Re: RTCC MCP7940N running fast by min

PostPosted: Thu Oct 09, 2014 6:27 am
by sara_123
Hi,

Thanks for the response.

The crystal what i am using is having frequency tolerance +/-20ppm .is this frequency tolerance ok??

will try with 12pf and 8 pf cap values.

for how much deviation i can do calibration as specified in datasheet(page 30).

RTC datasheet link:
http://ww1.microchip.com/downloads/en/DeviceDoc/20005010F.pdf


Thank you

sara

Re: RTCC MCP7940N running fast by min

PostPosted: Thu Oct 09, 2014 9:02 am
by PhilB
Sara,
You need to know what's acceptable to your customers to know if 20ppm is OK. I had hoped that you might do the calculation, but here it is: 20ppm means that the oscillator might deviate by up to 20 seconds in every 1000000. Now 1000000 seconds is about 11.5 days, so your RTC might lose or gain 20 seconds every 11.5 days in the worst case, if the oscillator is otherwise running perfectly.
The way that I have calibrated an RTC in the past was to measure a waveform output from one of the pins with an accurate frequency counter, but I haven't done that on our current product (too much time in test).
The datasheet gives you the formula for correcting the frequency, and you should be able to correct 20ppm easily, see section 5.6. I think that you would probably need to have CRSTRIM = 0. That lets you alter the frequency in 1ppm steps.
Regards,
Phil