atmega328p with bad fuse settings

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

Hello and thanks for your time in advance!

 

What created the problem:

I'm a newbie to AVRs and tried to run the ATMEGA328P with an external crystal, but instead configured the fuses for external clock. (also i'm very worried that USBasp might have been set in a pretty high speed, could that get some of the fuses wrong?)

 

Tools:

I do not have access to a programmer other than USBasp which I used along with AVRDUDESS 2.4 to kill the chip but I have access to more avrs.

 

Other info:

The chip was loaded with Blink example project before changing the fuses and was loaded with the UNO bootloader.

Usbasp is properly connected, tried with another chip and is detected as it should.

 

Error:

Every attempt to write to chip since messing with the fuses ended with this:

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.

and the atmega328 did not blink anymore.

 

What I tried:

I read this http://www.avrfreaks.net/forum/tutsoft-recovering-locked-out-avr?name=PNphpBB2&file=viewtopic&t=106325 and loaded this

#include <avr/io.h>
int main(void) {
    DDRB = 0xFF;
    while(1) {
        PORTB ^= 0xFF;
    }
}

 

to another ATMEGA328P with 16MHz clock to provide an external clock from PB1 pin.

 

What happened:

Now the atmega blinks every ~78 seconds but is still unresponsive to AVRDUDESS or the IDE with the above error in all possible AVRDUDESS bit clocks.

Thats around 205kHz of clock from the 16Mhz of input, tried to communicate with it via 16kHz but no luck.

Another problem is that not both ATMEGAs can be powered from the 5V of the USBasp, so i use an external source to the clocked one, could that be a problem?

 

Screenshots:

Circuit and Fuse settings

 

Can you please help me recover it? 

 

UPDATE: Text was updated, I used nano originally which wan't properly grounded but ki0bk helped me figure it out. For the pulse then switched to attiny, pictures were updated too but same results this far.

UPDATE: Changed the ATTINY85 with another ATMEGA328P with 16MHz clock

 

Attachment(s): 

Last Edited: Thu. Nov 2, 2017 - 02:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You probably still have the clock/8 fuse set, so set the isp clock (-B)  to a lower setting, until you can read the chip signature and erase it. 

The ISP clock must be less then 1/4 the cpu clock for it to talk to the chip.

 

Jim

 

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

You did connect the nano's gnd to the common gnd of the 328, yes?

 

 

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

Hello, thanks for the answer.

 

You did connect the nano's gnd to the common gnd of the 328, yes?

 

Nope, I hadn't connected the nano's GND, but i did now. (I knew something was off in the setup :P).

 

You probably still have the clock/8 fuse set, so set the isp clock (-B)  to a lower setting, until you can read the chip signature and erase it. 

The ISP clock must be less then 1/4 the cpu clock for it to talk to the chip.

I then tried to rewrite the fuses with the defaults with -B5 up to -B10 but still no luck, just in case I will link a picture of the AVRDUDESS in case I don't know what i'm talking about. I manually selected the MCU, it still can't detect it.

EDIT: Is erasing something different?

Attachment(s): 

Last Edited: Thu. Nov 2, 2017 - 11:51 AM