Hallo Vitis,

ich wollte nicht klugscheissen, sondern nur von vorne herein auf diese Fußangel hinweisen. Denn an so einem Fehler kann man sich zu tode suchen .

Zum Brownout ebenfalls ein hilfreicher Auszug aus dem ATMega8 Datasheet:

Keep the AVR RESET active (low) during periods of insufficient power supply voltage. This can be done by enabling the internal Brown-out Detector (BOD). If the detection level of the internal BOD does not match the needed detection level, an external low VCC Reset Protection circuit can be used. If a reset occurs while a write operation is in progress, the write operation will be completed provided that the power supply voltage is sufficient.