ATmega48PA power consumption during EEPROM write

avreepromlow-power

PLEASE, PLEASE! My question is about power consumption of the CPU during EEPROM write NOT about the power supply! PLEASE! Thank you!

I have a device (ATmega48PA) powered through a 150k resistor directly from the line (with regulation of course!):

enter image description here

In more details (however this is FAR from the question and I don't know why so many people discussing the power supply schematic and NOT the question I asked):

enter image description here

I've estimated the consumption of the CPU itself about 300-400 uA which looked realistic with 2.5V VCC and 1M frequency.

However after I tried to write some data to CPU's EEPROM VCC goes dramatically down (generating BOD reset).
After some investigation I realized that the current goes to 7 mA (and the current growing dramatically further if VCC higher).

I tried to find any information in the datasheet, but the only thing I found was this chart (on page 538):

enter image description here

Which is not really comply with my experience (and it looks like FLASH programming, not EEPROM).

So what is the reality of the current consumption of CPU during EEPROM write? And is it possible to reduce it?

Best Answer

The complete datasheet for the ATMega48 has more details on power consumption, but nothing specific to EEPROM write. It's not unusual that writing to EEPROM would take a lot more current than regular operation, however.

Instead of powering your AVR via a large resistor, you should use a linear regulator so its input voltage doesn't depend directly on the current it consumes.