[Atmega8L] Device signature = 0x000000

Hi,

I'm new to microcontrollers and have been facing this irritating problem with the Atmega8L. Here are the details.

  • Microcontrollers used - Atmega8L-8PU / AtTiny2313V-10PU
  • Programmer - Arduino clone - Freeduino
  • Freeduino Website - http://www.bhashatech.com/70-freeduino-lite-v2.html#/cpu-atmega328
  • Arduino board selected (inside Arduino IDE) - Arduino Duemilanove w/ Atmega328
  • Breadboard powersupply used - LM317 board - 5V verified using multimeter
  • Connections - USB 3.0 port --> FTDI converter --> Freeduino
  • Freeduino board has a 100 ohm resistance between Reset and 5V to set it to be used as an AVR ISP
    Software used - - WinAVR / Arduino IDE (Windows 7 x64)
  • avrdude (Ubuntu 12.10)
  • GND of programmer connected GND of breadboard power supply.

Breadboard configuration


Avrdude input/output

C:\WinAVR-20100110\bin>avrdude -c avrisp -p atmega8 -P COM5 -b 19200

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


C:\WinAVR-20100110\bin>avrdude -c avrisp -p atmega8 -P COM5 -b 19200 -B 250

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


C:\WinAVR-20100110\bin>avrdude -c avrisp -p atmega8 -P COM5 -B 250
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.


C:\WinAVR-20100110\bin>avrdude -c avrisp -p atmega8 -P COM5
avrdude: stk500_getsync(): not in sync: resp=0xe0

avrdude done.  Thank you.


C:\WinAVR-20100110\bin>avrdude -c arduino -p atmega8 -P COM5 -b 19200

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


C:\WinAVR-20100110\bin>avrdude -c arduino -p t2313 -P COM5
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done.  Thank you.


C:\WinAVR-20100110\bin>avrdude -c arduino -p t2313 -P COM5  -b 19200

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e910a

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


C:\WinAVR-20100110\bin>avrdude -c arduino -p t2313 -P COM5  -b 9600
avrdude: stk500_getsync(): not in sync: resp=0xf0

avrdude done.  Thank you.


C:\WinAVR-20100110\bin>avrdude -c avrisp -p t2313 -P COM5 -b 19200

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.09s

avrdude: Device signature = 0x1e910a

avrdude: safemode: Fuses OK

avrdude done.  Thank you.


C:\WinAVR-20100110\bin>

The problem:
Whenever I stick the Atmega8L in the breadboard it gives the Invalid device signature message.

This is what I type
avrdude -c avrisp -p atmega8 -P COM5 -b 19200 the heartbeat LED keeps blinking, error LED does not light up.

If I skip the -b 19200 part or set it to 9600 then I get
stk500_getsync(): not in sync: resp=0xf0 and the heartbeat LED keeps blinking but the error LED comes on.

Using -B 6 to -B 250 hasn't helped at all.

I thought maybe I got the microcontroller burnt so I got another Atmega8L and tried it again and that didn't help either.

The entire process when repeated with the AtTiny2313 works great and I can get the bootloader onto it and program it with the blink example. I don't get any of the error messages with the AtTiny2313.

It's a minimal configuration so there is no Crystal connected at the moment, will do that soon.

I can't get the damn Atmega8L to work at all, please help!

Edit: Tested with a 11.0592MHz crystal and 2x 33pF capacitors, the situation remains the same.

Device signature 0x000000 is usually some sort of wiring problem.

Double check everything for continuity and correctness...

That's why I've given the breadboard diagram up there to see if anyone can catch anything wrong. Also, ATtiny2313 programs well using the same setup(minus one VCC and one GND).

The wiring in the diagram looks correct but it's worth posting an actual picture - I know from my own experience that what you intend to wire and what you actually wire are not always the same.

Also, you have no crystal or caps in your diagram.

If you know that your new chip is fused for internal osc' then that's OK, but if you don't know that then there is a good chance that it needs an external crystal & caps on pins 9/10. Apparently there is a version of Arduino ISP that provides an 8MHz clock signal that you could use instead but I don't know where you find that version.

Finally, is your breadboard actually powered? Looks from your diagram that you have a separate BB power supply - is that on & connected up OK? Do you actually have the links in place at the middle of the power rails? I missed them once and it took me days to work out why my chip was not programing!

Ugi

tamatarpakoda:
That's why I've given the breadboard diagram up there to see if anyone can catch anything wrong. Also, ATtiny2313 programs well using the same setup(minus one VCC and one GND).

Did you check continuity? Don't assume the breadboard is OK (or the wires).

Nick Gammon has a ISP sketch that outputs a clock pulse, you can use instead of a crystal

Don't assume the breadboard is OK

That is very much true. You could try to move your Atmega8, to another spot on your bradboard, or to another breadboard. I have spend hours trying to find an error in my wiring, but in the end it was a bad contact in the breadboard. I seems to me that the bigger chips, the more likely it is a breadboard error.

Thank you all for the replies.

I spent some time cleaning the board and rubbing off the oxidation present on the Microcontroller pins.

One microcontroller has responded well and it's now programmable but the other still returns the invalid device signature error.

Will do a bit more tinkering and post the outcome.

The other posters are right. It could be fused to expect a crystal.

The datasheet mentions that they ship each microcontroller so that it sources the internal clock at 1MHz.

Who is "they"? Did you buy from DigiKey? Resellers often burn a bootloader as an assistance to Arduino users, and alter the fuses to expect a crystal.

The Atmel datasheet. I got the Atmega8L from a local mom n pop shop. I doubt they'd burn any bootloader onto it. Anyways, I've tried hooking it up to 4MHz, 8MHz and 12MHz crystals. Nothing....I'm guessing this is a busted microcontroller, hope parallel programming works.

tamatarpakoda:
The Atmel datasheet. I got the Atmega8L from a local mom n pop shop. I doubt they'd burn any bootloader onto it. Anyways, I've tried hooking it up to 4MHz, 8MHz and 12MHz crystals. Nothing....I'm guessing this is a busted microcontroller, hope parallel programming works.

It is now a long time after this thread was post, so sorry if I'm out of court. However:

This is most probably an AVRDude.conf configuration error. I do not know the signature of the chip in question but if it is not in the avrdude dot configuration file then avrdude will not progress beyond its checking the signature. To rectify: Simply find the address of your chip and edit avrdude.conf inserting it or amending it in the signature section [about two thirds down the page]. The file is found on windows 8 [default] in Arduino/Hardware/avr/bootloaders/gemma/.. Before dabbling it may be better to make a back up of the file out of the arduino IDE. Finally save the file back in file position. Job done.

ChrisPSR