Electronics > Beginners

Mysterious "Ghost" Internal Oscillator in RTCC

(1/2) > >>

tarun172:
Hi,
    I am working on a new design that involves a MCP79XXX series serial RTCC chip from Microchip. While writing interface to this RTCC chip, I ran into issue where RTCC would not count.  As I start to dig in a little bit more, there were two problems:
1. I need to turn ON start start oscillator bit in seconds register in addition to setting external oscillator in control register.
2. I found that values of load capacitors connected to crystal oscillator were not of correct value. This, I found out much much later.

After spending some time to solve this issue; I turned off external oscillator in control register and turned ON start oscillator bit. To my surprise RTCC started "counting"; meaning seconds counter was incrementing. I tested on two boards to verify that RTCC was indeed counting.

Thing that got my head scratching is my opinion RTCC should not count because  (1) Load capacitance value is wrong far below recommended limit. Therefore, crystal oscillator should not oscillate. I verified this using Oscope on two boards that I tested, (2) External Oscillator is turned off.

As anybody seen this before? Microchip confirms that there is not internal oscillator. So how would RTCC just magically start to count? Am I missing something here? |O |O

tarun172

hexreader:
Exactly which RTCC chip?

Please post full, accurate schematic.

DrG:

--- Quote from: tarun172 on February 17, 2020, 03:30:30 pm ---Hi,
    I am working on a new design that involves a MCP79XXX series serial RTCC chip from Microchip. While writing interface to this RTCC chip, I ran into issue where RTCC would not count.  As I start to dig in a little bit more, there were two problems:
1. I need to turn ON start start oscillator bit in seconds register in addition to setting external oscillator in control register.
2. I found that values of load capacitors connected to crystal oscillator were not of correct value. This, I found out much much later.

After spending some time to solve this issue; I turned off external oscillator in control register and turned ON start oscillator bit. To my surprise RTCC started "counting"; meaning seconds counter was incrementing. I tested on two boards to verify that RTCC was indeed counting.

Thing that got my head scratching is my opinion RTCC should not count because  (1) Load capacitance value is wrong far below recommended limit. Therefore, crystal oscillator should not oscillate. I verified this using Oscope on two boards that I tested, (2) External Oscillator is turned off.

As anybody seen this before? Microchip confirms that there is not internal oscillator. So how would RTCC just magically start to count? Am I missing something here? |O |O

tarun172



--- End quote ---

In addition to what the previous poster requested...I'm not certain exactly what you are asking? RTCC does not magically start, it needs either an external crystal or an external clock source. Failing one of those, it is not going to count.

Have you looked through the "Common Issues" AN1496 http://ww1.microchip.com/downloads/en/Appnotes/00001496B.pdf ?
and also "Question and Answers" TB316 http://ww1.microchip.com/downloads/en/Appnotes/90003116A.pdf .

"1. I need to turn ON start start oscillator bit in seconds register in addition to setting external oscillator in control register. "

That sounds like one problem that you had.

"The oscillator must be started by setting the STbit in the  RTCSEC  register if a crystal is being used,  or by setting the EXTOSC bit in the Control register, if  an  external clock source is used.  Also, refer to the following documents:AN1365  –  “Recommended  usage  of  MicrochipSerial   RTCC   Devices”   (DS00001365)   and AN1519 –  “Recommended  crystals  for  Stand-Alone RTCCs” (DS00001519)."

So, it is one OR the other, depending upon whether you are using a crystal or an external clock source, but not both.

It sounds like you figured that out....

After spending some time to solve this issue; I turned off external oscillator in control register and turned ON start oscillator bit. To my surprise RTCC started "counting"; meaning seconds counter was incrementing. I tested on two boards to verify that RTCC was indeed counting.

But, it is not surprising and they even say...

"Make sure the Start bit (ST) in register 00h is set; set ST = 1 to enable the oscillator.•  Check if the EXTOSC bit in the Control register (07h) is clear; EXTOSC =0. This should be cleared when using an external crystal."

Thing that got my head scratching is my opinion RTCC should not count because  (1) Load capacitance value is wrong far below recommended limit. Therefore, crystal oscillator should not oscillate. I verified this using Oscope on two boards that I tested, (2) External Oscillator is turned off.

Not sure how you determined the load capacitance value (1) but for (2), as stated, EXTOSC must be cleared if using a crystal.

Assuming that I have not completely misunderstood you, hope this helps.


Edit: Re-reading your post, it is possible that what you are "missing" is simply their distinction between a crystal source and an external oscillator source. Yeah, since they do not have an internal oscillator, both could be considered "external", but clearly they are looking at the distinct cases of using a crystal and pins X1 and X2 versus "X1 also serves as the external clock input when the MCP7940X is configured to use an external oscillator[/i]"

tarun172:
Hi Dr. G,
            Thanks for bringing this to my attention. I went completely off datasheet of MCP79XX Series and chip errata. It says "Note: The EXTOSC bit must be set to enable an external clock source". So the info, "Make sure the Start bit (ST) in register 00h is set; set ST = 1 to enable the oscillator.•  Check if the EXTOSC bit in the Control register (07h) is clear; EXTOSC =0. This should be cleared when using an external crystal." should be in errata. Very strange.

I determined load capacitance per section 5.2 equation,

CL = CX1 X CX2
       -------------  × C STRAY

        CX1 + CX2                   
Where:
CL = Effective load capacitance
CX1 = Capacitor value on X1 + COSC
CX2 = Capacitor value on X2 + COSC
CSTRAY = PCB stray capacitance

They also say suitable crystals have a load capacitance (CL) of 6-9 pF. Inadvertently, I selected 2 pF load crystal instead of 6-9 pF.

tarun172

 

DrG:
I think that you have it figured out.

Just an interesting aside. I see the 5.2 equation. Take a look at http://ww1.microchip.com/downloads/en/Appnotes/00001519B.pdf and Equation 1. Notice that they had added the pin capacitance to the formula (citing it as 3 pF typical).

Actually, in my view, Microchip is pretty good with their data sheets (*ducks to avoid thrown objects*) at least compared to some others. Especially so when the product is mature and there are some supplementary notes out there.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod