Go Down

Topic: crystals for atmel chips (Read 3480 times) previous topic - next topic

jboyton

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.

chucktodd

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.
Currently built mega http server, Now converting it to ESP32.

jboyton

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.

john1993

#18
Sep 17, 2015, 03:07 pm Last Edit: Sep 17, 2015, 08:04 pm by john1993 Reason: 1.2m not 12m
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.

jboyton

In the Atmel app note AVR042 this representation of the oscillator circuits is provided:




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?

john1993

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.

krupski

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.
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

krupski

#22
Sep 18, 2015, 05:02 am Last Edit: Sep 18, 2015, 05:04 am by Krupski
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:





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.
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

jboyton

...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 and do all of us a service by making sure they correct the errors in their documentation regarding this.

john1993

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.

krupski

#25
Sep 19, 2015, 04:36 am Last Edit: Sep 19, 2015, 04:38 am by Krupski
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.
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

krupski

Maybe you can contact Atmel 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?
Gentlemen may prefer Blondes, but Real Men prefer Redheads!

Paul__B

#27
Sep 19, 2015, 09:49 am Last Edit: Sep 19, 2015, 09:55 am by Paul__B Reason: Always something more to be said.
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:
or these


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.

john1993

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.

jboyton

#29
Sep 19, 2015, 06:41 pm Last Edit: Sep 19, 2015, 07:13 pm by jboyton
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.

Go Up