20
\$\begingroup\$

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?

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

| improve this answer | |
\$\endgroup\$
15
\$\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

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!

| improve this answer | |
\$\endgroup\$
4
\$\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.

| improve this answer | |
\$\endgroup\$
2
\$\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.

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

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

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.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

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.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.