I didn’t realize the fuse bit settings in PonyProg were inverted, so I accidently set my Atmega8515L to “1001”, which is an external low frequency watch crystal. Luckily, I had one lying around and I hooked it up. The AVR still runs, but obviously very slowly. I can tell my code is running, because it has a status LED that is blinking.
I can’t use my serial programmer to read or write the AVR anymore. I’ve read a high voltage parallel programmer would let me access the fuse bits, but is there anything else I can try? Is PonyProg just not waiting long enough for a response back from the AVR since it’s running so slowly?
I know ordering another one for $5 would be easier, but I’d like to figure this out.
In case anyone does the same, I fixed it very easily.
I programed an Atmega8 to output a 1 MHz signal on an I/O pin, and hooked that up to XTAL1 on the Atmega8515. It seems that a logic-level external oscillator will always be used if it’s present. I then fixed the fuse bits with PonyProg.
To make the serial programmer reprogram it when it was broken, all you need to do is really slow down the ISP speed. There is a certain minimum ratio between clk + ISP speed that needs to be used for ISP to work.
I see you fixed the problem. Usually to fix the problem you will have to use an external oscillator (not a crystal) for the clock while trying to erase the device in your ISP programmer, then reprogram the fuses properly. Most any frequency will work. (I used 3.6864 - 4 MHz)
This will restore incorrect fuse settings for the clock 99% of the time.
If you are unsuccessful, you can do it in a parallel programmer like a Labtool or something similar. A STK500 can also change the fuse settings.