Whats the difference between pins 7 and 20 on the atmega 168/328

The pin map ( http://arduino.cc/en/uploads/Hacking/Atmega168PinMap2.png ) calls these pins VCC and AVCC ? what is the difference? i have always just connected both to +5V.

They both route power voltage to the chip, just to different sections. Both are required to be wired to whatever voltage source you are powering the chip with.

Lefty

Ah, ok. But what are the applications? why are they there?

i am mucking about with designing midi controllers and using a large number of various sensors. Some sensors (like the sharpe distance sensors) seem to make a lot of noise on the power bus, so i am trying to understand more on this subject. I read about the AREF and wonder if connecting this to the same noisy 5V (and activating it in software) could help rule out noise. i also wonder it i can somehow isolate the +5V for the analog reads from the +5V of the rest of the chip, if that would achieve anything, and if thats what the 2 sepearate VCC pins are for?

This is what the data sheet tells about it

AVCC is the supply voltage pin for the A/D Converter, PC3:0, and ADC7: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 PC6…4 use digital supply voltage, VCC.

Still a relative newbie, but I guess you could indeed filter some noise using a low-pass filter.

Ah, Thanks! Do you think a simple RC filter would do the trick? and is this pin "connected to VCC through a low-pass filter" on the arduino board?

CptCredible: Ah, Thanks! Do you think a simple RC filter would do the trick? and is this pin "connected to VCC through a low-pass filter" on the arduino board?

The 328 datasheet suggest using a LC filter of 10 uH and 10 nf (see figure 21-9 of the datasheet), however the vast majority of boards both original and clones usually use nothing but a .1 uF bypass cap to ground.

Lefty

retrolefty: The 328 datasheet suggest using a LC filter of 10 uH and 10 nf (see figure 21-9 of the datasheet), however the vast majority of boards both original and clones usually use nothing but a .1 uF bypass cap to ground.

Lefty

That's all I have ever used. What will the low pass get me that a regular 0.1uF decoupler doesn't?

Apparently better filtering.

Cintax:

retrolefty: The 328 datasheet suggest using a LC filter of 10 uH and 10 nf (see figure 21-9 of the datasheet), however the vast majority of boards both original and clones usually use nothing but a .1 uF bypass cap to ground.

Lefty

That's all I have ever used. What will the low pass get me that a regular 0.1uF decoupler doesn't?

As the Avcc voltage is the default reference value used by the A/D circuitry when doing analogRead() statements, any voltage variation (which is what noise is) on the Avcc pin can effect the accuracy of the 10 bit A/D conversion with it's approx 5 mv voltage steps between count values.

Lefty