| Author |
Message |
|
|
Posted: Feb 04, 2008 - 11:27 PM |
|


Joined: Nov 10, 2007
Posts: 90
Location: Area 51
|
|
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 |
_________________ Clustur.com
|
| |
|
|
|
|
|
Posted: Feb 04, 2008 - 11:52 PM |
|

Joined: Aug 06, 2007
Posts: 169
|
|
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 |
|
|
| |
|
|
|
|
|
Posted: Feb 05, 2008 - 12:25 AM |
|

Joined: Nov 29, 2007
Posts: 2706
|
|
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. |
_________________ Windows is like the faint smell of piss in a subway... -- Charlie Brooker, The Guardian, Monday 28 September 2009
|
| |
|
|
|
|
|
Posted: Feb 05, 2008 - 01:51 AM |
|


Joined: Nov 10, 2007
Posts: 90
Location: Area 51
|
|
| 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. |
_________________ Clustur.com
|
| |
|
|
|
|
|
Posted: Feb 05, 2008 - 09:40 AM |
|

Joined: Nov 29, 2007
Posts: 2706
|
|
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. |
_________________ Windows is like the faint smell of piss in a subway... -- Charlie Brooker, The Guardian, Monday 28 September 2009
|
| |
|
|
|
|
|
Posted: Feb 05, 2008 - 12:15 PM |
|


Joined: Nov 10, 2007
Posts: 90
Location: Area 51
|
|
| Ok, thanks. I didn't know how much the capacitors really affected the frequency. |
_________________ Clustur.com
|
| |
|
|
|
|
|
Posted: Feb 05, 2008 - 03:24 PM |
|


Joined: Aug 22, 2004
Posts: 1625
Location: Germany
|
|
|
|
|
|
|
Posted: Feb 05, 2008 - 05:34 PM |
|


Joined: Nov 10, 2007
Posts: 90
Location: Area 51
|
|
| 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'. |
_________________ Clustur.com
|
| |
|
|
|
|
|
Posted: Feb 05, 2008 - 05:53 PM |
|


Joined: Jul 27, 2001
Posts: 5142
Location: St. Leonards-on-Sea (UK)
|
|
If the crystal has a load capacitance specified it is parallel.
Leon |
_________________ Leon Heller
G1HSM
leon355@btinternet.com
|
| |
|
|
|
|
|