ArduinoISP Problems

Hi guys,

Since yesterday I'm trying to bootload some atmega328-pu's, but I have some troubles with bootloading them. I've googled a real lot but I couldn't find any solutions. I even checked and changed the wiring for over 20 times. I'm currently stuck at the last picture on this page: http://arduino.cc/en/Tutorial/ArduinoISP. I'm using an arduino mega 2560 and I have wired the pins correctly: MISO (50), MOSI (51), SCK (52) and SS (53). But still I always get the following message when I try to burn them:

avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

So what I do is: - Go to "file > examples > ArduinoISP" - Upload "ArduinoISP" to my arduino mega 2560 - Make sure "tools > programmer> arduino as isp" is selected - Go to "tools > burn bootloader" And that's how I end getting the error described above. PS: I have the right board selected: "arduino mega 2560 or mega adk"

Hope someone can help me with this common problem so hopefully even other people can profit from the solution.

Thanks in advance!

6.Select the item in the Tools > Board menu that corresponds to the board on which you want to burn the bootloader (not the board that you're using as the programmer). See the board descriptions on the environment page for details.

As you are programming a 328 you should selct the right boar, for example Arduino Uno, and not Arduino Mega

Thank you for your reply.

I tried what you said, but now i get a different message:

avrdude: stk500_getsync(): not in sync: resp=0x00

The ArduinoISP example that I should upload is compatible with the arduino mega 2560. It has the following text in it:

// This sketch turns the Arduino into a AVRISP // using the following arduino pins: // // pin name: not-mega: mega(1280 and 2560) // slave reset: 10: 53 // MOSI: 11: 51 // MISO: 12: 50 // SCK: 13: 52

And I've double checked the wiring, but still don't know what the problem might be.

Some of those virgin chips are a little feisty. Check out Gammon's Atmega Board Programmer: http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=11635&page=1

It uses the same basic SPI setup, but you add a jumper to D9 for an external 8 MHz signal for XTAL1 on your target. The cool part is you use the serial monitor and you get great info on the target chip and it is FAST.

Is this another case of 328P vs 328 -- and not having the appropriate avrdude.conf ?

[quote author=Runaway Pancake link=topic=123390.msg928076#msg928076 date=1348023905] Is this another case of 328P vs 328 -- and not having the appropriate avrdude.conf ? [/quote]

You are probably right. I did have some spanking new "Pico" chips that did not bootload to Aduino as ISP hooked up as SPI but did bootload with a ZIF Programmer shield. So far, every test on the Gammon Programmer works perfectly (well, there was one that that got bootloaded on 5 different programmers varying from Lilypad to Uno, it locked up).

Anyhow, if this fails, we can use Gammons fuse reader to nail it, unless jozzy can positively ID the markings.

[quote author=Runaway Pancake link=topic=123390.msg928076#msg928076 date=1348023905] Is this another case of 328P vs 328 -- and not having the appropriate avrdude.conf ? [/quote]

Can you please explain further? I have tried so many things and I've even searched further than 1 page on google. All without any success.

There are a couple of "flavors" for the Atmega328. The one that comes with the Uno R3 is the Atmega328P-PU which means this chip passed the low current operational testing at Atmel (Pico Power). If it does not pass this test it does not receive it's "P" badge and is just a Atmega328-PU. The problem is, it also receives a different chip ID and that causes the programmers to not program the chip. If you put an entry into the boards.txt file for the Atmega328-PU then it should bootload.

spcomputing: There are a couple of "flavors" for the Atmega328. The one that comes with the Uno R3 is the Atmega328P-PU which means this chip passed the low current operational testing at Atmel (Pico Power). If it does not pass this test it does not receive it's "P" badge and is just a Atmega328-PU. The problem is, it also receives a different chip ID and that causes the programmers to not program the chip. If you put an entry into the boards.txt file for the Atmega328-PU then it should bootload.

Thanks for your reply!

I've tried to google how to edit my boards.txt, but it didn't work. I even tried to edit my avrdude.conf also without any success. I tried these steps: http://www.instructables.com/id/How-to-use-Arduino-Mega-2560-as-Arduino-isp/ and these: http://www.3guys1laser.com/blog-burn-bootloader-blank-atmega328atmega328p-arduino-uno

But still I can't manage to bootload my empty atmega328-PU without any error.

My setup: I have an empty atmega328-PU on a breadboard with some wires coming from my arduino mega 2560. I have a 100 nano capacitor between +5v and the reset on my mega(which I only use after uploading). I have also tried to use a 16mhz crystal with 2x 20pico(both wired on ground). And I have tried to put a 10k resistor between the reset and +5v

I think I've missed something crucial but I just can't find the problem.

Try this one:

http://arduino.cc/forum/index.php/topic,122314.0.html

Looks like eried's modified Arduino IDE has it defined already:

http://arduino.cc/forum/index.php/topic,118440.0.html

If you upload a photo of the setup, we could give you some additional guidance.