Need help with MCP7940N RTCC (general crystal help) - Page 1
Forum section: electronics / projects

author: aiq25
author_rank: Regular Contributor
timestamp: September 14, 2021, 02:56:01 am
content: I'm having a very hard time getting the a crystal oscillator to, well, oscillate and get detected by the MCP7940N. I have a pretty standard circuit (just 10k pull-ups on the I2C lines an MFP, 1uF and 100nF bypass caps). The crystal I choose is from ECS, part number ECS-.327-7-12QS-TR. The load capacitance for the crystal I have tried from 7pF to 15pF. So I cannot share the schematic and the PCB layout.The problem is I was able to get couple of prototype boards we got made based on the final design working but that was after going through maybe 10-15 crystals (I thought maybe I had damaged them, which might be true) and a whole bunch of IC's. I cannot get consistent results with prototypes I make. Some work and majority don't.I have now narrowed the problem down to two things (or at least I think these two things could be the problem):First is I think while soldering I was probably damaging the crystals. The ECS-.327-7-12QS-TR part is very tiny. I was also getting some solder on the cop of couple of parts. I noticed sometimes I would try out the circuit and it wouldn't work but next day I come to the office and the circuit starts working (the oscillator is running and the RTCC IC is correctly incrementing seconds, minutes and hours).Second problem is I don't think I'm getting the right load capacitance and this is where it gets weird. After having a lot of trouble with this circuit, I found out I can just probe the X1 and X2 pins of the IC using a high impedance oscilloscope probe. According to Microchip a 500mV peak-to-peak voltage on X2 is healthy and is what the signal should be. One some of the boards that I got working, the signals are 50mV to 200mV peak-to-peak. I noticed on couple of the boards where the ST bit is on for the RTCC but OSCRUN bit is not set, the peak-to-peak voltage is only 10-20 mV. One one of the circuits I went from 7pF, then 12pF then 15pF then 24pF of load capacitance. Somehow increasing the load capacitance seemed to help bringing up the peak-to-peak voltage.I have reviewed my board layout internally with colleagues and everything is pretty standard and it follows best practices. So I have few questions for those we might be able to help:Does anyone know if the peak-to-peak voltage of a crystal increases with higher load capacitance, or should decrease? I would think it would decrease but I'm not sure and I couldn't get a definitive answer from googling the issue.Does anyone have similar experience with crystals and/or the MCP7940N? This IC is pretty standard and seems to be widely used, so I'm not sure why I'm having such trouble. It might be the crystal from ECS and it doesn't like the load capacitance or how I'm soldering this crystal. For now I'm hand soldering the crystals on the prototype PCB's we got made.Any feedback is much appreciated!

author: bob91343
author_rank: Super Contributor
timestamp: September 14, 2021, 05:09:05 am
content: The load capacitance you put across the crystal isn't terribly important, unless you use too much. It's merely for standardization for the frequency.Crystals vary a lot regarding what used to be called 'activity'. That's a measure of its loss impedance at resonance. If you have enough feedback, it should oscillate.For some reason, crystals have been specified at their parallel resonant frequency with specified capacitance. I think a better measure would be series resonance, which doesn't change with capacitance.

author: sicco
author_rank: Regular Contributor
timestamp: September 14, 2021, 08:51:03 am
content: I remember having similar issues when starting to use these a few years ago. In the end is was firmware / not reading all of the datasheet. A maiden chip will have its ST bit reset. You must set it. Once set, it needs a true loss of power supply. Just disconnecting the battery is not enough because likely you have capacitors that keep the power on…Read back the OSCRUN bit, double check what you do with VBATEN and all other almost hidden bits in all registers!The EXTOSC bit, b3 in the CONTROL register. Not having it at zero means it expects you to have an external oscillator instead of a crystal connected. That must be it.

author: aiq25
author_rank: Regular Contributor
timestamp: September 15, 2021, 08:31:46 pm
content: Thanks sicco and bob91343 for the replies.Turns out it was a combination of my soldering and too much load capacitance. I lowered the load capacitance to 7pF (with Microchip's recommendation) and was very careful on how I was soldering the crystal and now it works!! Have tried it on 3 boards and its consistently working.@sicco: I had a feeling it wasn't the software because it was working on some boards and it wasn't working on others. I also reviewed my Arduino code with Microchip and they agreed it looked correct.

author: calvinlove0
author_rank: Contributor
timestamp: January 02, 2025, 01:26:14 pm
content: Thought I'd toss this in there in case it helps someone.Originally I was using a MEMs resonator for this IC and then switched to a crystal to save on power (MEMS drew 6mA...too much for the poor coin cell).Register 0x07 has a bit called EXTOSC that has to be turned on for MEMS resonators and turned off crystals. Makes sense...but definitely had me searching for quite some time thinking it was my capacitors, soldering or traces.Hope this helps, cheers