Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: TrickyNekro on August 26, 2008, 07:00:53 AM

Title: How do I connect a oscillator to an AVR
Post by: TrickyNekro on August 26, 2008, 07:00:53 AM
Hello guys...

This one is simple... How do I connect an oscillator to an AVR?
like this one:
(http://www.enterpoint.co.uk/images/OSCILLATOR_PACK1.JPG)

I think it's the XTAL1 which gets the signal and XTAL2 is to ground right?

Not that it's so needed but if I can avoid multi - crystals on board it would be good enough...

Are they better than crystals? not that I care much but asking...
Gotta a though it's kinda the same...
Title: Re: How do I connect a oscillator to an AVR
Post by: frank26080115 on August 27, 2008, 12:04:06 AM
XTAL2 is not connected, other than that, there's no reason not

Comparing these to HC-49 crystals, it's space vs part count, since you need two capacitors if you use the HC-49 kind.

The AVR has to amplify the clock signal if you use the smaller variety, I'm not sure how much extra current is needed but it's probably negligible.
Title: Re: How do I connect a oscillator to an AVR
Post by: TrickyNekro on August 27, 2008, 03:12:39 AM
nice!

Thank you!!!

But what do you mean by amplifying.... how?
And can I use it for more than on microcontroller?

Best Regards,
Lefteris
Title: Re: How do I connect a oscillator to an AVR
Post by: airman00 on August 27, 2008, 10:49:52 AM
But what do you mean by amplifying.... how?
And can I use it for more than on microcontroller?

I dunno what you mean by amplifying , all these XTALs require is capacitors next to them. Google around and you'll see sample schematics.

And you can share XTAL i believe.
Title: Re: How do I connect a oscillator to an AVR
Post by: frank26080115 on August 29, 2008, 06:24:08 PM
from the atmega168 datasheet

Quote
Pins XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier which can be
configured for use as an On-chip Oscillator, as shown in Figure 8-2. Either a quartz crystal or a
ceramic resonator may be used.
This Crystal Oscillator is a low power oscillator, with reduced voltage swing on the XTAL2 out-
put. It gives the lowest power consumption, but is not capable of driving other clock inputs, and
may be more susceptible to noise in noisy environments. In these cases, refer to the “Full Swing
Crystal Oscillator” on page 32.
Title: Re: How do I connect a oscillator to an AVR
Post by: TrickyNekro on August 30, 2008, 06:23:18 AM
I see...
So I'll stay to crystals... nice, thank you

Best Regards, Lefteris
Title: Re: How do I connect a oscillator to an AVR
Post by: Admin on September 04, 2008, 07:02:21 PM
Look at my Axon schematic, you will see an xtal hooked up with caps.