Go Down

Topic: Atmega8 Wrong Signatures (Read 8438 times) previous topic - next topic


Hi Arduino,
I am new to arduino, no practice in electronics but have knowledge of some basic electronics.
I have designed two arduino boards using http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3 and tried to burn the bootloader using Parallel Programmer http://www.arduino.cc/en/Hacking/ParallelProgrammer.
Each time i try to burn bootloader suing Arduino IDE 0022, avrdude tells that device ATMEGA8 returned wrong signatures, i made two ATMEGA8 useless.
Then i got another one, but first i tried to read from the avrdude directly using cli and device returned correct signatures, i returned to Arduino IDE 002 agian to burn the bootloader and same thing happened again, i lost that one too. Even using the avrdude on cli the error is same (wrong signature).
Its been a month since i m stuck.
1- What is going on ?
2- If i get another ATMEGA8 then what should be my next strategy ?
3- What am i doing wrong or what should i do ?
Please help


Feb 14, 2011, 05:39 pm Last Edit: Feb 14, 2011, 05:50 pm by hexskrew Reason: 1
DUDE! I hope your not throwing those At8's away man! They are NOT bad (PROMISE!)

Let me go ahead and ask this much: How are you supplying power to the chip while flasing? I have had the exact same thing happen to me with the Atmega32L but it was because the Arduino (as ISP) didn't supply enough power to power up the chip, but as soon as I used an off board power source for the chip (for me, 4x AA batteries, and I have it wired to a 5v regulator for consistency).

Try that first. Also what version of avrdude are you using?

There's a while slew of things that could cause that issue. I'll give  you the link to what I found when trying to program the Atmega32L.

Also try to erase the chip first before any operation. This can also help.


Thanks @hexskrew for your response, i am using external 9v battery as power, made Serial Single Sided V3 http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3 and using Parallel Programmer http://www.arduino.cc/en/Hacking/ParallelProgrammer. I am not confirm about the version of avrdude.


Feb 14, 2011, 09:39 pm Last Edit: Feb 14, 2011, 10:50 pm by hexskrew Reason: 1
Well, to be completely honest this is a tuffy since you built both the programmer and the board.

-What O.S. are you running?

1. Did you run "giveio.bat" before issuing the command to check or flash the micro?

2. Check to ensure that your parallel port is enabled in the bios. Also check your port address settings because those can interfere with operation of that type of programmer.

3. Do you have an Intel motherboard? In the past, there have been issues with a proprietary voltage protection system intel builds into their boards. I am not sure if anyone has resolved that one or not...

4. Just to try it, download WinAvr, and try to use it. Even if WinAvr doesn't work, go into your cmd line and in the WinAvr/bin directory you will find avrdude. Strangely this version works fine with my Arduino as ISP, yet the version of avrdude that comes with the Arduino IDE gives me "Device out of sync" errors....

*If the avrdude that comes with WinAvr DOES work, here's what you should do. Make a backup folder and copy of the avr directory in the Arduino folder. Now, copy ALL of the files from the avr directory from WinAvr. Now open the Arduino IDE, flash the bootloader, and then immediately exit the IDE. Delete the avr directory you just copied all the files over to, and then put the backup of that directory back where it was.

5. Can you wire it up as simplistic as possible on a breadboard? If so, do that first and try it out. You may just have a bum component on the board somewhere, but also sometimes regardless of how much you checked your connections when soldering the board, you may have missed something or crossed something. I have done it enough times :/

From then on you can use your serial on your board and all should be well.


Thanks @hexskrew for your response.
Last night i bricked another ATMEGA8. I was using avrdude avrdude-5.4-win.
At the beginning avrdude recognized the ATMEGA8 with correct signature, i also read the low and high fuses which were correct, it means my board (Arduino Single Sided V3) and cable (Parallel Programmer) are fine.
But after that i executed following commands.

avrdude -p atmega8 -c dapa -P lpt1 -U lock:w:0xff:m
avrdude -p atmega8 -c dapa -P lpt1 -U hfuse:w:0xca:m -U lfuse:w:0xdf:m
avrdude -p atmega8 -c dapa -P lpt1 -U flash:w:ATmegaBOOT.hex
avrdude -p atmega8 -c dapa -P lpt1 -U lock:w:0x0f:m

and i bricked it, but something is different now avr dude is detecting the controller but it is returning strange signature 0x000102.

