26

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?

Peter
  • 385
  • 1
  • 4
  • 5
  • 1
    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. – JYelton Oct 22 '13 at 18:27
  • By not connecting AVCC and VCC, do you mean that you used two independent supplies? – Ignacio Vazquez-Abrams Oct 22 '13 at 20:06
  • 2
    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. – deadude Oct 22 '13 at 22:57

6 Answers6

21

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.

Passerby
  • 72,580
  • 7
  • 90
  • 202
  • Yep, the ATtiny261 has VCC and AVCC distinctions, see http://electronics.stackexchange.com/q/72908/2028 – JYelton Oct 22 '13 at 23:05
15

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!

JYelton
  • 32,302
  • 33
  • 134
  • 249
trayres
  • 598
  • 2
  • 12
4

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.

supercat
  • 45,939
  • 2
  • 84
  • 143
2

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.

After connecting AVCC directly to VCC the problem with BOD not releasing reset was solved. Since I do not use any other analog peripherals in my project I did not bother with proper decoupling. This solution found in one of avrfreaks forum threads after much googling. See: http://www.avrfreaks.net/comment/349747#comment-349747

darBis
  • 21
  • 1
1

The reason has to do with the internal process of the device and how it is built. Because they specify that AVCC and VCC should be within 0.3V, this is similar to the protection voltage of internal diodes used in Chips. If the diodes are biased above 0.3V (for example if AVCC is not connected) those diodes might conduct, causing problems and perhaps damaging the device.

Gustavo Litovsky
  • 7,619
  • 3
  • 25
  • 44
0

I believe certain pins, including PORTC:0-3, are actually powered from Avcc and if you do not connect Avcc these pins will not function.