I have a program that requires almost all the 8K that an ATMega8 has. In order to do this, I program it with a USBasp programmer, not with a bootloader.
If I program it with a long (almost 8K) program it works at first, then after a couple of power cycles it doesn't.
If I program it with a shorter program it works without fail.
If I upgrade to an ATMega328 it also works without problems.
I suspect it may have something to do with the configuration of the chip and some sort of weirdness when the bootloader region is overwritten.
Any ideas?
If I program it with a long (almost 8K) program it works at first, then after a couple of power cycles it doesn't.
If I program it with a shorter program it works without fail.
If I upgrade to an ATMega328 it also works without problems.
I suspect it may have something to do with the configuration of the chip and some sort of weirdness when the bootloader region is overwritten.
Any ideas?