Staticfree Blog

I have been out to get a massage for 8 hours, 20 minutes, and 29 seconds. Before that, I was at home.

Tue, 07 Apr 2009

This note is intended for anyone who may have accidentally programmed their fuses incorrectly on an AVR microcontroller.

While tinkering with clocks, I mistakenly set the lfuse of my attiny45 to decimal 22 instead of 0x22. This turns out to enable a mode expecting an external watch quartz crystal running at 32.768kHz instead of the on-board clock. As soon as I set it and exited the programmer, the micro did nothing and wouldn't respond to the programmer (in this case, an Olimex AVR-ISP500).

To recover the chip, you need to drive it with an external clock on the xtal1 pin and lower the ISP programming rate. Conveniently, my programmer happens to have such an output on one of its spare pins, which runs at 62.5kHz. Just driving it with an external clock wasn't enough. The key for me was to additionally lower the programming speed using avrdude -B 200 (measured in µs). The suggested rate is 1/4 the target MCU clock, so in my case it needs to be slower than 122µs (= 1/(32.768kHz * 0.25)) and 200µs seemed to work just fine.

trackback enabled :: leave a comment

Recent Comments

Categories

B6 d+ t++ k+ s u- f- i+ o++ x++ e++ l c-- (decode)

Archive by date

April
Sun Mon Tue Wed Thu Fri Sat
     
7
   
2009
Months
Apr
If you can read this text, you're either on a browser that doesn't support CSS or one that supports it badly. You've probably noticed that my layout is a bit choppy and perhaps even ugly. My layout here is designed to work in all browsers that support CSS 1 and 2 and was designed by reading the W3C CSS recommendations. It was tested in the most CSS-compliant browser I know of, Firefox. If you want this page (and others too!) to look nice, I reccomend trying Firefox - it's completely free and can also block those annoying popup ads out-of-the-box.

Powered by Blosxom Atom RSS 1.0 RSS 1.1 RSS 1.0 no comments Technorati Profile GeoURL Valid XHTML 1.0! Valid CSS!

Creative Commons License
All original sound, text and graphics on this site (staticfree.info) are licensed under a Creative Commons License.