From Arduino as ISP to replacing the chip

I have one problem.

  1. I have Arduino UNO with atmega328p. I'm uploaded Arduino as ISP sketch to it.
  2. I have atmega8. I have upload the bootloader and blink sketch to it with 1. All is OK.

But now I have replaced atmega328p with atmega8 on my Arduino board. Sketch is working. ("Heartbeat" too) But when I want to upload another sketch to it (with AVRISP mkII = default programmer) it displays error about connection to the port.

What is the problem ?

P.S. When I'm uploading sketch to atmega8 from Arduino as ISP, I'm choose Arduino NG, atmega8. Problem not about port, because I'm have only 2 on my computer, and I have only 1 for Arduino.

How about upload to ATmega8 via ArduinoISP? Did you used combined HEX (sketch+bootloader)? If not and you installed the bootloader first and then the sketch, the first upload was overwritten. You are missing the bootloader probably. Try to upload the bootloader again via ISP, only bootloader.

If you have an AVRISP mkII then why use ArduinoISP to burn the bootloader? If you DON'T have an AVRISP mkII then how do you expect to upload anything to the ATmega8 using AVRISP mkII?

How to get it to work:

Put the ATmega328P back into the UNO.

Load ArduinoISP and use that to burn the "Arduino NG or older" bootloader. The NG was the last Arduino using the ATmega8 processor. Select Tools->Port->the port for your UNO Select Tools->Programmer->Arduino as ISP Select Tools->Board->Arduino NG or older Select Tools->Burn Bootloader

Put the ATmega8 in the UNO.

Select Tools->Board->Arduino NG or older

Upload the Blink sketch.

johnwasser, you have write method that I used. But there was error about port.

BUT now I was wrong. AND now I really need some help.

I have loaded ArduinoISP to the Atmega328p on the board. Connected all like this :

(at the last times its worked for uploading sketches)

Selected all like this :

johnwasser: Select Tools->Port->the port for your UNO Select Tools->Programmer->Arduino as ISP Select Tools->Board->Arduino NG or older Select Tools->Burn Bootloader

And had the error (like in previous) that IDE cant connect to the port, AND "efuse" memory type not defined for part "ATmega8". After that error Atmega8 was working and normally loading the sketches (without bootloader preinstalled).

BUT THEN i have read that post: http://forum.arduino.cc/index.php?topic=333707.0

AND deleted that string from platform.txt: -Uefuse: w: {bootloader.extended_fuses}: m

AND now I have that error:

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

AFTER i have returned the string to the platform.txt BUT error have stayed.

SO Im burned my atmega8 ?

Because I have read some posts, they says that this error about wires connection. BUT previously I have loaded blink sketch to it with the same wiring, and nothing changed after. (It was 1 min before my FATAL stupidity). SO problem not about wiring. I think problem may be in fuse bits.

Help me to understand what is wrong, FUSE BITS or BUNED CHIP.

Full LOG from arduino ide:

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega8
         Chip Erase delay              : 9000 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        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    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.07s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.06s

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.

A signature reding as 000000 often means that the crystal is not installed or not working. Are you sure the crystal is wired as shown in the diagram?

Yes. Because before my changes in platform.txt all was fine. (I was able to upload sketches) So that is it ? I'm burned my chip ? But all that I have done for this, its deleted -Uefuse:w:{bootloader.extended_fuses}:m from platform.txt SO how it can be ? How one string can burn the chip. I want just to understand.

No, I don't think it is burned. Check your wiring and settings carefully first.

Ooooh. I'm really dumb :confused: I rechecked wiring and problem was there. SO now I successfully burned bootloader on my atmega8.

BUT i have last question (on this thread :) ).

I have playing around with atmega328p on the board, and after little fail with input voltage on the analog pin, atmega328p stopped working (no heartbeat). When I'm trying to upload the sketch or bootloader on it, there NO errors or warnings BUT there "no signs of life" (chip just heat up). I'm doing this with another Arduino as ISP.

And when I'm replacing the chip into the board (with FTDI chip and other) Windows giving me the warning about UNKNOWN DEVICE.

SO I'm burned that chip ?

(I swear its last question on this thread :grin: )

If the chip is getting hot it is probably dead.