Electrical – How to wire the two AVcc pins on ATmega32u4 when only using some ADC pins

adcanalogavr

I am laying out a pcb with an ATmega32U4, where I am using pins 26-30 as analog inputs. Pins 36-44 can also be used as analog inputs, but I'm using them for digital IO and JTAG. Both of these groups of pins have a nearby AVcc pin, which is used to power the analog part of the micro, and as a voltage reference for the ADC. The datasheet says that this pin should be separated from Vcc by a low pass filter, which makes sense, as that will reduce the ADC noise. But there are two pins, so should I:

  1. Use a low pass filter on each pin (adds parts where space is at a premium)
  2. Use a single low pass filter and connect the two pins together (awkward, as they are on opposite corners).
  3. Filter the one near the inputs I'm using and leave the other not connected.
  4. Filter the one near the inputs I'm using and connect the other to something else.
  5. Filter the one I'm using with a LC filter, and the one I'm not using with an L only. I've seen this on someone else's design, but I don't understand the logic behind it.

Now, it seems to me that if the two pins are connected internally, I would get good results from option 3. But although most of the datasheet refers to AVcc in the singular, there is a caption on figure 24-10 which suggests I need to filter both pins. Though maybe only if both sets are in use?

Any suggestions?

Best Answer

You definitely want to connect both pins to a power supply: an internal connection should never be relied upon unless the datasheet specifically permits it.

Another good rule is to always put a bypass capacitor right next to each power supply pin: do not go with option 5, or you will get large voltage fluctuations with any change in current drawn from that pin.

I assume that you're using USB in this design, in which case it's worth noting that page 256 of the datasheet shows AVCC used for supplying the USB PLL, and it doesn't specify which pin.

Unless you have a very noisy power rail, my preference would be to skip the inductors and just connect everything (suitably bypassed) to the same VCC. You're not going to be getting very good accuracy with a cheap 10-bit ADC anyway.