I'm using an Atmega32. I want to use an external 16MHz crystal and I'm using a universal programmer (like http://www.kanda.com/products/wellon/VP-290.html). My question is: once I've programmed the chip and set its fuse bits to use an external oscillator, would I need an external oscillator when I'd want to reprogram its flash?
Electronic – ATmega32 programming without external clock
atmegaavrmicrocontroller
Best Answer
Yes! When you configure the fuses to make the controller run from an external clock, you also need that external clock for reprogramming.
It is important to notice that I tested this with an Arduino configured as ISP (In circuit Serial Programmer), which does not attempt to provide an external clock to the device that is being programmed. Other programmers may do this, but that would depend on the programmer. ISP is most common way of programming these devices, but there are other programmers too. Fact is that the device in itself needs an external clock. Unsure for a parallel programmer. A High Voltage programmer can do without an external clock.
I didn't test this with an ATmega, but rather with an ATtiny45, but both AVR's are very similar in these aspects.
This is what I did:
.low = 0x61
Notice that the fuse settings may be controller specific, so this is the setting for ATtiny45;.low = 0xe0
;So in conclusion:
If you program the fuses for using an external clock, then you also need an external clock to program the device.