Bootloading Atmega168 with Arduino not working !

Trying to put the bootloader into my new atmega168, I have been using this tutorial here :

As the steps are given, I do this :

  • Get my arduino duemilanove with the atmega328 connected to the computer, and upload the arduinoISP to it.
    Then do the wiring as it is shown in the tutorial
    Then go to tools-board-and choose "Arduino Duemilanove w/ Atmega168"
    Then go to tools-programmer and choose "Arduino as ISP".
    Then again to to tools and choose boot load.

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

What to do now ! Do I have to override this. If yes, what is the "-F".
Please Help. Thankyou..!

Firstly, have you disabled the auto-reset on your Ardu' board?

If you don't know what I'm talking about then the answer is "no" and that will be your problem - the Ardu' resets when you try to burn a bootloader and spoils the transmission. To fix this, you need a resistor between "reset" and +5V. I think the value was 110 Ohm but you should try to find a reference somewhere rather than rely on my memory. I seem to remember, however that I put a 100R and a 10R in series.

Once you have over-ridden the auto-reset, have another go and see. Works like a dream once you get over the initial niggles.

Edit - see here: Arduino Playground - DisablingAutoResetOnSerialConnection

Okay, as you said, I put a 100ohm resistor(didn't have the 110 or even 10 to add to 100) from reset to +5v.
Still its showing the same problem :frowning:

do i have to connect the aref on the atmega168 to 5v ?

I don't know whether you have to, but I did.

My setup was (on the '168):

7, 20, 21 to +5v
8, 22 to Gnd
Crystal between 9 & 10 with 22 pf to gnd on each
LED on pin 19 via 330R to give Ardu pin 13 inidcator.
Pins 17, 18, 19 of '168 to Ardu' D11, D12 and D13 respectively.
Pin 1 of '168 10K to +5v and also to pin D10 of Ardu'

On the Ardu'
reset - 110 R to +5v
LED & resistor to Gnd on each of D7, D8, D9 as indicators.

The two issues I have generally had are either I forget to disable reset on the Ardu, or there is a communication problem (e.g. I had no power to my '168 because I didn't realise my new breadboard had a break in the middle of the power rails!).

If you have the above setup then it should work fine - I've bootloaded about a dozen '168s that way now with no issue. If that's what you have done then maybe check the connections etc - it's easy to miss-count pins on the chip etc.

Not working !
checked all the connections allllllmost 5 times.
Well, any any way i can override this. ?
please help

I would still bet on it being a hardware issue rather than actually being an error with the checkdigit, but there are certain '168s that avrdude doesn't recognise. ('168UPs or something I think was the example I saw). In that situation, I have read that you do the following:

  1. If necessary, modify the “boards.txt” AND “programmers.txt” files in your Arduino installation to make it aware of your ISP programming device. Your programmer vendor should have provided details of how to do this for your programmer board, for an example, see the Pololo website on this subject HERE.

  2. Now, when you use your programming environment you should be able to select the board you added in step (1).

  3. Use your programming environment as usual, however hold down the SHIFT key at the same time as you hit the “upload” button. This will put Arduino into verbose bode, and it will show you the commands it issues to invoke the Avrdude program. Avrdude is the program which really uploads the binary version of your program into your AVR chip. With the AtMega328-PU the upload initiated from Arduino will usually fail, because the signature bytes returned by the chip don’t match the signature from a pico-power version of the chip. (the –pu version of the chip returns signature 1E 95 14 instead of 1E 95 0F which Avrdude is expecting for an Atmega328p).

  4. In the Arduino window, scroll all the way up the log text (which is in red). At the top, you will find the complete avrdude command that Arduino used to burn the compiled version of your code into the AVR chip. Select all of this command and copy it into your paste buffer (using CTRL/C once selected)

  5. Startup a command window. Paste the avrdude command line into the window by clicking the top left button of the command window, then edit->paste. BEFORE pressing ENTER add the text “ –F “ just after the avrdude command word. This will make the program skip the signature check, and it will continue the programming of the device successfully.

The above is from an e-bay listing for some '168s (or '328s I'm not sure now) that I nearly bought and then thought they sounded more hassle than they were worth. I therefore haven't tried it, but I hung onto the info' because it sounded like it might be useful. You may or may not be able to over-ride your error with this method.

For your step 1, you didn't provide the link. Retried today and still not working. Its driving me nuts now! :frowning:

Finally, it's working !
Got the breadboard empty and started again. This time, finally, it worked. Even wrote the blink code to it for a test !