Pages: [1] 2   Go Down
Author Topic: ATmega328p crystal load cap edit:general atmega standalone ?'s  (Read 2173 times)
0 Members and 1 Guest are viewing this topic.
California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 444
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm looking for a crystal to run my ATmega328p by itself. What load cap should it be? I'm not needing it to be terribly accurate since it will have a RTC attached to it to handle time. But I would still like to know the optimal numbers for doing this.

thanks
« Last Edit: March 05, 2011, 06:36:21 am by stoopkid » Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Capacitors in the range of 12pF to 22pF are recommended by the datasheet (Table 8-3).

--
The Arduino Drum Machine: MIDI development system with 14-track MIDI drum machine sequencer / groove-box software
Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 444
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks. Is the load cap defined by any if the info in this title here, or should i find somewhere else to get this?:
"16.000 MHz 16 MHz Crystal HC-49/S Low Profile"
http://www.taydaelectronics.com/servlet/the-257/16.000-MHz-16-MHz/Detail

its hard to find stuff that actually in stock/doesnt have a two week wait time on mouser. Where else should I be looking for this stuff?
Logged

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

They are not giving you enough information; they should specify the crystal's load capacitance. It could very well be this Citizen part:

http://www.citizencrystal.com/images/pdf/m-hc49us.pdf

Notice in the "Standard Specifications" part of the datasheet it says CL (Load capacitance) is 18pF. The two capacitors you are adding combine in series so should be about twice this number --> 36pF. But, there is also capacitance at each input pin of the ATmega328 microcontroller (Atmel does not say how much) and capacitance in the PCB wiring too.

For an 18pF CL crystal I would err on the high side and start off with 22pF load caps (11pF in series) and count on there being some extra 7pF of capacitance in the AVR pins and PCB traces. As you said, you do not have high accuracy requirements so it's probably not critical...you could just go with 18pF load caps (in the middle of the 12pF-22pF range).

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27434
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can find the 16MHz crystal and 22pF caps at dipmicro.com, very inexpensive, and just $2.50 for shipping. Pick up some other parts to play with at the same time.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 112
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I being using the AtMega328 often with this capacitors

http://www.newark.com/kemet/c315c220j2g5ta/capacitor-ceramic-22pf-200v-c0g/dp/13K6167

Paired with this crystal

http://www.newark.com/citizen-america/hc49us16-000mabj-ub/crystal-16mhz-18pf-through-hole/dp/59K8183

Hope this works for you
Logged

No trees were harmed by the transmission of this message. However a few million electrons were temporarily inconvenienced.

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 444
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Im looking at this tutorial:
http://arduino.cc/en/Main/Standalone

I'm looking for 2 10 uF capacitors, but this thing isnt very descriptive.... What does the voltage rating need to be? I figured just 5v, but is that it, or is it not just as simple as that?
Logged

0
Online Online
Shannon Member
****
Karma: 222
Posts: 12740
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The capacitor's voltage rating is an absolute maximum, and these ratings are only available in standard values - pick the next one greater than 5V for the range (typically 6.3V / 10V / 16V).  It doesn't matter if the voltage rating is a lot higher, but if its too small its bad news.  For these decoupling caps you can pick a higher value too such as 22uF - its not at all crucial.

One thing that is important is the 0.1uF or 0.22uF ceramic decoupling capacitor - this does the high-frequency decoupling and should be close to the chip.

And for the crystal load capacitors - getting the value spot n is only important if you want high accuracy of frequency.  People use 22pF pretty much by default for clock crystals.
Logged

[ I won't respond to messages, use the forum please ]

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 444
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, thanks
Could you explain the decoupling caps a little more? I only ever see that mentioned but never really explained.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17308
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, thanks
Could you explain the decoupling caps a little more? I only ever see that mentioned but never really explained.

Capacitors have the property of being able to pass AC voltages but block DC voltages. So if a so called 'bypass' capacitor is wired from a +5vdc power voltage input point right as it enters a chip like a micro, it will help route any small 'noise' to ground. Noise is in fact is some small amount of AC voltage riding on the +5vdc power trace. This does not effect the The DC voltage in any other way. The caps is in effect 'bypassing' the ac noise voltage to ground rather then letting it continue to ride on the +5vdc line into the chip.

Lefty
Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 444
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay. Is that in addition to the 10uf capacitors in that tutorial?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17308
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay. Is that in addition to the 10uf capacitors in that tutorial?

Yes. There is frequently a larger cap, such as 10uf acting like a bypass cap where the voltage enters a PCB or a breadboard. But it's also a good practice to wire .1ufd caps physically close to any IC device between it's Vcc and ground connection pins as close to the package as possible with the shortest cap leads possible.

A mega 328 can utilize two bypass caps as there are two voltage input pins, Vcc and Avcc pins. Also a .1ufd bypass at the Aref pin to ground can help the A/D converter work a little more noise free, I have seen improvements by doing that on one of my arduino boards, the other didn't seem to help or hurt.

Lefty
Logged

0
Online Online
Shannon Member
****
Karma: 222
Posts: 12740
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The primary function of decoupling capacitors is to prevent the supply voltage fluctuating as the circuit switches current - logic circuits switch very fast, an Arduino output pin can switch at millions of amps per second (even if only briefly as the current changes by 10's of mA).  The power supply can't react this quickly (on timescale of 10ns so the voltage at chip's supply pins will droop sharply unless there are decoupling capacitors to provide this sudden change in current.  At longer timescales the power supply will react and recharge the decoupling capacitors.

So the decoupling capacitors can't prevent voltage fluctuations at the supply but can reduce them substantially (from volts to fractions of a volt).  With logic circuits you only need enough decoupling to prevent false switching - 200mV of noise would be fine but 1.5V would not.

With analog circuits you want much cleaner supply rails (but seldom have to deal with such high speed switching - except where digital and analog meet as here).

Another way of looking at is that the decoupling capacitors store charge for when there is sudden demand for more.  There can be a hierarchy of decoupling capacitors, the small fast capacitors are the first line of defence, then larger slower capacitors to keep them happy, eventually the power supply circuit reacts.  In fact VLSI logic chips have a significant proportion of their silicon area devoted to on-chip decoupling capacitors.
Logged

[ I won't respond to messages, use the forum please ]

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 444
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, so just be be clear... A 10uf cap connecting the power and ground, both before and after the voltage regulator. And a .22uf and .1uf capacitor in series between the power out of the regulator and in the atmega?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17308
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
And a .22uf and .1uf capacitor in series between the power out of the regulator and in the atmega?

No series connection, all bypass/decoupling caps wire from a Vcc voltage to ground.

Logged

Pages: [1] 2   Go Up
Jump to: