Can I use a 4pF crystal with the SamD21? - Page 1
Forum section: electronics / general

author: Starlord
author_rank: Frequent Contributor
timestamp: May 12, 2015, 01:11:32 am
content: http://www.atmel.com/Images/Atmel-42181-SAM-D21_Datasheet.pdfhttp://www.digikey.com/product-detail/en/ABS06-107-32.768KHZ-T/535-12373-1-ND/4291563Can I use that crystal with that processor? The Xplained board for this processor and its datasheet only mention 12.5pF and that seems to be some sort of standard, but the 4pF crystal is less expensive. Is there a downside to using a 4pF crystal? Page 965 of the datasheet has the electrical stats for the 32KHz crystal, and it does say 12.5pF is the max, and lists no minimum. So is there no minimum?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 12, 2015, 01:22:02 am
content: Minimum's going to be limited by pin capacitance, I think.You can always "suck it and see", but the problem with too much capacitance is a lower impedance, which needs more drive. So it might not start up, or it starts up inconsistently. The frequency might also be a little different.Tim

author: Starlord
author_rank: Frequent Contributor
timestamp: May 12, 2015, 01:49:43 am
content: QuoteI don't understand. How would reducing the capacitance of the crystal result in too much capacitance?Also, I found this tutorial for choosing capacitors for a crystal:https://blog.adafruit.com/2012/01/24/choosing-the-right-crystal-and-caps-for-your-design/But I assume her numbers are way off for the trace capacitance because it would make using a 4pF crystal impossible, ever. I did some googling, and it seems like my hunch was right:http://www.edn.com/electronics-blogs/bakers-best/4426162/PCB-signal-coupling-can-be-a-problemWith ridiculous lengths like 5cm, the calculations they do still give only 0.1pF for parasitic capacitance. So with this crystal mounted as close to the processor as possible, namely, around 1mm away, the parasitic capacitance of the traces should be insignificant, and 8pF capacitors should be ideal.Unless of course, the pin capacitance also comes into play, but again, I don't know where to find that information. But I am using the TQFP package if that helps.

author: c4757p
author_rank: Super Contributor
timestamp: May 12, 2015, 01:55:52 am
content: Quote from: Starlord on May 12, 2015, 01:49:43 amBecause 4pF is very very small, so your parasitics will be wandering much closer to it. It's entirely possible that the device will have an input capacitance alone that is above 4pF.

author: Dragon88
author_rank: Regular Contributor
timestamp: May 12, 2015, 03:19:01 am
content: Quote from: Starlord on May 12, 2015, 01:11:32 amFrequency inaccuracy, frequency instability, or maybe it just won't start.You should double check the package you selected and pricing on alternate options....

author: Starlord
author_rank: Frequent Contributor
timestamp: May 12, 2015, 04:10:22 am
content: On page 965:http://www.atmel.com/Images/Atmel-42181-SAM-D21_Datasheet.pdfWhat does "parasitic capacitor load" refer to? Is that the pin's parasitic capacitance?And if so, why aren't the QFN packages listed? Would theirs be similar? Or is it so little it's not worth worrying about and only the crystal shunt capacitance needs to be accounted for?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 12, 2015, 04:11:34 am
content: Quote from: Starlord on May 12, 2015, 01:49:43 amIn classic EDN style, the article is written by an idiot. The formula is only applicable for parallel electric field lines, which will not occur here. The standard case is a parallel plate capacitor, where a large amount of the area is far from the edges. The fringing fields of adjacent traces accounts for a huge amount more capacitance than the 0.07mm edge width alone can account for.In any case, that's trace-to-trace, which isn't the concern here; you need trace-to-ground. 5cm of trace over ground plane would be in the 2pF range, offhand.QuotePage 963 ish, by the looks of it.Cheers,Tim

author: Starlord
author_rank: Frequent Contributor
timestamp: May 12, 2015, 05:14:45 am
content: Quote from: T3sl4co1l on May 12, 2015, 04:11:34 amOkay, but that's still only like 0.04pF per mm. So little as to not even matter, and way less than Adafruit suggests. Who'd stick a crystal 5cm away from the mcu?QuoteSo by "parasitic capacitor load" they mean "parasitic capacitance"? I googled the term "parasitic capacitor load" and there's literally one mention of it on the web.

author: Starlord
author_rank: Frequent Contributor
timestamp: May 12, 2015, 05:23:24 am
content: Another thing I'm confused about is if that's the parasitic capacitance, and there's two pins, would I add the capacitance of both?The datasheet lists Crystal shunt capacitance of 0.1pF and parasitic capacitances of 3.1pF and 3.3pF, so would I add the three together, giving me 6.5pF which is more than 4pF meaning it's impossible to use a 4pF crystal, or would I add say, 0.1pF and 3.3pF for the worst case to get 3.4pF and then add maybe 0.1pF for my traces which are less than 2mm, and that gives me 3.5pF, which puts me really close to 4pF, and then the question becomes do I need caps? Or do I need to get really close to 4pF? Or do I need to have at LEAST 4pF of capacitance, so its better to go over than slightly under?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 12, 2015, 10:41:31 am
content: Quote from: Starlord on May 12, 2015, 05:14:45 amI think she was getting at total load. So, including pin capacitance. Which as mentioned, is on the order of 3-5pF. So you don't get much room leftover for traces (if you needed it) or tuning.Quote from: Starlord on May 12, 2015, 05:23:24 amDivide, actually. Capacitors in series follow the same formula as parallel resistors: C = C1 * C2 / (C1 + C2). For equal capacitances, the ratio is half.So if a crystal wanted 8pF, you would need 16 + 16pF to ground, one each side. About 3pF of that (each) is already in the IC's pins. A couple pF is also "holder capacitance", if the crystal is in a metal, grounded case (if it has ground pins or a metal case, it's preferable to ground it). So a pair of 10 to 12pF caps would seem appropriate here.Tim