Writing Fuse Bits on 861 made it a Brick

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had my ATtiny861 working fine (simple blink program).

Then I programmed the fuses to use a ceramic resonator. This is the same resonator I have used on an ATtiny2313 and had it work fine.

Here's the details:
Resonator is the 10 MHz Murata unit from SparkFun. It needs no external caps (they are built in). Worked fine on the 2313 after setting the fuses to 0x0f.
avrdude command was -U lfuse:w:0x0f:m. I didn't mess with the other fuses.

Reading the 861 documentation implied to me that the same command should work for the 861, so I used that. Now the 861 won't do anything and won't talk to avrdude anymore! Yuch!

My fear is that I should have used 0x4f so that the CLKO bit would have been kept high (disabled). If the 861 is trying to drive clock out on PB5, then that may conflict with the use of PB5 as XTAL2 (along with PB4 as XTAL1, this is the resonator connection).

So here are my questions:
Anyone have any insight here? What's wrong?
How can I unbrick this part?

Thanks for any help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

0x0F in lfuse will have programmed:

CKDIV8 - enabled
CKOUT - enabled (this could prove very useful!)
SUT0/1 - "reserved" (goodness knows what this means)
CKSEL3..0 - 8MHz..20MHz external cyrstal/resonator

On the whole such "clock accidents" don't matter as you can always "over-drive" the chip by pumping a strong square wave into XTAL1 which should be enough for an ISP session whatever else you have on the pin (assuming it's not tied to a rail).

Use a frequency generator or STK500 or NE555 or another AVR clocking a pin (maybe CKOUT?) to generate such a full-swing square wave - maybe around 1MHz and set the ISP to work at below 250kHz

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would try to inject an external clock into
XTAL1 pin. Then use the appropriate low
programming-speed (less than 1/4th of external clock)
and see if it can be programmed again.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the suggestions to drive the XTAL1 pin directly. I used an ATtiny2313 to make a 1MHz clock and now my (incorrectly fuse programmed) ATtiny861 runs (the LED blinks). So I'm part way there.

Remaining problem is that avrdude still won't recognize the device. I have the 2313 connected to provide the clock (works when not connected to avrdude via PC parallel port), I'm supplying 5V independently (not from the parallel port) to power both 2313 and 861. But avrdude still says: "avrdude: AVR device not responding"

Here's the command string: "avrdude -p attiny861 -P lpt1 -c dapa "

Any suggestions?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hopefully, the problem is solved. Using the -i option for avrdude, I increased the delay in steps. At -i 10 (10usec delay), no change in behavior. But the I tried -i 100 (100 usec delay). And things worked! So the fuse bits are now programmed to 0x4f (which should be correct - at least it's what I wanted).

Thanks for the help!