RTCC MCP7940N running fast by min

RTCC MCP7940N running fast by min

Postby sara_123 » Sat Aug 23, 2014 7:09 am

Hi All,

I am using MCP7940N RTCC with cypress CY8C3245AXA-158. The RTC is used only for getting the time.
when i switched on the board after 1day the time is running fast by 1min and few seconds and every day it is increasing by 1 min, which is not acceptable.

In order to correct it i need to calibrate the RTCC.
For calibration i set the RS[0:2] value is to '0'.The control register value is 0XC0, and calibration register is set a value as per the calculation

For eg: Time is running fast 5s day
5 Seconds can be expressed in PPM.
ppm=seconds per day* (1*10^6)/(24*60*60)

In this case the calibration value is +58.
if it is slow then the register value is -58.

(As per this calculation i calculated the calibration register value)

is this calculation correct??

is the control register value correct what should be the Rs[0:1] register values?

please help in solving this issue

Thank you in advance..

Regards
Sara
sara_123
 
Posts: 7
Joined: Sat Aug 23, 2014 6:27 am
PIC experience: Professional 1+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby ric » Sat Aug 23, 2014 8:33 am

One minute a day is about 694 PPM, way more than the calibration circuit can correct for.
Are you sure you have the right capacitors on your crystal, and that the crystal is ok?
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby sara_123 » Sat Aug 23, 2014 8:50 am

Hi ric,

Thank you for your response.
Attaching the schematic for RTCC used in the board.I have not used the capacitors,i tried putting the capacitors with values c19- 10nf and c24-15nf ,but after putting the capacitors the rtc was not at all running.so i have removed it.

Thank you in advance

Regards
sara
Attachments
RTC circuit.png
RTC circuit.png (18.08 KiB) Viewed 8483 times
sara_123
 
Posts: 7
Joined: Sat Aug 23, 2014 6:27 am
PIC experience: Professional 1+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby ric » Sat Aug 23, 2014 9:10 am

Do you have specifications for your crystal?
Those capacitors sound way too big. More like 10pF would be more appropriate.
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby sara_123 » Sat Aug 23, 2014 9:39 am

Hi ric,

Sorry the capacitors values are 10pf and 15pf.

the crystal used is ABS07-32.768kHz , SMD LOW PROFILE CRYSTAL

below is the digikey page
http://www.digikey.com/product-search/en?vendor=0&keywords=abs07-32.768khz-1


Thank you in advance.

Regards
sara
sara_123
 
Posts: 7
Joined: Sat Aug 23, 2014 6:27 am
PIC experience: Professional 1+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby ric » Sat Aug 23, 2014 10:17 am

Hmmm, that page says your crystal requires a 12.5pF load capacitance.
The RTC datasheet says:
Suitable crystals have a
load capacitance (CL) of 6-9 pF. Crystals with a load
capacitance of 12.5 pF are not recommended.
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby sara_123 » Sat Aug 23, 2014 10:32 am

Hi ric,

i tried putting a capacitor of 10pf and 15pf as load capacitor but then the rtc was not running at all.the rtc output was 0.
what can be the reason for that?


Thank you in advance

Regards
sara
sara_123
 
Posts: 7
Joined: Sat Aug 23, 2014 6:27 am
PIC experience: Professional 1+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby ric » Sat Aug 23, 2014 11:15 am

That may be too much for the oscillator circuit. Try halving both.
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby Olin Lathrop » Sun Aug 24, 2014 2:00 am

sara_123 wrote:i tried putting a capacitor of 10pf and 15pf as load capacitor but then the rtc was not running at all.the rtc output was 0.
what can be the reason for that?

Since the datasheet specifies smaller capacitance and specifically recommends against caps of the size you are using, it should be no surprise things aren't working. Didn't you read the datasheet before designing the circuit!!?

What is probably going on is that this particular RTC is optimized for very low power. The crystal drivers are therefore quite weak, and the larger caps attenuate the signal to the point there isn't enough loop gain to keep the crystal oscillating. When you remove the caps, the oscillator can function, but now the crystal is being driven out of spec, which is causing the large error.

The right answer should be no surprise, which is to do what the datasheet says (duh). Your are using the wrong crystal for that RTC. Get the right crystal, which is one that is intended to work with load caps in the range that the RTC is designed to handle.

You can try using 6-8 pF caps and see what you get. The RTC should be able to drive that, and the crystal is being loaded closer to how it is supposed to. The crystal loading is still out of spec, so you will still likely get large errors, but probably somewhat better than before.
User avatar
Olin Lathrop
Verified identity
 
Posts: 48
Joined: Fri May 30, 2014 3:38 pm
Location: Littleton, MA USA
PIC experience: Professional 5+ years with MCHP products

Re: RTCC MCP7940N running fast by min

Postby sara_123 » Wed Aug 27, 2014 5:10 am

Hi,
Thank you for the response.i will change the crystal according to datasheet and check it.

Thank you
sara
sara_123
 
Posts: 7
Joined: Sat Aug 23, 2014 6:27 am
PIC experience: Professional 1+ years with MCHP products

Next

Return to Oscillator

Who is online

Users browsing this forum: No registered users and 4 guests

cron