By the way its my forth one.

I am using windows XP service pack 2.
1- Yes, giveio is installed on my system.
2- Yes, the printer port is installed and with correct tyep (which is i think ECP) but i m not sure about the address.
3- Yes, actually i have two boards 865GBF, and 845 chipset but i don't think so its problem of lpt because avrdude returns correct signature.
Well i did not got enough time to consider your 4,5 point.


Feb 15, 2011, 01:59 pm Last Edit: Feb 15, 2011, 02:38 pm by hexskrew Reason: 1
Damn man.... I hate to hear that. I would try the next one in a breadboard but also, I would quadruple check those hex values..

If the next one bricks, I would be wondering about your supplier more than anything. Unless there is a short in your programmer cable.

!!! Found one problem!!!

avrdude -p atmega8 -c dapa -P lpt1 -U lock:w:0xff:m
avrdude -p atmega8 -c dapa -P lpt1 -U hfuse:w:0xca:m -U lfuse:w:0xdf:m
avrdude -p atmega8 -c dapa -P lpt1 -U flash:w:ATmegaBOOT.hex
avrdude -p atmega8 -c dapa -P lpt1 -U lock:w:0x0f:m <---This is not the correct lock bit.
should be:
avrdude -p atmega8 -c dapa -P lpt1 -U lock:w:0xcf:m

On your next one try this:
avrdude -p atmega8 -c dapa -P lpt1 -U lock:w:0xFF:m
avrdude -p atmega8 -c dapa -P lpt1  -U lfuse:w:0xD4:m   -U hfuse:w:0x99:m  <---uses 8mhz internal oscillator. This could be another problem *faulty oscillator* so try the internal one. You can always change back to the external.
avrdude -p atmega8 -c dapa -P lpt1 -U flash:w:ATmegaBOOT.hex
avrdude -p atmega8 -c dapa -P lpt1 -U lock:w:0xcf:m

You can verify these lock bits here: http://frank.circleofcurrent.com/fusecalc/fusecalc.php?chip=atmega8&LOW=F1&HIGH=99&LOCKBIT=FF

Also, found that the lock bit you are putting in -U hfuse:w:0xca:m is:
External Crystal/Resonator Low Freq.; Start-up time: 258 CK + 4ms; [CKSEL=1010 SUT=00]


Now that i m stuck at bootloader, my next strategy is not to complete Arduino but to revive the bricked controllers for which i have searched and found HVPP (High Voltage Parallel Programmer) HVProg http://www.der-hammer.info/hvprog/index_en.htm which is stk-500 compatible. HVPP is a must have.


Also found this. I still hold true that maybe your resonator is broke.

from here: http://www.billy.gr/arduino-bootloader/


The default fuses of ATMega8 are (pdf and locally tested):
High Fuse:      0xd9
Low Fuse:       0xe1
Lock:           0x3f
Programming the bootloader. Chip erase (-e maybe needed in some cases)

Unlock the bootloader (TEST: try with -e)
avrdude -p atmega8 -b 115200 -U lock:w:0xff:m
(fails with avrdude: verification error, first mismatch at byte 0×0000 0xff != 0x3f)

Program the fuses
avrdude -p atmega8 -b 115200 -U hfuse:w:0xca:m -U lfuse:w:0xdf:m

Burn the bootloader (TEST: try with -D disable auto erase)
avrdude -p atmega8 -b 115200 -U flash:w:ATmegaBOOT.hex

Lock the bootloader
avrdude -p atmega8 -b 115200 -U lock:w:0xcf:m
(fails with avrdude: verification error, first mismatch at byte 0×0000 0xcf != 0x0f)

But it works….

Try it with my edit for the internal oscillator first. The IDE will still work, but your sketches wont run at the correct speed. But it's worth a try to ensure everything else is correct.


found that the lock bit you are putting in -U hfuse:w:0xca:m is:
External Crystal/Resonator Low Freq.; Start-up time: 258 CK + 4ms; [CKSEL=1010 SUT=00]

Mega8 has slightly different fuse settings than mega168/etc.  I have had problems with a mega8 that would NOT come up on a resonator-equipped board after having the fuses set like this in a crystal-based target board (program the mega8 in crystal target board, works fine.  Move chip to resonator-based board, it stopped working.)
I had better luck with lfuse=0xBF, hfuse=0xCC

Go Up