(This is mostly a heads-up. I did post design change inspection on a high volume product and found something that made me uneasy)
I had to decide on a decoupling capacitor on AREF, and 1.5uF seemed to be a reasonable initial choice; Then I put a scope on it. When the ATMega16 turns on the internal 2.5V reference it looks like this (I'm using 10x probes the scope doesn't recognize):
Now some basic math: 2V/50us * 1.5uF = 60mA.
Thus, M16 actually exceeds the absolute maximum ratings for the AREF pin when the code turns on internal reference.
When I reduce the capacitor to 220nF the current remains in excess of absolute maximum ratings, only the exposure time drops to 9us.
If one is silly enough to have 100 ohm in series with AVCC for filtering it looks like this instead:
Here AVCC hangs in the internal protection diodes between AVCC and VCC, drawing ~40mA. Not pretty.
Beware of decoupling AREF, and if your power supply can't provide 100mA extra, provide 20x more VCC decoupling than AREF decoupling.
I wonder if the newer devices are even worse? And has anyone else observed this?