Caps on and around ICs

I've been looking at different Arduino boards, specifically the Lilypad, Uno, and Mega, and I noticed there are various sized caps on the boards. I know it's useful (sometimes required) to have caps on the in- and output of a regulator, however the ones that are populated around the Atmel IC is what has me scratching my head. For example, on the Lillypad, there's a 47uF cap on VCC and GND, and on the other side of the IC, is a 0.1uF on AVCC and GND as well. There's also a 1.0uF connecting the oscillator's GND to its GND and common GND.

Question here is, why are all of those needed, and how does one go about figuring out what size caps to use when trying to build a circuit that has an Atmel IC on it, specifically the 328P in TQFP package.

how does one go about figuring out what size caps to use when trying to build a circuit that has an Atmel IC on it

For a standalone arduino? We go to a standalone arduino page and build that circuit! :D

http://arduino.cc/en/Main/Standalone http://arduino.cc/en/Tutorial/ArduinoToBreadboard

Onions.

'328: generally need 6:
100nF on VCC,
100nF on Avcc
100nF on Aref,
100nF on Reset line for DTR to drive for serial downloads.
2 x 22pF on XTAL lines.

Then 1uF on input & output of regulator, or 1uF on pins where power comes in the board.
(or 2.2uF, 3.3uF, 4.7uF, 10uF I generally use what ever I have handy at the time for home projects).

Onions:

how does one go about figuring out what size caps to use when trying to build a circuit that has an Atmel IC on it

For a standalone arduino? We go to a standalone arduino page and build that circuit! :D

http://arduino.cc/en/Main/Standalone http://arduino.cc/en/Tutorial/ArduinoToBreadboard

Onions.

Well, that's the thing. The standalone configuration has 2 caps for the regulator and 2 for the crystal (those 2 plus the crystal can be replaced with an oscillator with proper load caps built-in). The breadboard version also has caps for the regulator, and the bare breadboard setup has zero caps.

The Lilypad does not have an onboard regulator at all. Plain and simple 328P, with the FTDI connector, a reset button and SPI breakout. So DTR needs a cap, already knew that. But why the other three?

Following CrossRoads' list, there's the 0.1uF (100nF) on pin 18, which is AVCC. There's a 1.0uF connecting pin 6 (VCC), and tying the oscillator's GND with common GND. And then there's the 47uF (polarized) also connected to pin 6 (VCC). AREF is tied to AVCC so I guess in a way it also has a 0.1uF on it.

But I still would like to know, or maybe "learn" is a better word, why they're needed, or why so many, or why can't they all be tied together (except DTR) ... or ... or ... or how does one know what size is appropriate.

why can't they all be tied together

They need to be distributed so they sit on each component, please read this:- http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Grumpy_Mike:

why can't they all be tied together

They need to be distributed so they sit on each component, please read this:- http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

AHA! Input! Input! That makes a lot of sense. Thanks for the link, gave me some great insight there. I knew about de-coupling regulators, I just couldn't figure out why one would do the same for the (single) IC as well, but now I see how it can be good practice to do that. Awesome. Back to the drawing board for some additions!