I've got a few questions about decoupling capacitors:
I know I'm supposed to place .1uf decoupling capacitors on my ICs as close to the pins as possible.
But what if my Vcc and Gnd pins aren't near eachother or are on opposite sides of the IC? Which pin should I place the decoupling capacitor closer to?
Also, what do I do if I have one IC which has multiple Vccs or Gnds?
The AtMega328 has one Vcc, one AVcc, and two grounds. So what do I do there? Use one cap from Vcc to one ground, and one from AVcc to the other ground, or two caps from Vcc, one to each ground, and two from AVcc one to each ground? Do I even need all those caps for the AtMega? I don't recall seeing them on any Arduino boards. But perhaps they just assume you'll add them yourself?
And the TPIC6B595 shift register has three Gnds and one Vcc. So would I put three caps on that one Vcc pin to each Gnd? Or tie the Gnds together and put one Cap from Vcc to that maybe?
And the 4051 mutiplexer has Vcc, Vee, and Gnd. Do I treat Vee as another Gnd for the purpouses of decoupling? So two caps off Vcc again? Or tie Vee and Gnd together and use one?
If I had to guess, I'd say tying the Vccs and Gnds together first, and then sticking a capacitor between them is the correct solution, but I do recall someone saying "one decoupling cap per vcc gnd pair."
However I don't know if they were talking about pairs per chip, or if he meant pairs on seperate chips.
I know I'm supposed to place .1uf decoupling capacitors on my ICs as close to the pins as possible.
But what if my Vcc and Gnd pins aren't near eachother or are on opposite sides of the IC? Which pin should I place the decoupling capacitor closer to?
Doesn't matter, just mount it such that cap leads are as short as you can make them, but not critical.
Also, what do I do if I have one IC which has multiple Vccs or Gnds? One decoupling capacitor per pair?
Yes, that would work fine
So if I have two grounds and one Vcc, should I have two capacitors hanging off the Vcc pin?
No, one would be fine
The AtMega328 has one Vcc, one AVcc, and two grounds. So what do I do there? Use one cap from Vcc to one ground, and one from AVcc to the other ground, Yes. or two caps from Vcc, one to each ground, and two from AVcc one to each ground? Do I even need all those caps for the AtMega? I don't recall seeing them on any Arduino boards. Some boards only have one power bypass caps, some two, it's not all that critical, however having none can caurse problems. A lot depends on how well filtered your power source and voltage regulators are. But perhaps they just assume you'll add them yourself?
My TPIC6B595 shift register has three Gnds and one Vcc. So would I put three caps on that one Vcc pin to each Gnd? Or tie the Gnds together and put one Cap from Vcc to that maybe? Yes one cap should be fine from Vcc to any of the grounded pins.
And my 4051 mutiplexer has Vcc, Vee, and Gnd. Do I treat Vee as another Gnd for the purpouses of decoupling? So two caps off Vcc again? Or tie Vee and Gnd together and use one? Check the datasheet for a typical wiring installation that matches your design, 4051 can be used in several different arragnement so not sure one size fits all for bypass caps, however cap Vcc to whatever line your power ground is wired to should be enough in most cases.
If you are hand wiring it can be convenient to place the caps on the bottom
side between the rows of pins or on the top side under the socket. You
can get very short leads.
If you are doing a PCB layout you should have ground and power planes.
For a PCB I place the caps near the power pin, The opposite end goes to
the ground plane.
If you look in the datasheet for my PICO1TR you will see a schematic and
board layout (See Loading...)
Also, what do I do if I have one IC which has multiple Vccs or Gnds?
It depends very much on the IC and what it is doing. I am looking at a schematic for one chip that has 68 decoupling capacitors on it. Mind you it's a big chip it is an FPGA with just under 2000 connections to it. There are a lot of power and grounds. For the sort of DIL chips you will be dealing with however one would be sufficient.
If a chip has multiple grounds then they must all be tied to the same potential and for lower noise at the same point. That point is a good point to put the decoupling capacitor. If you have the choice try and put the cap just in front of the IC rather than just behind it. That is make the current go past the capacitor before going on to the chip.