If you want to run an AVR on a battery, say a coin cell battery.
Do you still have to use decoupling capacitors?
Can you just connect the battery directly to power pins of AVR?
What part of coin cell (positive, negative) you should treat as VCC and GND? Thanks
If the battery-voltage always is within the specs for the AVR, then yes you can connect it directly. You should still use decoupling caps close to the supply pins. Make sure the brown-out detector is configured correctly as you want the AVR to go into reset when the battery voltage goes below operating voltage. If not, you could get problems with unreliable execution and even flash and eeprom corruption.
Positive voltage terminal on the coin cell is nearly always marked with a “+” and should be connected to the VCC pins.
Of course you need decoupling!
Just connect the cell directly to Vdd and Vss.
It is even more important in this situation to have good decoupling as coin cells have high DC resistance.