[Help] USBasp Programming - Atmega328p - Chip not working after fuse change

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

Atmega328p chip not recognized by avrdude, and program(led blink) uploaded before was not working either but it did light up the led after 42 sec. and never goes off(so it's kind of working but very very slow?). Everything was fine until I change (fuse) clock from ext. 16Mhz to int. 8Mhz to ext. 16Mhz.

 

 

Things I did before bricking the chip,

 

1. Uploaded led blink program to atmega328p-au chip using usbasp programmer(wired up all connection given in the datasheet and 16Mhz osc.)

2. LED was blinking too fast(almost 100ms) despite having the code with 1s delay

3. Thought 16mhz osc. causing the issue, removed it and pointed clock to internal 8mhz RC by changing fuse(-U lfuse:w:0x62:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m) but led was blinking too slow

4. Searched in google for a solution and found changing bit CKDIV8 might fix

5. Changed the clock source again to ext. 16Mhz osc. (-U lfuse:w:0x60:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m)

6. Avrdude did not recognize the chip, and led blink not happening.

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

Ext Clock only works with an external clock e.g. a 4-pin clock module.

 

If you have a 2-pin crystal,  you should set the fuses for "Ext Crystal Oscillator"

 

Apply a clock signal to XTAL1 from another AVR.   Then set the fuses correctly.

 

DAvid.

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

For the difference between a plain crystal, and a crystal oscillator, see:

 

http://www.avrfreaks.net/comment...

 

http://www.avrfreaks.net/comment...

 

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

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

david.prentice wrote:

Ext Clock only works with an external clock e.g. a 4-pin clock module.

 

If you have a 2-pin crystal,  you should set the fuses for "Ext Crystal Oscillator"

 

Apply a clock signal to XTAL1 from another AVR.   Then set the fuses correctly.

 

DAvid.

 

Yeah, that did work, I've used arduino as clock source, and changed the fuse back to ext. crystal osc.

 

Thanks.