Use of 1 M resistor with external crystal/resonator

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
moorejl57
 
Posts: 13
Joined: Sat Aug 25, 2012 7:33 pm

Use of 1 M resistor with external crystal/resonator

Post by moorejl57 »

Looking at the Leonardo reference design, they use a 1 M resistor in parallel with the external crystal. Looking at the Atmel datasheet for the atmega32u4, there is no indication this is required.

Should I add this to my own compatible designs or assume it is not required? I am used to needing this on my PIC based designs and want some reassurance it is not required for Atmel processors.

Thanks,
Jamie

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Use of 1 M resistor with external crystal/resonator

Post by Franklin97355 »

Just my opinion but if it's not in the reference design it probably is not "required" but if other production designs are using it I would think it was a good idea to follow their lead. It might work without it but it will probably work better with it.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Use of 1 M resistor with external crystal/resonator

Post by adafruit_support_mike »

The 1M resistor in parallel with the crystal is a common feature in logic-gate oscillators.

For the simplest kind of CMOS inverter, shorting the input to the output turns the device into a low-quality substitute for an op amp. The resistor forms a negative feedback loop between the input and output, so left to themselves both will float to VCC/2. If you connect another resistor to the input, it will form a voltage divider with the feedback resistor. Since no current flows into the input of a CMOS inverter, any current that flows through the input resistor also has to flow through the feedback resistor to the inverter's output. The result is a reasonably stable and linear inverting amplifier.

Putting a crystal in parallel with the feedback resistor creates a path where signals at a certain frequency are phase-shifted 180 degrees. Adding that to the inversion (equivalent to another 180 degree phase shift) gives you a 360 degree shift. That turns the negative feedback to positive feedback for that specific frequency. Positive feedback makes signals increase exponentially until they hit the inverter's gain limits.

The upshot is a (hopefully) self-starting oscillator.

For more information about choosing crystals for Atmel microcontrollers, your best bet is to go to the source:

- http://www.atmel.com/images/doc8333.pdf - Selecting and testing 32kHz crystal oscillators for Atmel AVR microcontrollers

- http://www.atmel.com/Images/Atmel-42068 ... VR2067.pdf - Crystal Characterization for AVR RF

- http://www.atmel.com/images/doc2521.pdf - AVR Hardware Design Considerations

moorejl57
 
Posts: 13
Joined: Sat Aug 25, 2012 7:33 pm

Re: Use of 1 M resistor with external crystal/resonator

Post by moorejl57 »

Mike,

Thank you for the detailed information and links. Based on the hardware document, the 1 M resistor is included inside the chip so an external one is not required.

Jamie

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”