Electronic – How to connect decoupling capacitor when VCC/GND pins aren’t close

decoupling-capacitorlayout

I'm making a board which will host an ATmega 162 microcontroller in PDIP package. Unfortunately, VCC and GND pins are diagonally arranged. From what I've read, the capacitors should be as close to the pins as possible for maximum effect.

enter image description here

Right now, I can see 3 ways to connect the capacitors. Run wires to the capacitors so that they are at equal distance from both pins, place capacitors near ground and run wire to VCC or place capacitors near VCC and run wire to ground. There's always the "none of the above" option too.

How do I make right decision in this case? Or is is irrelevant?

Best Answer

For these types of packages you should use at least two equal bypass capacitors, one at each side of the IC (one near ground and one near VCC). The parallel inductance of two traces to two different caps lowers the total trace inductance and the current flowing from each bypass cap in opposite directions helps cancel out EMI. See Henry Ott's book "Electromagnetic Compatibility Engineering" for more details here. Apparently this technique reduces noise by a significant amount and will also help functionally. This technique taken to the extreme would involve using a power and ground plane and surrounding the entire chip with bypass capacitors, or if you have the money to spare, using buried capacitance planes, but simply using two caps at either side of the package makes a large and measurable difference (as opposed to just at the VCC side) (I'm too lazy to look it up but I think we're talking 10dB+ improvement).

enter image description here

EDIT: Added my cheesy drawing. The arrows are supposed to show the canceling current loops (one clockwise the other counterclockwise), but note the capacitors should be placed closer to the chip then I drew.