ATmega328p with a 1M resistor on crystal

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
I'm designing a board with an atmega328p that will run Arduino, looking at Arduino schematic it uses a 1M resistor in parallel with the crystal but I didn't find any info regard this resistor on atmel documentation.

http://arduino.cc/en/uploads/Mai...

Why they use it and should I use or can I discard it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

metRo_ wrote:
I'm designing a board with an atmega328p that will run Arduino, looking at Arduino schematic it uses a 1M resistor in parallel with the crystal but I didn't find any info regard this resistor on atmel documentation
It's a feedback resistor. It is recommended by the manufacturer of the resonator, and can help ensure resonator startup.
https://www.avrfreaks.net/index.p...

I can't find it now but someone recently (less than a year ago) pointed out that since the AVR uses an internal inverting amplifier to form the oscillator, it necessarily has a feedback resistor already built in. However it won't hurt to follow the manufacturer's recommendation.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That resistor is NOT needed. Arduino designers are twice wrong on this one.

The spec sheets for crystals and resonators tend to assume that you are using an inverter such as a 74HC04. To get a crystal or resonator to work with a generic logic inverter, you need the resistor. The resistor biases the inverter into its linear region near Vout = Vcc/2.

Nowadays, almost all devices that have the capability for an external resonator with an internal active element include that bias resistor, or something equivalent to it. Sadly, the spec sheets tend not to show this but the oscillator section never shows that resistor unless it is actually needed.

Adding such a resistor will actually degrade the operation of the oscillator. The net resonator Q is now lower and it may not start reliably.

Leave the resistor out of the circuit.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you all, it is clear now :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
Adding such a resistor will actually degrade the operation of the oscillator. The net resonator Q is now lower and it may not start reliably.
Without specs on the oscillator's value for Rf, how do you make that determination?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Any parallel resistance will reduce Q. There is already a bias resistor, or equivalent, in the IC. So, adding an external resistor will reduce the Q even further.

Proper operation of a crystal oscillator depends on the Q of the resonator. The Q has to be greater than some value depending on the feedback gain. Lowered Q will surely result in longer startup because of lower loop gain. Other performance values will change also.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
There is already a bias resistor, or equivalent, in the IC.
Yes, but where are the specs?
Quote:
Proper operation of a crystal oscillator depends on the Q of the resonator. The Q has to be greater than some value depending on the feedback gain.
Precisely, but without knowing the feedback gain of the internal inverted amplifier in the AVR, how can we select a resonator with a matching Q? And how can we state with certainty that adding an X-valued external feedback resistor takes us closer to or farther from the ideal Q?

Presumably the various CKSEL options supported by an AVR encode an oscillator configuration (Rf and other parameters) for a 'good fit' for the intended resonator, but I have seen no documentation to that effect.

I've read AVR4100, but that only applies to 32 kHz crystals. Is there some document that goes deeper for HF resonators?

This is (or at least has been) above my paygrade, but I'm always happy to learn from the experts (absolutely no sarcasm intended).

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Without the specs that are not provided, we cannot say what "ideal" is. I think that there may be some hints (in a few of the AVR spec sheets) on maximum ESR of the high frequency crystal.

The best we can go by is that an external parallel resistor is, as far as I can recall, never shown in any AVR spec sheet.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net