ATMega8: why do VCC and AVCC have to be connected?

I often read that it is good practice to connect VCC with AVCC. Even in the ATMega8 datasheet it says so:

AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC (7..6). It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that Port C (5..4) use digital supply voltage, VCC.

But nowhere I can find an explanation as to why they have to be connected. A simple circuit for blinking a LED works without connecting VCC and AVCC. Do I just have to accept it, or is there a good reason?

asked Oct 22, 2013 at 18:19 385 2 2 gold badges 4 4 silver badges 5 5 bronze badges

\$\begingroup\$ For what it's worth, I usually connect AVCC and VCC without a low pass filter for small projects and things work just fine. The filter is a good idea when you have situations that require less noise and more accuracy. \$\endgroup\$

Commented Oct 22, 2013 at 18:27

\$\begingroup\$ By not connecting AVCC and VCC, do you mean that you used two independent supplies? \$\endgroup\$

Commented Oct 22, 2013 at 20:06

\$\begingroup\$ Also, for what it's worth, PIC devices (dspic30f2010 specifically) fail to accomplish it's basic features (ICSP programming) if a AVDD pin is left unconnected. Since you don't know what's in the chip, you should always take anything the manufacturer says seriously. \$\endgroup\$

Commented Oct 22, 2013 at 22:57

6 Answers 6

\$\begingroup\$

Mainly, it has to be connected because the manufacturer says it should.

Aside from that, they should for full operation of the chip (all ports/pins), to prevent floating pin issues on the AVCC side, to prevent noise on the digital side. There are issues where leaving the AVCC side unpowered causes parasitic power draw and can destablize the internal clock, or can prevent stable startup.

Atmel designers have decided that having a separate Analog VCC and Ground is the best way of allowing relatively noise free analog section, by allowing users to add filtering and separation of the Digital and Analog Planes, even inside the ATmega. It's not just the ATMega8, afaik all ATMegas and even some ATTinys have this design.

answered Oct 22, 2013 at 20:20 73.3k 7 7 gold badges 95 95 silver badges 212 212 bronze badges

\$\begingroup\$ Yep, the ATtiny261 has VCC and AVCC distinctions, see electronics.stackexchange.com/q/72908/2028 \$\endgroup\$

Commented Oct 22, 2013 at 23:05 \$\begingroup\$

Good on you for asking for the reason!

AVCC is specified as an independent pin because it connects to key analog components internally, and as such should have separate filtering capacitors.

Simple "blinkenlights" projects don't have noise and accuracy requirements.

Now if you mean if they should be connected to the same VOLTAGE, the answer is yes within +/- 0.3V of VCC

"The ADC has a separate analog supply voltage pin, AVCC. AVCC must not differ more than ±0.3V from VCC." and "AVCC is the supply voltage pin for the A/D Converter"

To recap: AVCC and VCC should be at the same voltage (within +/- 0.3 Volts), and it is identified as a separate pin to allow the designer to place extra filters on that input to keep noise out of the sensitive A/D converter portion of the IC.

Hope that helps!

34.7k 34 34 gold badges 146 146 silver badges 269 269 bronze badges answered Oct 22, 2013 at 20:20 608 3 3 silver badges 14 14 bronze badges \$\begingroup\$

Often times, digital supply and ground pins will end up with small amounts of noise on them. It's hard to eliminate all such noise when digital circuitry is switching significant amounts of current, and 150mV or so of power-supply noise is unlikely to affect the circuitry powered by the digital supply pins. Having 150mV of noise on the analog supply pins, however, would make it very difficult or impossible for the analog circuitry to achieve fraction-of-a-percent accuracy. The fact that the analog pins are separated means that one can take accurate readings even if there is 150mV of noise on the digital power supply, provided that the digital supply doesn't swing by more than 300mV and one has an analog supply which is somewhere within 300mV of both extremes of the digital supply's range. Eliminating 99% of the noise from a power source that's only feeding the analog-supply pin, and ensuring that source voltage is close to the digital supply voltage, is often much easier than trying to eliminate all noise from the digital supply.

answered Oct 22, 2013 at 20:55 47.1k 3 3 gold badges 88 88 silver badges 148 148 bronze badges \$\begingroup\$

Just to add another reason why AVCC should be connected even in simple projects.

When you use Brown-out detection circuit, which relies on internal voltage reference, you may get unexpected behavior and unreliable device startup. It can manifest as weird voltage thresholds triggering BOD reset or even device not starting with correct voltage ocassionaly.

I just run into this issue in one of my "quick&dirty" hack projects using ATmega88P.