Go Down

Topic: Check if atmega is really dead. (Read 1 time) previous topic - next topic

plietar

Hi,
I have two atmega chips I haven't been using for a few months.
I've managed to flash one succesfully using an arduino as an isp programmer.
However I can't flash the other one, avrdude reports bad signature and using '-F' gives 0x0 fuses. The chip hasn't got a bootloader and I don't remember what are the fuse settings.
How can I know if the problem comes from bad fuses or if the chip is really dead ?

Thanks

Coding Badly

#1
May 08, 2012, 08:53 pm Last Edit: May 08, 2012, 10:07 pm by Coding Badly Reason: 1

Is it possible the "bad" processor is configured to run from a crystal or oscillator resonator?

plietar

Yes. I remember switching from internal to external a few times. I may have made a mistake.

Coding Badly


Do you have a crystal or resonator connected to the "bad" processor?

If not, you just need to provide a clock signal on the XTAL1 pin.  I believe Lady Ada has generously publish an ArduinoISP version that does exactly what you need.  Report back if you have trouble finding it.

Nick Gammon

That's a brilliant idea! I've modified my board programming sketch to output an 8 MHz clock on pin 9, if you happen to need it.

Coding Badly

#5
May 09, 2012, 07:36 pm Last Edit: May 09, 2012, 10:50 pm by Coding Badly Reason: 1

I can't remember if I thought of it independently or read about someone else doing it but I'll take credit for the idea.   :D

4 MHz seems to be the most common choice.  I use 1 MHz in TinyISP.  Honestly, I don't think it makes any difference as long as it's at least 4 times the SPI bitrate.

Pin 9.  Excellent choice.  That's the same pin I use for TinyISP running on a 328 processor.

CrossRoads

Poke it with a stick, see if it moves.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Nick Gammon



Pin 9.  Excellent choice.  That's the same pin I use for TinyISP running on a 328 processor.



Thanks, but it just happened that way.

Code: [Select]

const byte CLOCKOUT = 9;

...

  pinMode (CLOCKOUT, OUTPUT);
 
  // set up Timer 1
  TCCR1A = _BV (COM1A0);  // toggle OC1A on Compare Match
  TCCR1B = _BV(WGM12) | _BV(CS10);   // CTC, no prescaling
  OCR1A =  0;       // output every cycle


It happened to be the output for Timer 1. So why shouldn't Timer 1 be working? I am.

Plus we may as well get 8 Mhz out of the thing.

Quote
How can I know if the problem comes from bad fuses or if the chip is really dead ?


Try my "fuse settings" calculator:

http://arduino.cc/forum/index.php?topic=105089

plietar

That was just a bad fuse. Thanks Nick, your fuse calculator worked perfectly using the PWM on pin 9. Using Ladyada's ISP programmer I managed to fix that, and set it to use the internal oscillator.

Thanks.

Go Up