1 meg "load" resistor across crystal?

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

We've inherited a partial design for an AVR that included a 1 megaohm resistor across the crystal (XTAL1-XTAL2) in addition to the load caps. We've never had this in past AVR designs, but this one >>is<< a hair different, as we normally run at 3.6MHz or 7.3MHz and this is a 20MHz design.

Any advice, or pointers to references, on when this resistor is desired/needed?

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

My 2 cents:

Some IC-oscillators need such a resistor to
provide a DC path (for example a 74HC4060).

Since I see no such resistor in the Atmel AVR
datasheets I conclude, that the AVR xtal-oscillator
has an internal DC biasing scheme and does not need
such a resistor.

At 20 MHz a parasitic capacitance of 1pF already
has a reactance of 10k. So at the high frequency
the circuitry will not see 1M but only parasitic
effects.

Therefore I doubt, that a 1M resistor is useful.

I have seen some notices in other forums, that
an XTAL would need such a resistor as "load"
or to "stabilze" the oscillation. I have never
seen these arguments in serious datasheets.

Other opinions are welcome !

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

It would certainly load the crystal, and 'spoil the Q', so it would be easier to pull away from resonance with the caps to ground. I think.

Imagecraft compiler user

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

Back in my 68HC11 days, we had to place a 10M Ohm phase shifting resistor in parallel with the crystal. Not knowing any better, my first AVR PCB design incorporated the 10M Ohm phase shifting reisitor, as well. The oscilator just didn't work, with any value resistor at any crystal frequency - be it 24, 20, 18.432, 16, 14.7456, 10, 8, 4, 2 or 1MHz.

Since that first AVR design, I've use all of the above mentioned crystal frequencies - all with 18pF to 22pF capacitors - with no oscilator problems - without the 10M Ohm phase shifting resistor.

I think the 10M Ohm phase shifting resistor was used in the Motorola oscilator designs to overcome oscilator start-up issues associated with their particular oscilator design.

I've never really looked at the oscilator design within the AVR specifically - probably because the AVR oscilator works so well.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

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

I haven't seen such a resistor in an AVR designs or datasheets. So, I was somewhat surprised when I saw such a 1 Mohm resistor across the 25MHz crystal of a PIC18F67J60 (with cool on-board ethernet controller) kit from http://www.edtp.com

I took a look at the PIC18F67J60 datasheet which shows an optional series resister with the note: "Rs may be required to avoid overdriving crystals with low drive level specifications". Additionally, the datasheet gives references to 5 application notes about oscillators (for PICs, of course) which may contain more information about the use of a series resistor.

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

I have also done a few designs with a resistor in parallel with the crystal. It was always called out in the spec sheet.

A simple generic inverter with no internal feedback needs something to set its operating point since a crystal provides no DC path. It has always been my assumption that, lacking some specific requirement for a feedback R, you should not put one in.

The resistor will certainly reduce the Q. The stray C associated with it will shift the operating frequency slightly.

For reduction in drive current (usually 32KHz crystals), the recommended circuits I've seen call for a resistive voltage divider between the output pin and the crystal.

Jim

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

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

Jim,

Your post makes sense and separates the concepts I blurred in my post. I should have been more careful to point out in my post that the PIC18F kit has a 1Mohm across the crystal leads whereas the PIC18F datasheet does not show that parallel crystal, but rather a series crystal in the position you mentioned to reduce drive current.

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

Thanks all for the replies (and keep them coming).

NB: We fired up two proto boards w/ 20MHz crystal and our "standard" 22pF load caps, and both started and are running at a good frequency.

The crystals were from junk bin/previous inventory, so I'll double check the specs. But for now, I'll just skip that [1Mohm across the crystal] extra component.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

What baud do you use at 20mhz? (is 22.11 a magic freq?)

Imagecraft compiler user

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

I think 18.432MHz is one of the magic numbers for AVR BAUD rate.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

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

