Questions about using an external oscillator

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm going to play around with USB with my 2313. I'm looking at this circuit, and it needs a 12MHz crystal, but I have never worked with crystals before, and I need help finding the value of the load capacitors. I have looked around the internet but have not found a good tutorial that explains this thoroughly and I have a few questions:

The schematic from the website states that the load capacitors are 27pF, but I heard that all crystals are different and may even need adjusting. I am planning on buying this crystal, and it says that the impedance is 32pF and the shunt capacitance is 7pF. What do these values mean, and how do I find the value of the capacitors I should be using?

-Cory Walker

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The value of the capacitors is not that critical. As long as they are in a certain range, it should be all right. I have the same crystal with 15 pF capacitors (in the same circuit), and I haven't had any problems.
I hope, this helps,
Zoltan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel says

CL1 = CL2 = 2 * (CL - Cs)

CL1: The first load capacitor
CL2: The second load capacitor
CL: Load capacitance from the crystal datasheet (what you calls load impedance)
Cs: Stray capacity 5 ... 10pF

So you get something between 44pF ... 54pF. This is beyond Atmel's recommended range of 22 ... 33pF. If this is for something really important, then consider getting another crystal with a CL in the 20pF range. If this is really just for play, try two 33pF capacitors, or maybe even two 47pF capacitors.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the info Arnold. I found a new crystal (20pF) and calculated the capacitors to be 26pF. I can't find any 26pF capacitors, so I settled with 22pF. A 4pF difference shouldn't matter that much should it? This is just a basic USB circuit.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It should not matter. You just need to be in the right range. 22pF is within Atmel's recommendation for the AVR's build in oscillator. And it is within the range of what should bring you near the crystal's nominal frequency.

The right load should ensure that the crystal oscillates, which is a good idea :-) and that it oscillates near its nominal frequency. By varying the load you can pull a crystal's frequency slightly.

The given stray capacitance of 5pF ... 10pF as used in the equation is already an estimation, and depends on e.g. your PCB layout. Then you have manufacturing tolerances of the crystal, the capacitors, and of course the AVR. Oh, and the crystal is temperature dependent.

So even if you would use the exact calculate capacitance values it would be extremely unlikely that you hit the nominal crystal frequency. A few ppm frequency offset are normal and ok for most application.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, thanks. I didn't know how much the capacitors really affected the frequency.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you read Colin O'Flynn's article Why you need a Clock Source?
I think it's very valuable.

Regards
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the link Sebastian. How do I tell if my crystal is series or parallel? I searched the terms in the datasheet, but all it talked about was 'series resistance'.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the crystal has a load capacitance specified it is parallel.

Leon

Leon Heller G1HSM