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

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.


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

From the ATMega8 complete datasheet:

"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!


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.

Tags:

Avr

Basic

Atmega