Maker Pro
Maker Pro

Choosing Microcontroller Crystal Load Capacitors

B

Brian Logan

Jan 1, 1970
0
I've never really experienced problems with microcontroller crystal load
capacitors until recently. I was asked to repair several faulty boards that had
accumulated over time, some of which wouldn't oscillate due to the choice of
load capacitors. The micro is a PIC16C74B. Oscillator is configured for LP as
the crystal is 32.768kHz. The load capacitors were originally 15pF. The data
sheet for the micro recommends 33pF load capacitors for this frequency. The
crystal data sheets seem to mostly specify something in the region of 15pF for
thses watch crystals. According to Microchip's application note "AN588 -
PICmicro Microcontroller Oscillator Design Guide," page 7, the capacitors
chosen should be double the crystal specified load capacitance. Putting 33pF
capacitors in the boards that wouldn't start restored normal operation. Problem
solved, I thought. However, now I'm doing a new product that uses an Atmel AVR
micro and the crystal frequency is 3.6864MHz (Baud rates come out spot on), and
the micro data sheet suggests up to 22pF for this frequency range. Looking at
the crystal, the load capacitance is 30pF. Which means that something like 56pF
load capacitors would be in order if Microchip's suggestion of doubling the
capacitor values applies. But this doesn't tie in with the Atmel data sheet and
I don't remember seeing any micro applications that used capacitors this high.

Another one of those deep subjects, I suspect, that is taken for granted by many
of us. I'd be interested in the experience of others in this area and
suggestions as to what capacitors to choose for these crystals.

TIA
 
A

Adrian Jansen

Jan 1, 1970
0
I thought Atmel had a reasonable app note on their website about crystal
load caps. If not, try the AVRFreaks website.

www.avrfreaks.com

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
J

Joe Legris

Jan 1, 1970
0
Brian said:
I've never really experienced problems with microcontroller crystal load
capacitors until recently. I was asked to repair several faulty boards that had
accumulated over time, some of which wouldn't oscillate due to the choice of
load capacitors. The micro is a PIC16C74B. Oscillator is configured for LP as
the crystal is 32.768kHz. The load capacitors were originally 15pF. The data
sheet for the micro recommends 33pF load capacitors for this frequency. The
crystal data sheets seem to mostly specify something in the region of 15pF for
thses watch crystals. According to Microchip's application note "AN588 -
PICmicro Microcontroller Oscillator Design Guide," page 7, the capacitors
chosen should be double the crystal specified load capacitance. Putting 33pF
capacitors in the boards that wouldn't start restored normal operation. Problem
solved, I thought. However, now I'm doing a new product that uses an Atmel AVR
micro and the crystal frequency is 3.6864MHz (Baud rates come out spot on), and
the micro data sheet suggests up to 22pF for this frequency range. Looking at
the crystal, the load capacitance is 30pF. Which means that something like 56pF
load capacitors would be in order if Microchip's suggestion of doubling the
capacitor values applies. But this doesn't tie in with the Atmel data sheet and
I don't remember seeing any micro applications that used capacitors this high.

Another one of those deep subjects, I suspect, that is taken for granted by many
of us. I'd be interested in the experience of others in this area and
suggestions as to what capacitors to choose for these crystals.

TIA

The following application note discusses AVRs and crystals:

http://www.atmel.com/dyn/resources/prod_documents/doc2521.pdf

In general, putting too large a crystal is better than too small. It
will increase start-up time and lower the frequency of oscillation, but
you'll also get more stability. Of course, if the feedback level is
marginally low you may lose oscillation altogether.

Regarding your PIC16C74 circuit using 32 kHz crystals, what was the
value of the series resistor? Were you able to restore oscillation by
just changing the capacitors or did you install a new crystal as well?
Is it possible the crystals were damaged by too much power? They are
rated at 1 microwatt or so, as compared to several milliwatts for
ordinary crystals.
 
J

James Meyer

Jan 1, 1970
0
PICmicro Microcontroller Oscillator Design Guide," page 7, the capacitors
chosen should be double the crystal specified load capacitance. Putting 33pF
capacitors in the boards that wouldn't start restored normal operation. Problem
solved, I thought. However, now I'm doing a new product that uses an Atmel AVR
micro and the crystal frequency is 3.6864MHz (Baud rates come out spot on), and
the micro data sheet suggests up to 22pF for this frequency range. Looking at
the crystal, the load capacitance is 30pF. Which means that something like 56pF
load capacitors would be in order if Microchip's suggestion of doubling the
capacitor values applies. But this doesn't tie in with the Atmel data sheet and
I don't remember seeing any micro applications that used capacitors this high.

TIA

The crystal manufacturer will specify a suitable load capacitor. The
micro manufacturer will specify a capacitor or capacitors that will make their
micro work well with a range of crystals. A designer should try either or both
suggestions and use the one that works best.

Crystal and micro specs are average values and subject to change and
verification by the end user.

