Author Topic: avr crystal oscillator  (Read 3065 times)

0 Members and 1 Guest are viewing this topic.

Offline tristantechTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
avr crystal oscillator
« on: July 29, 2009, 10:22:34 AM »
hi, i want to attach an external crystal oscillator (the kind that has 4 pins, is in a metal case, and has all the circuitry built-in, like the kind in the picture below) to my atmega644. how do i do this?

« Last Edit: July 29, 2009, 10:26:21 AM by tristantech »
Hey! Visit my website @ http://www.tristantech.net

Offline wil.hamilton

  • Robot Overlord
  • ****
  • Posts: 207
  • Helpful? 6
  • rtfm
Re: avr crystal oscillator
« Reply #1 on: July 29, 2009, 11:13:06 AM »
more information would be helpful, like, what is your circuit hooked up to?  what else is there?

anyways, here is the datasheet for the atmega644

if you look on page 35, section 7.8 it talks about how to use an external oscillator.
use the google.  it's your friend.

Offline guru

  • Full Member
  • ***
  • Posts: 59
  • Helpful? 1
  • Robotics, CNC, Electronics, Programming
Re: avr crystal oscillator
« Reply #2 on: July 29, 2009, 11:57:50 AM »
There are 4 pins. Two pins are power and ground, connect these accordingly to your voltage regulator. If you want to get picky, place a bypass capacitor of .1uF across the power supply pins. One of the other pins will be OUT. Connect this to the OSC-IN pin of the atmel (Refer to datasheet). The other oscillator pin is not used since you are using this type of external oscillator.

Why would you want to use an expensive crystal oscillator? Usually a resistor/capacitor suffices for most people. A crystal (plus 2 20pf caps) is just as good as the external one when used with the Atmel's built-in crystal oscillator, and cheaper.


Get Your Ad Here