Show Posts
Pages: [1]
1  Using Arduino / Microcontrollers / Re: SPI clock frequency disaster on: December 27, 2011, 08:36:05 am
I have been unwise to put this

Code:
CLKPR = (1<<CLKPCE);
 CLKPR = B00001000

first in the setup part of code to see how it affects power consumption. The effect is the microcontroller becomes 256 times slower and could not be programmed anymore. The solution is to use the -i switch on Avrdude. This slows down the programmer and programming is now possible

This did the trick for me using a parallel programmer:

avrdude -c dapa -p m328p -i 40 -e
avrdude -c dapa -p m328p -i 40  -U flash:w:blink.hex
Pages: [1]