Finally, don't forget that if a crystal needs some particular total load
capacitance, you need to first subtract the intrinsic or parasitic pin
capacitance of the micro its self before you divide the remainder by two to
figure the actual cap values to put in the circuit.

Jim
 
B

Brian Logan

Jan 1, 1970
0
The following application note discusses AVRs and crystals:

http://www.atmel.com/dyn/resources/prod_documents/doc2521.pdf

I did look at that application note, but obviously not carefully enough as the
selection of capacitors only seemed to mention resonators, so I skipped that
section! Oh well, I've read it now. The example they've chosen is for a crystal
that required a 16pF load, so it's easy for them to specify 22pF capacitors. It
seems that the non-SMD crystals are all 30pF and the SMD ones are 16pF. I'm
trying to avoid the SMD ones as they're at least twice the cost of the non-SMD.
In general, putting too large a crystal is better than too small. It
will increase start-up time and lower the frequency of oscillation, but
you'll also get more stability. Of course, if the feedback level is
marginally low you may lose oscillation altogether.

The app. note also mentions that bigger capacitors make the oscillator consume
more power, which is worthy of note in a solar powered product. Certainly would
be a good idea to err on the high side, though, as you say.
Regarding your PIC16C74 circuit using 32 kHz crystals, what was the
value of the series resistor? Were you able to restore oscillation by
just changing the capacitors or did you install a new crystal as well?
Is it possible the crystals were damaged by too much power? They are
rated at 1 microwatt or so, as compared to several milliwatts for
ordinary crystals.

No series resistor is used. Oscillation was restored merely by changing the
capacitors. One particular board did oscillate, but at close to 200kHz! This was
also fixed by fitting the 33pF capacitors. Another board sometimes powered on at
32.768kHz and other times at close to 200kHz. Again, the capacitors fixed this
board. Many hundreds of these boards have been sent out with 15pF load
capacitors and have worked fine. The faulty boards I looked at had accumulated
over time. Just shows, that even though the oscillator works, it is difficult to
be certain you've selected the right caps. until a long way down the line.

I thought the LP oscillator mode was specifically intended as a low power drive
for crystals such as this, so no resistor necessary.
 
J

Joe Legris

Jan 1, 1970
0
Brian said:
I did look at that application note, but obviously not carefully enough as the
selection of capacitors only seemed to mention resonators, so I skipped that
section! Oh well, I've read it now. The example they've chosen is for a crystal
that required a 16pF load, so it's easy for them to specify 22pF capacitors. It
seems that the non-SMD crystals are all 30pF and the SMD ones are 16pF. I'm
trying to avoid the SMD ones as they're at least twice the cost of the non-SMD.




The app. note also mentions that bigger capacitors make the oscillator consume
more power, which is worthy of note in a solar powered product. Certainly would
be a good idea to err on the high side, though, as you say.




No series resistor is used. Oscillation was restored merely by changing the
capacitors. One particular board did oscillate, but at close to 200kHz! This was
also fixed by fitting the 33pF capacitors. Another board sometimes powered on at
32.768kHz and other times at close to 200kHz. Again, the capacitors fixed this
board. Many hundreds of these boards have been sent out with 15pF load
capacitors and have worked fine. The faulty boards I looked at had accumulated
over time. Just shows, that even though the oscillator works, it is difficult to
be certain you've selected the right caps. until a long way down the line.

I thought the LP oscillator mode was specifically intended as a low power drive
for crystals such as this, so no resistor necessary.

I believe the AVR series has internal series resistors for low-frequency
crystals, but not the PICs. From page 10 of Microchip's AN-588
(discussing 32kHz xtals):

"The series resistance of this type is very high, on the order of
30,000W. It is imperative that care be taken to limit the drive to the
crystal. Only a fraction of a mA of crystal current will damage this
unit, possibly causing it to cease oscillation. This is best done with a
series resistor between the OSC2 pin and the junction of the crystal
lead and phase shift capacitor (Figure 12). If the frequency is moving
upward in a continuous manner, the drive level is probably too high. A
portion of this change will be quite permanent."
 
B

Brian Logan

Jan 1, 1970
0
I believe the AVR series has internal series resistors for low-frequency
crystals, but not the PICs. From page 10 of Microchip's AN-588
(discussing 32kHz xtals):

"The series resistance of this type is very high, on the order of
30,000W. It is imperative that care be taken to limit the drive to the
crystal. Only a fraction of a mA of crystal current will damage this
unit, possibly causing it to cease oscillation. This is best done with a
series resistor between the OSC2 pin and the junction of the crystal
lead and phase shift capacitor (Figure 12). If the frequency is moving
upward in a continuous manner, the drive level is probably too high. A
portion of this change will be quite permanent."

Thank you very much, Joe, for taking the time and trouble to point out the
important detail in the application note. Clearly the series resistor is almost
certainly needed for watch crystals. Looks like it's usually not needed for
higher frequency crystals that can handle more power. The new board I'm laying
out now uses a 3.6864MHz crystal, so I suspect it is less likely to cause the
same problems.
 
Top