Shop OBEX P1 Docs P2 Docs Learn Events
avr crystal choice — Parallax Forums

avr crystal choice

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2012-10-27 08:24 in General Discussion
ok so i have about 4 avr projects i need to upgrade from the internal ocillator and i cant figure out what crystals im supposevto use! i asked on avrfreaks that place **** never got an answer.

i just need to kmow the load capacitence id assume 22pf but digikey only has 20pf 16mhz amd 20mhz xtals.

also i pulled a 16mhz ceramic oscillatoter out of a radar detector using an atmega32. i noticed it had caps under the oscilator although my my arduino uding a 3 pin ceramic has no caps. do i meed 22pf caps on the oscillator or not?

Comments

  • jmgjmg Posts: 15,193
    edited 2012-10-25 22:53
    my arduino uding a 3 pin ceramic has no caps. do i meed 22pf caps on the oscillator or not?

    That 3 pin device has the caps built in. Yes, you will need external caps on a crystal.
    The value is only critical if you are ppm-paranoid, and the general Osc Phase/Gain margin issues, see smaller caps used at higher frequencies.
  • LeonLeon Posts: 7,620
    edited 2012-10-26 03:00
    The crystal oscillator feedback capacitors are effectively in series, so you need something like 2x the crystal load capacitance, ideally, allowing a few pF for stray capacitance.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-10-26 03:19
    Years back, I was trying to figure out how to properly set up crystals and capacitors for DIY boards.

    I learned it is rather difficult to do properly.
    First, you have to have the right information from the crystal vendor about capacitance.
    And even then, the big manufacturers test all the crystals at their factory to verify their quality.

    I figured that I might be able to test myself, so I looked around and found the device that does so is available, but costs thousands of USD.

    The only real option for the little guy is to build and check with an oscilloscope after the fact. You cannot just read off the PDF an appropriate capacitor as they don't know what you have for a crystal.

    But be aware that you can't just hang your oscilloscope probe on a crystal lead. That will throw off everything. But you can have the microcontroller toggle a pin and verify. In the worst case, the crystal just hangs and won't oscillate - change the caps and try again. Or change the drive setting and try again.

    The easiest solution is to use resonators that include capacitance all in one package. (that is why they have that third pin for ground) Resonators have gotten nearly as good as crystals, maybe better in some situations.

    It is so much easier to just buy a BasicStamp or a ProtoBoard and use it.
  • LeonLeon Posts: 7,620
    edited 2012-10-26 03:37
    I've never had any problems with MCU crystal oscillators. I always use the correct capacitors and take care over the PCB layout.

    Radio amateurs have developed low-cost techniques for characterising and matching crystals.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-10-26 03:42
    I can't help with your crystal choice but I would suggest changing the title of this thread. Maybe something like, "AVR crystal choice? Avrfreaks didn't answer" - the title as it is is inflammatory to another forum which isn't really needed.

    Thanks.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-26 05:38
    hmmm ok this is what im trying to say i have a 16mhz resonator i pulled from an atmega32, not a crystal... it only has two pins, like this one

    http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=445-2568-1-ND&site=US&lang=en


    does it require load caps? i noticed two smd caps soldered under it, before i pulled it. I know the three pin redonators dont require caps.

    I was pretty tired last night not sure why i was looking for a 22pf xtal... i need a 12pf, obviously the ideal number would be 11pf but that doesnt take into account pin capacitence. my confusion came from knowing wether to go up or down on the pf to account for pin capacitence. Although this is why we use 20pf caps on a prop when the load capaccitence is 36 based on the data sheet its 18pf plus some :)

    do we really need to be so pc about a forum on the internet... it has no feelings and it is the worst forum ive ever been on.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-10-26 06:14
    Salvage is always a guess, but if it had two SMD caps under it and they are attached with one end to each lead of the resonator and the other lead to ground, I'd measure them and use the same.

    Of course, that requires a capacitance meter. Do you have one? If not, desolder them and use them as well.

    So far I have not had any problems with crystals - but they can either not oscillate or under some circumstances oscillate at the wrong frequency.

    If you look in Digkey or Mouser you will see lots of crystals at any frequency with different capacitor requirements. And some would argue that the capacitors should not be the same value - but the truth is that capacitors are never exactly the same value.

    http://media.digikey.com/pdf/Data Sheets/TDK PDFs/FCR_Rev2011.pdf

    If you are really sure it is an FCR series, the above PDF may help.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2012-10-26 06:16
    do we really need to be so pc about a forum on the internet... it has no feelings and it is the worst forum ive ever been on.

    The suggestion about the title is something I would have suggested as well. There really isn't any reason for it and can reflect poorly on you.

    What value does it add by slamming another site?? That just seems like a distraction. It doesn't have anything directly related to the technical issue you have. You could just ask your question and state that you haven't been able to find an answer on any other forum. No need to mention any more.
  • LeonLeon Posts: 7,620
    edited 2012-10-26 06:33
    hmmm ok this is what im trying to say i have a 16mhz resonator i pulled from an atmega32, not a crystal... it only has two pins, like this one

    http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=445-2568-1-ND&site=US&lang=en


    does it require load caps? i noticed two smd caps soldered under it, before i pulled it. I know the three pin redonators dont require caps.
    .

    They are actually feedback capacitors, not load capacitors, although their value depends on the crystal load capacitance as I mentioned.

    Two pin resonators do require capacitors.
  • PropabilityPropability Posts: 142
    edited 2012-10-26 09:13
    The Freaks site has been trying very hard to get a better attitude towards OP's that might not have come across in the right way in their postings.

    If you don't want to it's up to you but a link to your post might shed some insight.
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-10-26 09:22
    ok ill change the title when i get home, all im saying is that when people praise the parallax forums they tend to point how bad other forums are... also if we were talkimg face to face to face ans i said some web site "sucked" im sure u wouldnt bat an eye. I only posted that becuase im asking about avr information in parallax becuase i cant find pF ratings on any kits or in AVR forums.

    @leon ok so if a schematic calls for 24pF caps a crystal with a 12pF load capacitence should be chosen correct? As i understand it a 3pin resonator has a normal accuracy of about 99% while a 30ppm crystal is about 99.7% accurat. So im gonna take a guess and assume a 2 and 3 pin are the same accuracy the only difference is a 3 pin has feedback caps built in. So when would 2 pim be a better choice, when your producing hi volume and wanna save every penny? is price the only reason to go with a 2pin?
  • LeonLeon Posts: 7,620
    edited 2012-10-26 09:58
    Yes, although one usually selects the crystal first and then chooses the capacitors. You need to allow for stray capacitance and input capacitance, so 20 pF capacitors might be more suitable. In fact, 22 pF is the nearest preferred value, IIRC.

    You also need to take manufacturing cost and board area into account. A 3 pin device might work out cheaper and save on board size.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-10-26 10:12
    Resonators are certainly NOT all 99% accuracy - they evolved and you can find a wide selection of accuracy levels on the Digikey or Mouser listings. Some are so poor that you cannot use RS232 serial. If you buy from EBay, this might become an issue.
  • jmgjmg Posts: 15,193
    edited 2012-10-26 12:54
    So im gonna take a guess and assume a 2 and 3 pin are the same accuracy the only difference is a 3 pin has feedback caps built in. So when would 2 pim be a better choice, when your producing hi volume and wanna save every penny? is price the only reason to go with a 2pin?

    Not quite.

    Yes, 3 pins have the Caps inbuilt, but now they are supplied and measured by the vendor, so the combination can be more precise.
    (Murata spec 0.2% for their 3 pin 5MHz model) - 3 pins also has less PCB area, and less EMI and less BOM...

    A quick search at Digikey for 5MHz, shows 3 pin are cheaper and 2 pins are NRND, so that shows the volume users are now all using 3 pin, and the 2 pin are in low-volume-runout
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-10-27 08:24
    As I recall, anything 3% or less will likely allow RS232 communications to work.

    0.2% is just really nice if you are going to try to internally run a real time clock function.
Sign In or Register to comment.