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?
tarun172
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]"