USBASP FUSE-BITS SETTING PROBLEM

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

I am using AVR Burn-O-Mat to program Atmega8 via USBasp. I just changed my fuse-bits to attach external oscillator but I think that bits where wrong and now usbasp is unable to program it. I was using Atmega 328 data-sheet to set fuse bits. Is fuse bits setting of both controller are same? I just found that it is not. and now i am in a big trouble can someone tell how to change my bits again ? or any solution to restore it here is pic of fuse bits I set.

This topic has a solution.
Last Edited: Tue. Jul 3, 2018 - 06:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Look in the tutorial section of this web site for instructions on how to unbrick your AVR!

 

Basically you need to inject a clock signal from an external source, an Arduino works well for this, into the xtal1 pin, then reset the fuses to default values.

Many freaks use this site to determine fuse settings BEFORE programming fuses: http://www.engbedded.com/fusecalc/

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

i just accidentally set my fuse bits and i think it is for external RC oscillator and my settings are this so should i use external clock?? or make a RC oscillator and there is another problem i have set SUT1 and SUT0 "00" which means bod set so what should i do to reset my fusebits? i donot know much about BOD.

Thanks in advance.

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

External RC osc???   You must choose the correct AVR at the top of the page in order for it to show the correct fuse settings.

I don't see external RC as a choice for an M328p, note: the numbers can be confusing, there are so many to choose from, so verify you have the correct model choosen....

 

Any way, just inject a clock from any source into the xtal1 pin, 125kHz or higher (higher is better) then set fuses back to factory settings, the web site will show you the factory values.

As for BOD, it will hold the chip in reset until the VCC and AVCC (if it has one, yes the M328 has one) is above the BOD level, once the voltage is above this level it will run normally.

 

Once you have restored the default fuses, please post another question here asking for help with setting the fuses the way you want them so others may review the settings before you attempt to  set them.

 

Good luck

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

Ok, I see your using a Mega8 but using a data sheet for the Mega328p!!!   

Don't do that, fuse settings are specific to the model you have!  So use only the data sheet for the M8 with a M8!

 

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

so I used another atmega8 as an external clock source. I connected pin D5 (atmega8 external CLK) to XTAL1 (bricked Atmega8)  and try to default the fuse bits using AVR Burn-O-Mat and USBasp. I got the same error

avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: error: programm enable: target doesn't answer. 1
avrdude.exe: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.

I used this code to create an External clock

#include <avr/io.h>

int main(void)
{
    DDRD = 0xFF;
    while (1)
    {
	    PORTD ^= (1<<5) ;
    }
}

and when this didn't work i tried this one too

void main()
{
  DDRD = 0xFF;
  while (1)
  {
     PORTD = ~PIND;
        }
}

again I will say that the wrong bits I programmed (after which my controlled get bricked) were CKSEL=1000 and SUT=00 which is EXT RC Oscillator 8 -12 Mhz startup time 18CK+0ms. so what should I do next? 

Last Edited: Tue. Jul 3, 2018 - 03:02 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try connecting (using as short a leads as possible) the R/C circuit shown on page 29 figure 12 of the Data sheet to the xtal 1/2 pins.

Use C = 22pf, R=10k ohm and see if that will wake it up so you can reprogram the fuses back to factory default values.

 

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

thank you very much its now finally workingsmiley. now i consult datasheet (atmega8) and the site you told. According to my knowledge in order to use CRYSTAL OSCILLATOR of 11.0592MHz we shall use these fuse bits

Is this Right? Thanks again for your help.

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

Congratulations!

 

Those new fuse settings look good to me!

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...