Programming Fuse Bits in ATmega8

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

Hi
I have a broblem with programming fusebits... when I program fusebits on chip I cant't anymore re-program chip.

command line is;
avrdude -pm8 -Plpt2 -cstk200 -u -U lfuse:w:0xEF:m

only low fuse byte chanced (0xEF)
so there is no chance to program SPIEN (Enable Serial Program and Data Downloading), because it is in high fuse byte bit, 5.

Everything works fine, but re-programming flash is not possible.

msg is:

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

How I can re-program flash??

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

You could not change the SPIEN bit from within ISP anyway.

You're running on an external crystal. What's the frequency? Did
you measure it really runs at the designed frequency?

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

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

Crystal is 2.457600Mhz, but it works much slower!

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

That's what I was afraid of.

If your clock is too slow, the rather fast SPI clock from
avrdude doesn't work anymore. Try feeding an external
clock into the ATmega.

Of course, you have to analyze why the crystal doesn't
work as expected.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

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

Thanks Jörg problem solved !