capicoso:
Yes! Avcc must be connected to Vcc. Add a 0.1uF cap to Gnd also.
Add a 0.1uF cap from Aref to Gnd as well.Will try it now. Do I need to put a cap between Avcc and Vcc too?
thanks
No, capacitors aren't magic dust to sprinkle liberally on the problem(!), they serve a very specific purpose to
decouple the supply rails.