AVR

My current project (not described here) requires adjusting the clock system fuse settings in some arduino '168 and '328 chips. It turns out that there are a couple of things that can go wrong if you burn the wrong clock or SPI (serial) fuses. My pile of "bricked" MCU's was begining to look silly, so I did two things. First I figured out how to un-brick most of the bad ones. Second, I made a thorough study of the fuse settings in the ATmega48/88/168/328 datasheets and the Arduino documentation, particularly the boards.txt file. This text is pasted in from my project's working notes.

------------------------

Erase bricked chip and reprogram.

Use an Evil board with no xtal or caps, 10K pullup on RST, and a
1MHz external clock oscillator module connected to pin 9.

I'd been trying lots of potential fixes that looked something like this, but
this is the one that finally worked. The differences are the "B"  [bitrate?]
switch set to 3 for a high speed spi clock, and no "-v" switches on the command
line. Avrdude may have  a bug relating to the -v switch.

commandline fu from http://forum.pololu.com/viewtopic.php?t=2122

<burn>
varmint@Ktootoo:~$ avrdude -B 3 -c avrispmkii -p m168 -P usb -e

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9406

avrdude: erasing chip

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

varmint@Ktootoo:~$
</burn>

CLICK READ MORE TO SEE THE REST OF THE POST

Syndicate content