0

Use of 1 M resistor with external crystal/resonator
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Use of 1 M resistor with external crystal/resonator

by moorejl57 on Mon Jul 08, 2013 2:47 pm

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
moorejl57
 
Posts: 13
Joined: Sat Aug 25, 2012 7:33 pm

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

by franklin97355 on Mon Jul 08, 2013 3:22 pm

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.

franklin97355
 
Posts: 21089
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

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

by adafruit_support_mike on Mon Jul 08, 2013 5:19 pm

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
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

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

by moorejl57 on Tue Jul 09, 2013 3:24 pm

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
moorejl57
 
Posts: 13
Joined: Sat Aug 25, 2012 7:33 pm

Please be positive and constructive with your questions and comments.