пятница 22 февраля
      92
Atmega8 Datasheet Na Russkom 4,9/5 3804 reviews

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. Spravka ob epidokruzhenii blank.

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?

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.

Atmega8 Datasheet Na Russkom

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: '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. 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.