Okay, here is whats happening.
We need to set the ATMEGA8 to 8MHz either using the internal RC oscillator or external oscillator.
To set the ATMEGA8 we have been setting the lfuse byte to 0xe4. This seems to work fine - and this can be confirmed by reading back the lfuse from the controller.
Thing is once we do this, the chip will want to work for a few flashes then it dies and we can no longer connect to the ATMEGA8 using the programming dongle.
The same problem occurs using both an unbuffered DT006 style dongle and a buffered stk200 dongle (as seen on the ponyprog website).
The same problem seems to be occuring using both Ponyprog and avrdude.
The project we are working on requires at least a 8MHz oscillator nso sticking to the 1MHz internal oscillator isn't an option.
Can anyone shed any light on what is going on?
Can anyone suggest a possible way to resurect the no longer working microcontrollers?
The problem only seems to happen after the fuse bits have been programmed and programming stability is fine when the microcontroller is operating at its stock 1MHz internal oscillator.
I look foward to some feedback.