bobgardner wrote:
What baud do you use at 20mhz? (is 22.11 a magic freq?)
Hi Bob, here's some output from my open-source software tool (free download at http://files.b9.com/cluck/ ). First, a list of zero-error baud rates less than 25MHz:
CLUCK> (zero-error-uart-clocks)
  1.8432 MHz
  3.6864 MHz
  7.3728 MHz
 11.0592 MHz
 14.7456 MHz
 18.4320 MHz
 22.1184 MHz

At 20MHz, there's a lot of baud rates (with the divisors shown) that have an error rate less than 2%:

 CLUCK> (avr-uart-divisors 20000000)
  Baud  Div    Err  U2X    Err
   300 4096   1.7% 4096 103.4%
   600 2082   0.0% 4096   1.7%
  1200 1041  -0.0% 2082   0.0%
  2400  520  -0.0% 1041  -0.0%
  4800  259   0.2%  520  -0.0%
  9600  129   0.2%  259   0.2%
 14400   86  -0.2%  173  -0.2%
 19200   64   0.2%  129   0.2%
 28800   42   0.9%   86  -0.2%
 38400   32  -1.4%   64   0.2%
 56000   21   1.5%   44  -0.8%
 57600   21  -1.4%   42   0.9%
 76800   15   1.7%   32  -1.4%
115200   10  -1.4%   21  -1.4%
128000    9  -2.3%   19  -2.3%
250000    4   0.0%    9   0.0%
256000    4  -2.3%    9  -2.3%
500000    2 -16.7%    4   0.0%
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

What baud do you use at 20mhz? (is 22.11 a magic freq?)

Quote:

At 20MHz, there's a lot of baud rates (with the divisors shown) that have an error rate less than 2%:

20MHz is the max spec for Mega48, so I have to stick with it for a production design. And the specs don't allow me the luxury of 18.432; I'm already counting cycles in the ISRs. ;)

Commo is only for setup and dev monitoring, so I planned to start at 19200 as "comfortable" with the low error percentage.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Sounds fine, Lee. I would point out that 38400 (in U2X mode) has the same low error rate (0.2%) as 19200 baud.

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

Yeah, I usually have a config setting to select baudrates. I might go U2X and allow 9600, 19200, 38400, and 57600. Or just hard-code the 19.2.

Not a critical part of this app, as long as it is reliable for config.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:
Not a critical part of this app, as long as it is reliable for config.
What? You're giving up a greater transfer rate merely for the sake of increased data fidelity? :o

I'm reminded of a crummy corporate information system that I had to use. The IT guys were fond of saying, "well, we know the system doesn't work very well, but it didn't cost much money." :cry:

If your customers complain about corrupted data, at least they'll be happy that the corrupted data was transferred speedily :wink:

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

Kevin: Well, he does gain quite a lot of power with an extra 2MHz. And 0.2% error in a config thingie is not that bad.

At 20MHZ you get 0% error @ 2400 and 4800bauds.

There are pointy haired bald people.
Time flies when you have a bad prescaler selected.

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

Quote:

It was always called out in the spec sheet.


Jim--the spec sheet for the crystal, or the micro?

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Guyzz shouldn't this be in the new electronics forum ??

/Bingo

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

Yes, Bingo, I think that you are quite right.

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

Some crystal manufacturers have good applications notes that tell why there are 1 or 10 Mohms parallel or some series resistor. ECS had good ones I think.

The parallel resistor is to provide DC path between the output and the input of the CMOS inverter inside the chip. This biases the CMOS inverter to linear operation, where Vin equals Vout, in ideal case it is half of the VCC supply voltage.

Think of it like inverting op-amp with high gain. Therefore a little push on the input provides huge pull on the output, and it is actually the random noise that starts the oscillating. All AVRs have built-in bias resistor (or respective semiconductor that represents the resistor), and actually the resistor value can be selected with the fuses. For example, low speed crystals require different resistor there than high speed crystals etc.

The series resistor is to limit or reduce the power fed to the crystal, so that it will not break because of overdriving. Fuse bits might control this too.

- Jani