power the the processor with 12V DC.
+12 anode of 1N4007 cathode to 7805 regulator input, 7805 regulator output is +5V.
Of course you will power the 7805 with 12V and feed the o/p of the 7805 to the processor VCC(7) and AVcc(20) .
Aref(21) to 100nf to ground.
VCC(7) to 100nF to ground.
AVcc(20) to 100nF to ground.