LarryD:
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.
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.
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.
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.
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.
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.
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?
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.
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.
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.
Krupski:
...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.
Krupski:
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.
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.
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.
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
[b]PORTB |= _BV (5);[/b]
When something is dumbed-down to the lowest common denominator, nobody LEARNS anything.
Krupski:
Whoa... don't get me started on that topic!
Oh, we wouldn't dare!
Krupski:
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".
Krupski:
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
Krupski:
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.
Krupski:
And, pin numbers! Why "Pin 13"?
Err, why not?
Krupski:
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.
Krupski:
And, why "pinMode" and "digitalRead/Write"? What's wrong with [b]PORTB |= _BV (5);[/b]
I think that one really speaks for itself.
Krupski:
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.
Krupski:
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.