Arduino Forum

Using Arduino => Microcontrollers => Topic started by: aes92000 on Sep 13, 2015, 07:43 am

Title: crystals for atmel chips
Post by: aes92000 on Sep 13, 2015, 07:43 am
a newb question----

i have some atmega644pa-au chips-
datasheet states:
 Speed Grades
̶ 0 - 4MHz @ 1.8 - 5.5V
̶ 0 - 10MHz @ 2.7 - 5.5V
̶ 0 - 20MHz @ 4.5 - 5.5V

does that mean that there are only the 3 speeds for external or is it possible to use a 16MHz???
Title: Re: crystals for atmel chips
Post by: chucktodd on Sep 13, 2015, 09:06 am
a newb question----

i have some atmega644pa-au chips-
datasheet states:
 Speed Grades
̶ 0 - 4MHz @ 1.8 - 5.5V
̶ 0 - 10MHz @ 2.7 - 5.5V
̶ 0 - 20MHz @ 4.5 - 5.5V

does that mean that there are only the 3 speeds for external or is it possible to use a 16MHz???
This is telling you that the processor can be clocked at upto 4mhz with a 1.8V power supply. Up to 10mhz needs at least 2.7v and 20mhz needs Vcc to be at least 4.5v.  The 5.5v is the maximum the processor can safely handle.

So to use 16mhz crystal you need Vcc to be higher than 2.7v  I use 3.3v with 16mhz resonator on a 328p.

Chuck.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 13, 2015, 04:02 pm
I use 3.3v with 16mhz resonator on a 328p.
Have you ever had a problem over clocking it like that?
Title: Re: crystals for atmel chips
Post by: DrAzzy on Sep 13, 2015, 09:46 pm
Those are marked 0 - 20, not 20mhz - as in, it's a range, from 0mhz to 20mhz, and anything in that range is within spec.


So to use 16mhz crystal you need Vcc to be higher than 2.7v  I use 3.3v with 16mhz resonator on a 328p.

Chuck.
See page 310 of the datasheet:

"As shown in Figure 29-1, the Maximum Frequency vs. VCC curve is lin-
ear between 1.8V < VCC < 2.7V and between 2.7V < VCC < 4.5V."

10mhz @ 2.7, 20mhz @ 4.5

4.5-2.7=1.8v
20-10=10mhz

1mhz per 0.18v

That implies that 16mhz is only within spec at 2.7+6*(0.18)= 2.7+1.08 = 3.78v or higher.

That said, it's widely reported that the chips work at 16mhz @ 3.3v, despite this being out of spec. Might not work over the whole temperature range or something, though.
Title: Re: crystals for atmel chips
Post by: chucktodd on Sep 13, 2015, 09:56 pm
Have you ever had a problem over clocking it like that?

nope.

Here is the DigiKey partnumber 490-1198-1-ND 16mhz resonator. I connect a 1M resistor in parallel.  I have not had any problems.

chuck.
Title: Re: crystals for atmel chips
Post by: DrAzzy on Sep 13, 2015, 10:24 pm
Is there a reason you use the resonator instead of a crystal?
Title: Re: crystals for atmel chips
Post by: chucktodd on Sep 13, 2015, 11:19 pm
Is there a reason you use the resonator instead of a crystal?
Acceptable accuracy, cheap price($0.32 per 100), fewer parts(no Caps needed)

Chuck.
Title: Re: crystals for atmel chips
Post by: CrossRoads on Sep 15, 2015, 07:56 pm
I use these
http://www.dipmicro.com/store/XC7-16000 (http://www.dipmicro.com/store/XC7-16000)
less than a quarter each,
and two of these, less than 7 cents each,
http://www.dipmicro.com/store/C1K22-50 (http://www.dipmicro.com/store/C1K22-50)
No problems. Stock up, you'll use them in all your projects.
Title: Re: crystals for atmel chips
Post by: chucktodd on Sep 15, 2015, 10:34 pm
I use these
http://www.dipmicro.com/store/XC7-16000 (http://www.dipmicro.com/store/XC7-16000)
less than a quarter each,
and two of these, less than 7 cents each,
http://www.dipmicro.com/store/C1K22-50 (http://www.dipmicro.com/store/C1K22-50)
No problems. Stock up, you'll use them in all your projects.
Wow, those HC49's are big.  The resonators I use are 3.5 x 1.5 x0.6mm. Those HC49's are 11.5 x 4.7 x 3.5mm, bigger than the 328 TQFP!

 
Chuck.
Title: Re: crystals for atmel chips
Post by: larryd on Sep 15, 2015, 10:45 pm
Hard to manufacture a small 16Mhz xtal that are cheap.
Small solid state devices are easy.
I prefer the stability of a crystal over a resonator.

