ATMega8 Fuse settings?

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

Hi,

Please tell me what are the necessory fuse settings (that the avr not get blown) for SPI programming,

1. When operating on 12 Mhz external crystal.
2. When operating on 8 Mhz external crystal.

I was using M. Asim Khan's SPI Programmer,
http://www.kmitl.ac.th/~kswichit%20/IspPgm30a/ISP-Pgm30a.html

I was very happy with that (actually i programmed none of the fuses). I was able to program/reprogram an avr again and again.

BUT SOME THING STRANGE HAPPENED :(

Now, the fresh avr is given correct signatures but when i program it once then it says "no uC detected." :'(

EDIT/
While the programmer says "no uC detected" but the avr functions (runs) exactly as what i had coded.
/EDIT

Please help.

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

Try pumping a squarewave into XTAL1 if you think you have inadvertently set the fuses to use a non-existent external clock source. (and make sure the ISP is set to operate at 1/4 or less of the square wave frequency)

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

Well it can't be a non-existant clock source, since the program is actually running (according to the OP). Instead I'm guessing that the selected clock source is running at less than 4x the ISP speed, thus communications for programming no longer work.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

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

any solutions? i have 4 ATMEGA8s now with same state. i.e. last burnt code is running but no further burning is not possible.

I am setting (programming) none of the fuses. and using ISP Programming as stated above.

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

does no body have a solution to save me from burning all avrs :(

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

I'm not sure, but check the "reset"-wire of your programming cable.
Your code have to stop running when you connect your programmer.

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

Quote:
does no body have a solution to save me from burning all avrs :(
If you can tell a bit more what you *did*, in other words what setting you used to program, we may find out what went wrong. So give more details. And in 99% of the cases, the AVR's are "just" in a coma. And can be brought back to life.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

Here are the full details, i hope i am not missing any thing important.

1. I grabbed a fresh atmega8
2. Put it in the provided zif socket of my programmer
3. Check signature, its ok
4. I selected NONE of the fuses (means all remains unprogrammed)
5. I burnt a code and it ran fine (on 8Mhz crystal).
6. Made a change of code and steps 3 to 5 were ok (means code was programmed each time)

My programmer rested about 1 week.
Then,
(Below stated thing happens to 3 fresh avrs and 1 avr stated above)
1. I put avr in zif socket.
2. Check the signature.
3a. For the used one it says "no uC detected"
3b. For the fresh one, it was ok.
4. Burnt a program. (again, no fuses programmed)
5. It ran well (8 Mhz crystal).
6. Tried to reprogram.
7. Now it says "no uC detected".

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

Quote:
4. I selected NONE of the fuses (means all remains unprogrammed)

The AVR Fuse Calculator claims that you have disabled SPI programming. So unfortunately your only chance to bring your AVRs back to life is to use a programmer which supports high voltage programming. Conclusion: unprogramming all fuses isn't the safe solution. You have to read the datasheet or at least take a look at the AVR Fuse Calculator.

Regards
Sebastian

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

C'mon, Sebastian, you can only blast the SPIEN fuse with debugWire (not on Mega8) or JTAG (not on Mega8) or HV parallel (which is not being done).

Now, my guess is RSTDISBL which would contradict #4. Easily tested by pulling /RESET low on the running application and see if it stops.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Lee you're right with the SPI fuse but luckily wrong with the RSTDISBL. This fuse must be programmed (0) to disable the external reset. So the devices could be recovered by simply connecting an external clock to the XTAL1 pin.
initialx, use a crystal oscillator or a 555 timer IC for this purpose. Everything in the range of 500kHz to 16MHz should do the job.

Regards
Sebastian

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

S-Sohn wrote:
Lee you're right with the SPI fuse but luckily wrong with the RSTDISBL. This fuse must be programmed (0) to disable the external reset. So the devices could be recovered by simply connecting an external clock to the XTAL1 pin.
initialx, use a crystal oscillator or a 555 timer IC for this purpose. Everything in the range of 500kHz to 16MHz should do the job.

Regards
Sebastian

And if it does then it ,means that i need a parallel programmer?

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

No, only your ISP programmer. Connect an external clock to the XTAL1 pin and you should be able to correct the fuse settings. The AVR Fuse Calculator might help you to choose the correct fuse settings.

Regards
Sebastian

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

I've faced this kind of mess using Asim Khan's programmer (and so with other kind of ISP programmers). Before programming my AVR using Asim Khan's ISP programmer, I always taking precautions such as:
1. Always hit "Signature" button first, since it's also used to read target AVR's fuse setting instead recognizing which AVR do you connect.
2. Double check and ensure that i didn't mistakenly check RSTDISBL fuse.
3. Work in a good manner, don't rush even you're in a tight deadline :)

ps: it's better to use version 3.7 instead 3.0. both hardware and software were updated.
http://www.kmitl.ac.th/~kswichit%20/SPI_Pgm/SPI-Pgm37.html

KISS - Keep It Simple Stupid!

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

Thanks m23402027, S-Sohn and theusch.

Now, when doing what s-john said, i found an interesting stuff.

I gave power to atmega8 (i have not provided clock yet) and it ran the code. While i remember that i selected none of the fuses which should imply that an external crystal is required.

I given pulses, derived from at89s51. Nothing good happens :( Just code is running but the ISP programmer still says "no uC detected"

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

Lower your ISP-frequency to less than the frequency, generated with the 89s51, divided by 4.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

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

I cant change any parameter of ISP, its on pcb.

I made a clone of the resetting circuit, given here

https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=19386&highlight=ive+set+fusebits+wrong+isp+anymore+since+change

My one avr goes BSY pin blinking when i connect PC GND. (Already connected PC 5, 12 V)
my one avr BSY was off but it glown permanently while i am writing this.

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

If you sum the hours you spend on trying to recover your chips, do you think it could be worth to invest some money into an AVR Dragon or an AVRISP MKII?

Regards
Sebastian

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

You probably accidentally set the RSTDISBL fuse.

I built this yesterday, and saved one of my "broken" chips. Yeah.

http://mightyohm.com/blog/2008/0...

If you want a eagle cad .brd file and .sch file just email me.