recover incorrect fuses

see Howto recover wrong fuses settings on a AVR | Jkx@home

my case: ATmega 8L with a 8MHz crystal, fused for “3 to 8Mhz external rc oscillator” instead of “high frequency resonator”. I also read somewhere else that the clock signal should be square.

The clock generator board is a 16MHz ATMega168 Arduino clone from Modern Device.

First I wrote a program in Arduino’s IDE but the maximum frequency I could get was 133kHz (7.5us). Didn’t work.
Next I wrote a program like the one in the above article in AVR Studio. Instead of the nop() I used _delay_us(micro_seconds).
With a 2us delay it yielded a 4.6us (217kHz) square signal. Not enough.
A 1us delay pushed it to 2.6us square signal (384kHz). Still not enough.
No delays at all yielded a 0.6us (1.6MHz) but the signal was more like a sine than square. Yet this worked really nice.

So, if you have sine wave a signal generator, you may not even need a second board.