.
Title: Re: crystals for atmel chips
Post by: DaveEvans on Sep 16, 2015, 08:26 am
nope.

Here is the DigiKey partnumber 490-1198-1-ND 16mhz resonator. I connect a 1M resistor in parallel.  I have not had any problems.

chuck.

why the resistor in parallel?
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 16, 2015, 04:55 pm
Hard to manufacture a small 16Mhz xtal that are cheap...
I prefer the stability of a crystal over a resonator.
imo silly to consider ceramic over quartz in this day and age. unlike decades ago quartz is much cheaper and far more accurate. on world market hc49s 2-3 cents ea and 16mhz watch crystal size or 5x3.2mm smd less than a dime. sometimes as low as a nickel.

personally i never uses any caps unless absolute accuracy required. in that case tcxo best bet anyway.
Title: Re: crystals for atmel chips
Post by: chucktodd on Sep 16, 2015, 08:49 pm
why the resistor in parallel?
From ECS Inc. Ceramic Resonator Principles (http://www.ecsxtal.com/store/pdf/cer_prin.pdf)

page 3:
(http://s5.postimg.org/q0wb09xnb/Ceramic_Considerations.jpg)


The feedback resistor increases the probability that the resonator starts oscillating.

Chuck.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 16, 2015, 09:04 pm
The feedback resistor increases the probability that the resonator starts oscillating.
The Uno R3 has this resistor. But what is the probability that it will fail to start oscillating without the 1M resistor?

By the same token overclocking a little increases the probability of the processor failing. But apparently not by much.
Title: Re: crystals for atmel chips
Post by: chucktodd on Sep 16, 2015, 11:15 pm
The Uno R3 has this resistor. But what is the probability that it will fail to start oscillating without the 1M resistor?

By the same token overclocking a little increases the probability of the processor failing. But apparently not by much.

My projects have never had a clock failure, so I cannot give you a probability.

Chuck.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 17, 2015, 12:06 am
Without knowing how much including that resistor increases the probability that the resonator will oscillate it's hard to calculate if it's even worth bothering. I think it's similar to straying above the guaranteed speed limit of the processor.
Title: Re: crystals for atmel chips
Post by: chucktodd on Sep 17, 2015, 12:29 am
Without knowing how much including that resistor increases the probability that the resonator will oscillate it's hard to calculate if it's even worth bothering. I think it's similar to straying above the guaranteed speed limit of the processor.

The reason I do it, is because the resonator manufacturer recommends it.  A single 0402 1M resistor next to the resonator is an acceptable use of board space.

Chuck.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 17, 2015, 12:40 am
I understand. It's easier to add a resistor that doesn't matter 99.99% of the time than it is to increase Vcc by at least 0.5V or reduce the clock frequency by at least 3MHz -- even though that doesn't matter 99.99% of the time either.
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 17, 2015, 03:07 pm
maybe worth noting that avr chips, like most mcu families, have an internal resistor.  i have measured from 600k to 1.2m depending on particular device.  considering input impedance of the cmos inverter one 100x higher would still be adequate.  in fact even if there were not an internal one then resistance from the epoxy package guarantees proper operation.

also note that some like m8 have internal caps too which can be enabled.  personally i dont bother with internal or external caps as there is little effect on startup, stability, or accuracy.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 17, 2015, 06:54 pm
In the Atmel app note AVR042 (http://www.atmel.com/Images/Atmel-2521-AVR-Hardware-Design-Considerations_ApplicationNote_AVR042.pdf) this representation of the oscillator circuits is provided:

(http://s1.postimg.org/46b94t273/AVR_oscillator.png)


In the text it says that Rf is "approximately 1MΩ" but it seems they are talking about the second circuit (B), the one for the low frequency oscillator. Both drawings include an Rf so it may be applicable to the higher frequency crystal / resonator oscillator as well.

Can you just attach a DMM to the oscillator pins while the chip is sitting on the table and get a meaningful value?
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 17, 2015, 07:42 pm
it depends on the dmm circuit but generally it must be powered up but no xtl. a more reliable proof of internal resistor is measure voltage on the inverter output which will not be at rails as it would if there were no resistor.
Title: Re: crystals for atmel chips
Post by: krupski on Sep 18, 2015, 04:58 am
Acceptable accuracy, cheap price($0.32 per 100), fewer parts(no Caps needed)

Chuck.
Resonators are a bit less expensive, but (in my opinion) that's only a concern for a large manufacturer where one million boards multiplied by 25 cents per board saved is important, but for a hobbiest there is no reason to use an inaccurate and thermally unstable ceramic resonator in lieu of a real crystal.

Also, I use 2 lead SMT crystals to directly replace the resonator on my Arduino boards. They work just fine - and that's without the "necessary" loading capacitors.

There are several picofarads of capacitance on the PC board and traces... I can't see how 20-some pF more is important.
Title: Re: crystals for atmel chips
Post by: krupski on Sep 18, 2015, 05:02 am
Wow, those HC49's are big.  The resonators I use are 3.5 x 1.5 x0.6mm. Those HC49's are 11.5 x 4.7 x 3.5mm, bigger than the 328 TQFP!

  
Chuck.

I use these:


(http://forum.arduino.cc/index.php?action=dlattach;topic=347308.0;attach=138226)


22.1184 mhz, and it runs 100% rock stable. The 1 meg resistor was already there, so I left it, but I would not have added one if it didn't have one already (not needed).  Nor are the loading caps.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 18, 2015, 06:26 pm
...for a hobbiest there is no reason to use an inaccurate and thermally unstable ceramic resonator in lieu of a real crystal.
Resonators have a somewhat faster startup time which might matter in a low power device. For many applications the greater stability of a crystal simply isn't necessary and so saving a dollar might make sense even for the lowly hobbyist.


There are several picofarads of capacitance on the PC board and traces... I can't see how 20-some pF more is important.
Maybe you can contact Atmel (http://www.atmel.com/About/contact/default.aspx) and do all of us a service by making sure they correct the errors in their documentation regarding this.
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 18, 2015, 07:29 pm
ceramic startup vs quartz is minor compared to internal osc which is fastest of all.  comments that they are cheaper are way off too (unless you are digi-sparky-mouser fanboy) so really little reason to go there.  imo choosing ceramic for original pro-mini just one of the several examples of incompetent design.  some uno too.  fortunately chinese clones switched to quartz along with a few other corrections.
Title: Re: crystals for atmel chips
Post by: krupski on Sep 19, 2015, 04:36 am
ceramic startup vs quartz is minor compared to internal osc which is fastest of all.  comments that they are cheaper are way off too (unless you are digi-sparky-mouser fanboy) so really little reason to go there.  imo choosing ceramic for original pro-mini just one of the several examples of incompetent design.  some uno too.  fortunately chinese clones switched to quartz along with a few other corrections.
Whoa... don't get me started on that topic!

Consider, though, things like the pin spacing goof that has been perpetuated throughout all the Arduino boards, not to mention the mounting holes which, by their placement and lack of a "keep-out" zone for the traces, are 98% useless.

Another thing which could be considered a big blunder or a good idea (depending on the level of the user) is pin naming and layout.

For example, why are maybe 6 bits out of an 8 bit port connected to one contiguous connector space and the other two somewhere else? Makes it a mess to use as an 8 bit PARALLEL port.  And, pin numbers! Why "Pin 13"?

I want to know what PORT and what BIT the pin is, not have to constantly bring up the PDF of the board to find out which pin is what (you'd think I would have it memorized by now).

And, why "pinMode" and "digitalRead/Write"?  What's wrong with PORTB |= _BV (5);

When something is dumbed-down to the lowest common denominator, nobody LEARNS anything.
Title: Re: crystals for atmel chips
Post by: krupski on Sep 19, 2015, 04:40 am
Maybe you can contact Atmel (http://www.atmel.com/About/contact/default.aspx) and do all of us a service by making sure they correct the errors in their documentation regarding this.
Maybe AFTER you can explain to me why my boards (both Arduino and homebrew) all work fine WITHOUT caps....  :)

In fact, can you find anyone who has a board that will FAIL without caps?
Title: Re: crystals for atmel chips
Post by: Paul__B on Sep 19, 2015, 09:49 am
Whoa... don't get me started on that topic!
Oh, we wouldn't dare!  :smiley-roll:

Consider, though, things like the pin spacing goof that has been perpetuated throughout all the Arduino boards
Well, that is the risk in beginning a "standard".

not to mention the mounting holes which, by their placement and lack of a "keep-out" zone for the traces, are 98% useless.
I do agree.

You can however use these:
(http://static.scan.co.uk/images/products/1611845-a.jpg) or these (http://ep.yimg.com/ay/yhst-2911898806816/standoff-plastic-adhesive-backed-0-156-in-1.jpg)


For example, why are maybe 6 bits out of an 8 bit port connected to one contiguous connector space and the other two somewhere else? Makes it a mess to use as an 8 bit PARALLEL port.
Ask Atmel - who designed the clearly essential serial interface to use pins 0 and 1 of an 8-bit port.  No fault to Arduino.

And, pin numbers! Why "Pin 13"?
Err, why not?

I want to know what PORT and what BIT the pin is, not have to constantly bring up the PDF of the board to find out which pin is what (you'd think I would have it memorised by now).
Because people (are intended to) use this as an educational system, focused on the application rather than the hardware minutiae.

And, why "pinMode" and "digitalRead/Write"?  What's wrong with PORTB |= _BV (5);
I think that one really speaks for itself. :smiley-eek:

When something is dumbed-down to the lowest common denominator, nobody LEARNS anything.
Admit it.  You, like I, came to Arduino with complete knowledge of microcomputers and even assembler.

So why are we even interested in them if they are so far below our dignity?

Because they are a really neat modular system that you can use for rapid construction, just like the STAMP(, the PICAXE and its other spin-offs) - but more powerful, generally cheaper (vastly cheaper in terms of the clones) and not quite so dumbed down.

Maybe AFTER you can explain to me why my boards (both Arduino and homebrew) all work fine WITHOUT caps....  :)
As Mike would explain, there is a difference  between "working" and "working within specification".  Crystals have specified loading capacitance for correct, reliable and stable operation.  If you operate them outside of that specification, relying on the (significant) pin capacitance of the MCU chip, then it probably will work - but just don't expect it to work to specification.
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 19, 2015, 11:27 am
maybe more a matter of liability and cya than spec.  insurance adjustors not famous for humanitarian grace and christian mercy.  if/when things go south its a good idea to demonstrate compliance to mfg recommendations in the courtroom. 

for example ive tested things like no caps and 16mhz at 3.3v over more than full temperature without problems but for military. medical, or space program etc would not dare such shortcuts.  however hobbyists do enjoy making believe the blinky is critical component in life support system.

regarding weird pin designations and oddball layout, 8 words: mar-ket-diff-er-ent-shee-a-shun.  there would simply be no arduino w/o these queer deviations.  just another atmel/gcc demo board.  i suspect not so much design mistake as shrewd entrepreneurial trickery.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 19, 2015, 06:41 pm
Maybe AFTER you can explain to me why my boards (both Arduino and homebrew) all work fine WITHOUT caps....  :)

In fact, can you find anyone who has a board that will FAIL without caps?
I guess it depends on what you mean by "work fine".

When I connect a crystal without capacitors to an Atmega328p it runs fast. Typical error is on the order of a few hundred parts per million. I've done this a number of times, with both 8MHz and 16MHz crystals. When I add 22pF capacitors it's typically within 15ppm.

So if by "working fine" you mean stable but inaccurate then you're probably right. At least most of the time. It's possible that temperature could affect the stability. I'm not sure. I don't know enough about the subject to intentionally disregard the manufacturer's explicit instructions.
Title: Re: crystals for atmel chips
Post by: krupski on Sep 20, 2015, 06:47 pm
(1) Admit it.  You, like I, came to Arduino with complete knowledge of microcomputers and even assembler.

(2) So why are we even interested in them if they are so far below our dignity?

Because they are a really neat modular system that you can use for rapid construction, just like the STAMP(, the PICAXE and its other spin-offs) - but more powerful, generally cheaper (vastly cheaper in terms of the clones) and not quite so dumbed down.

(3) As Mike would explain, there is a difference  between "working" and "working within specification".  Crystals have specified loading capacitance for correct, reliable and stable operation.  If you operate them outside of that specification, relying on the (significant) pin capacitance of the MCU chip, then it probably will work - but just don't expect it to work to specification.

(1) Yes indeed I had many years (several decades actually) of hardware and software design and fabrication experience, including Motorola and Intel assembler, and C/C++ programming (and even Basic!).

(2) An AVR attached to a breakout board is a rather handy and useful device. And, buying an Arduino board is cheaper and easier than building one from scratch.  But if I ever got off my behind and designed my own little breakout board, I would never use an Arduino board again.

(3) That's funny. A ceramic resonator is all over the place in frequency (mostly vs temperature) and that's just fine, yet a few PPM frequency error from an improperly loaded crystal is unacceptable.   :)
Title: Re: crystals for atmel chips
Post by: krupski on Sep 20, 2015, 06:50 pm
for example ive tested things like no caps and 16mhz at 3.3v over more than full temperature without problems but for military. medical, or space program etc would not dare such shortcuts.  however hobbyists do enjoy making believe the blinky is critical component in life support system.
Exactly. If I were designing something which was to be man-rated, you can bet your last cent that I would use the specified parts, from the specified manufacturer and specified lot number.

But, a blinking LED really isn't as important as a man-rated device...   :)
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 20, 2015, 07:59 pm
(3) That's funny. A ceramic resonator is all over the place in frequency (mostly vs temperature) and that's just fine, yet a few PPM frequency error from an improperly loaded crystal is unacceptable.   :)
You're off by a couple orders of magnitude.

On the one hand you decry the sloppiness of the Arduino designs but at the same time leave out a couple of penny capacitors because it's just a "blinking LED".

I agree with you about crystals; I'd use one if I were designing my own Arduino-like board. Why not? But the truth is that a resonator is sufficient in most cases. Even the internal oscillator, which makes a resonator look like a rock, is often good enough.
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 20, 2015, 09:05 pm
When I connect a crystal without capacitors to an Atmega328p it runs fast. Typical error is on the order of a few hundred parts per million.
edit: "really is off by a couple orders of magnitude."

at least that is what i see after testing several thousand m328 with and without caps for a customer over 2 year period.  i just ran another batch monday with similar results: average deviation around 300-400ppm.  ie hfuse=d0 lfuse=f7 22pf=7998.275mhz 0pf=8001.154mhz oc1a pin measured against gpsdo.  More for crystals for tcxo or ocxo which are designed for "pulling".  even then seems like about one order of magnitude off in my experience.  maybe extreme for ceramic too.

anyway as i said imo ceramic makes little sense. they really are more expensive than quartz on world market and yet significantly less accurate/stable.  if you need rtcc stability then common 16mhz are inadequate no matter what caps.  then temp compensated 32khz or tcxo etc are used.  may be good enough for things like async where just about anything works.  even properly calibrated internal ok for that.

only reason i can see for ceramic might be faster startup mentioned before with better accuracy than uncalibrated rc.  in other words one out of ten thousand applications.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 20, 2015, 09:44 pm
at least that is what i see after testing several thousand m328 with and without caps for a customer over 2 year period.  i just ran another batch monday with similar results: average deviation around 30-40ppm not hundreds.  ie hfuse=d0 lfuse=f7 0pf=7998.275mhz 22pf=8001.154mhz oc1a pin measured against gpsdo.  i think you may have accidentally purchased crystals for tcxo or ocxo which are designed for "pulling".  even then seems like about one order of magnitude off in my experience.  maybe extreme for ceramic too.
I don't understand your numbers. 7998.275MHz isn't within a few parts per million. It's slow by 215ppm.

The ceramic resonators that I've measured, like those in my Unos, have been about 1000ppm slow.

My experience is much more limited than yours. I have only tested a handful of crystals and resonators. Maybe you can tell me if I purchased the wrong crystals. Here are two that I have tried recently:
http://www.mouser.com/Search/ProductDetail.aspx?R=9C-8.000MEEJ-Tvirtualkey57230000virtualkey717-9C-8.000MEEJ-T (http://www.mouser.com/Search/ProductDetail.aspx?R=9C-8.000MEEJ-Tvirtualkey57230000virtualkey717-9C-8.000MEEJ-T)
http://www.mouser.com/Search/ProductDetail.aspx?R=ABL-16.000MHz-B1Uvirtualkey52750000virtualkey815-ABL-16-B1U (http://www.mouser.com/Search/ProductDetail.aspx?R=ABL-16.000MHz-B1Uvirtualkey52750000virtualkey815-ABL-16-B1U)

Also, our fuse settings are different. Yours are for full swing, slow rise and mine are for low power, fast rise. I wonder if that matters?

Still learning...
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 20, 2015, 09:48 pm
I see you edited your post. The 300-400ppm is in line with what I have seen in my few tests. That's two orders of magnitude (https://en.wikipedia.org/wiki/Order_of_magnitude), in terms of ppm error.
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 20, 2015, 09:56 pm
I see you edited your post. The 300-400ppm is in line with what I have seen in my few tests. That's two orders of magnitude (https://en.wikipedia.org/wiki/Order_of_magnitude), in terms of ppm error.
yes, that was a "senior moment". the measurements were correct but swapped and my ppm description off by some decimal points. corrected. maybe someday i will learn to count.  it really is off by orders of magnitude.

btw those were 2 cent hc49s from taobao. same seller puts then out on ebay for a nickel ea:  http://www.ebay.com/itm/121233096977?_trksid=p2055119.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT (ebay almost always about 2x cost due to paypal and ebay fees). my statement quartz is cheaper was challenged offline so it would be interesting to see if ceramic can be had for anything close to that.
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 21, 2015, 12:07 am
our fuse settings are different. Yours are for full swing, slow rise and mine are for low power, fast rise. I wonder if that matters?
some but apparently not that much compared to no caps.

its been a couple years since trying low power because savings did not strike me as worth the drawbacks but my interest was piqued so i tried the most common arduino settings:

Code: [Select]

h  l  22pf=      0pf=
da ff 7998.506 8001.847 promini
de ff 7998.505 8001.850 uno
d0 f7 7998.275 8001.154 mine
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 21, 2015, 12:53 am
Code: [Select]

h  l  22pf=      0pf=
da ff 7998.506 8001.847 promini
de ff 7998.505 8001.850 uno
d0 f7 7998.275 8001.154 mine

Thanks for doing that test. In the case of those crystals adding capacitors didn't improve the accuracy significantly. Was I just lucky with the $0.60 crystals I bought? Or is there something different about the specifications that matters?

I'm just a hobbyist and not in the least interested in savings of tens of cents. But if I were selling many boards I would care. At least from browsing digikey and mouser it appears that the really small SMD crystals are more expensive. Maybe that isn't the case in the general market, I don't know.

Title: Re: crystals for atmel chips
Post by: john1993 on Sep 21, 2015, 01:31 am
i find smd about twice the cost of hc49s: 5-10 cents depending on qty.  those cheapies my client buys and i piggyback are -12 so the 22pf numbers are close to expected.  however for various reasons 22pf is what my test jig is set up for.  what impresses me most is how amazingly close they all are.  with proper loading very little variation even from lot to lot.

but for real precision timekeeping like rtcc even a few ppm inadequate.  we must stay in the parts per billion to avoid having to correct time every few weeks so even quartz in the specified circuit not good enough.
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 21, 2015, 02:03 am
ithose cheapies my client buys and i piggyback are -12 so the 22pf numbers are close to expected.
-12 ppm? I didn't see anything like that in your examples.

...for real precision timekeeping like rtcc even a few ppm inadequate.
Adequate is a relative term. It's been largely missing from this discussion.
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 21, 2015, 02:27 am
nono... "-12" means 12pf not ppm in the industry. used to be printed on the package for parallel cut but not so much these days.  to be honest not guaranteed for these alibaba cheapies.  i cannot afford to pay $2 for parts that i sell for $2 but 100% certification is worth it when they take less than one second to characterize.  shhhhhh.... ten thousand percent markup.

as far as relative terms it seems mentioning having to adjust every few weeks instead of months was indicative.  i would include lab grade freq counter in the "inadequate" class too.  the stock circuit not good enough for maybe half my commercial designs lately.  on the other hand did i mention no caps at all for most of my hobby projects?
Title: Re: crystals for atmel chips
Post by: jboyton on Sep 21, 2015, 04:00 am
I just meant that adequate depends on the application. For the vast majority of Arduino users a ceramic resonator is adequate. So unless it can be demonstrated that replacing it with a crystal saves money or costs exactly same, why bother?
Title: Re: crystals for atmel chips
Post by: krupski on Sep 21, 2015, 02:40 pm
Also, our fuse settings are different. Yours are for full swing, slow rise and mine are for low power, fast rise. I wonder if that matters?

Still learning...

FYI, I also use full swing crystal and slow rise VCC fuse setting.

Interestingly though, there seems to be no difference between full swing and low power crystal. The amplitude of the crystal oscillation is the same between both settings as measured by oscilloscope, and also when received on a shortwave radio (same signal strength).
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 21, 2015, 03:03 pm
i see minor reduction in chip current and lower unloaded voltage.  you really need specialized probe to view that with a scope. 

the real difference is sensitivity to external noise and pcb layout which can be a big problem.  one infamous case was the m1284 fiasco where many believed defective ic but really was bad user design practices.  switching to full swing pretty much solved the problems.  i saw similar issues with at90s parts back in the old days.  low power mode is what i consider to be one of the poor choices made by team arduino.


artists... cant live with em... cant shoot em...  well you could but then we would have nothing to gripe about. :)
Title: Re: crystals for atmel chips
Post by: retrolefty on Sep 21, 2015, 03:09 pm
i see minor reduction in chip current and lower unloaded voltage.  you really need specialized probe to view that with a scope.  

the real difference is sensitivity to external noise and pcb layout which can be a big problem.  one infamous case was the m1284 fiasco where many believed defective ic but really was bad user design practices.  switching to full swing pretty much solved the problems.  i saw similar issues with at90s parts back in the old days.  low power mode is what i consider to be one of the poor choices made by team arduino.


artists... cant live with em... cant shoot em...  well you could but then we would have nothing to gripe about. :)

 I agree. The standard Arduino board (UNO) would never be a candidate for low power operation as the board has on-board continuous loads that swap any meaningful savings from the AVR chip. 

Title: Re: crystals for atmel chips
Post by: jboyton on Sep 21, 2015, 07:12 pm
the real difference is sensitivity to external noise and pcb layout which can be a big problem.  one infamous case was the m1284 fiasco where many believed defective ic but really was bad user design practices.  switching to full swing pretty much solved the problems.
I hadn't heard about that issue. Those were interesting threads to read.

I measured about 1.4mA difference between full swing and low power fuse settings with a 328p at 5V. That sure isn't enough to worry about on a typical Arduino board. Elsewhere maybe.


Code: [Select]
Atmega328p, 8MHz crystal, 5V, 25°C, error in parts per million

none 22pf 18pf current, mA
----- ---- ---- -----------
+235 -14 +9 - low power,  fast rise (lfuse:0xFF) 9.7
+235 -14 +9 - low power,  slow rise (lfuse:0xEF) 9.7
+251 -25 -3 - full swing, fast rise (lfuse:0xF7) 11.1
+251 -25 -3 - full swing, slow rise (lfuse:0xE7) 11.1
Title: Re: crystals for atmel chips
Post by: john1993 on Sep 22, 2015, 01:33 am
well that is some useful data.  even led power takes bigger hits.  really gives an overview hard to ferret out of spec sheets.  funny how a thread started on noobie confusion can produce info worthy of saving to hd.