avrdude: Expected signature for ATMEGA8 is 1E 93 07

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

Good day!

Sorry for posting Arduino-related questions here and not on Arduino forum, but I haven't get any responses on Arduino forum about this (on other topics I get fast and accurate responses, thanks, Arduino community!). This seems to be more general AVR\avrdude related (it seems I'm coming clother and clother to bare WinAVR :))

I'm trying to burn a Arduino bootloader into blank Atmega8A-PU using Arduino Duemilanove (Atmega328P) as ISP programmer (with ArduinoISP sketch). The target configuration is with internal RC oscillator at 8Mhz.

Here is the wiring: http://arduino.cc/en/uploads/Tut...

The bootloader comes from here: http://todbot.com/blog/2009/05/2...
(The same as original, just changed for 8Mhz), but it seems I haven't get so far to burn bootloader.

Here are settings from boards.txt (to illustrate fuses and lockbits):

##############################################################

atmega8noxtal.name=ATmega8-noxtal @8MHz

atmega8noxtal.upload.protocol=stk500
atmega8noxtal.upload.maximum_size=7168
atmega8noxtal.upload.speed=38400

atmega8noxtal.bootloader.low_fuses=0xe4
atmega8noxtal.bootloader.high_fuses=0xc4
atmega8noxtal.bootloader.path=atmega8_noxtal
atmega8noxtal.bootloader.file=ATmegaBOOT.hex
atmega8noxtal.bootloader.unlock_bits=0x3F
atmega8noxtal.bootloader.lock_bits=0x0F

atmega8noxtal.build.mcu=atmega8
atmega8noxtal.build.f_cpu=8000000L
atmega8noxtal.build.core=arduino

I've enabled detailed messages in Arduino IDE to see exact avrdude options. It seems it first run avrdude to write fuses and lock bits.
I've tried to update avrdude to the latest version (version is visible below) as described here: http://letsmakerobots.com/node/2...

Here is an error:

C:\Tools\arduino\hardware/tools/avr/bin/avrdude -CC:\Tools\arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega8 -cstk500v1 -P\\.\COM10 -b19200 -e -Ulock:w:0x3F:m -Uhfuse:w:0xc4:m -Ulfuse:w:0xe4:m 

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Tools\arduino\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM10
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200

[...skip...]

avrdude: Device signature = 0x0000ff
avrdude: Expected signature for ATMEGA8 is 1E 93 07
         Double check chip, or use -F to override this check.

Sometimes I get this:

avrdude: Device signature = 0x8133ff
avrdude: Expected signature for ATMEGA8 is 1E 93 07
         Double check chip, or use -F to override this check.
avrdude: Send: Q [51]   [20]

or this:

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

Is chip brokent\locked?

May be I've erased the signature in some way (as described here: http://www.arduino.cc/cgi-bin/ya...)?

Thanks in advance!

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

I would expect that you will be using an appropriate ISP clock rate. I would guess that ArduinoISP does this anyway. 125kHz should be fine for any virgin AVRs.

This will force you to 125kHz or next lowest speed. (bit-rate of 8us)

Add "-B8" to the avrdude command line.

Otherwise the ArduinoISP sketch should work perfectly.

David.

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

Here my command:

C:\Tools\arduino\hardware\tools\avr\bin\avrdude -CC:\Tools\arduino\hardware\tools\avr\etc\avrdude.conf -v -v -v -v -patmega8 -cstk500v1 -P\\.\COM10 -b19200 -B8 -e -Ulock:w:0x3F:m -Uhfuse:w:0xc4:m -Ulfuse:w:0xe4:m 

Here what I get:

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

avrdude.EXE: Send: Q [51]   [20]
avrdude.EXE: Recv: . [14]
avrdude.EXE: Recv: . [10]

avrdude.EXE done.  Thank you.

I have one suspicion that person who gives me that Atmega8A, previously configured it to use external clock. Can this be a problem? I assume that I will need one to change fuse settings (which frequency?), right?

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

Quote:
I have one suspicion that person who gives me that Atmega8A, previously configured it to use external clock.

The advantage of AVR chips is that you can restore their virginity.

They have probably configured it for an 'Ext crystal' rather than 'Ext clock'.

You will need to put a crystal on your breadboard, or at least a clock of some description.

The fact that you were receiving 'something' from the signature made me think that you have a clock. Just that you have it set too low.

Please note that I have NOT suggested this.
run a wire from XTAL2 on the Arduino to XTAL1 of the mega8.

n.b. when you have 'connection' problems, do not send 'lock' or 'fuse' commands.
A simple

avrdude -cstk500v1 -P\\.\COM10 -b19200 -patmega8 -v

should check the Signature.

David.

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

Quote:

They have probably configured it for an 'Ext crystal' rather than 'Ext clock'.

Yes, I think crystal, not clock.

Thank you for the tip, I've tried (and without -B8 too):

C:\Tools\arduino\hardware\tools\avr\bin\avrdude -CC:\Tools\arduino\hardware\tools\avr\etc\avrdude.conf -v -patmega8 -cstk500v1 -P\\.\COM10 -b19200 -B8
         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.14s

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.

I'll get 16Mhz crystal and caps tomorrow, should it help?

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

Quote:

         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us


If your SCK period is 0.1us, you are way too fast (10MHz).

An SCK period of 8us is suitable for most AVRs.

David.

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

Here are full output. It seems that -B8 option is applied:

         Setting bit clk period        : 8.0

But it didn't work :(

C:\Users\ArtVolk>C:\Tools\arduino\hardware\tools\avr\bin\avrdude -CC:\Tools\arduino\hardware\tools\avr\etc\avrdude.conf
-v -patmega8 -cstk500v1 -P\\.\COM10 -b19200 -B8

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Tools\arduino\hardware\tools\avr\etc\avrdude.conf"

         Using Port                    : \\.\COM10
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         Setting bit clk period        : 8.0
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom         4    20   128    0 no        512    0      0  9000  9000 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.14s

avrdude: Device signature = 0xff0000
avrdude: Expected signature for ATMEGA8 is 1E 93 07
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.


C:\Users\ArtVolk>
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The problem is solved, chip fuses were configured by previous owner to use external crystal. I've connected external crystal and now I can use this chip.