Go Down

Topic: Bootloader problem - Arduino Mega and Duemilanove (Read 4 times) previous topic - next topic

drwaseem

Hello,
Well, I am close to killing myself after sending over 10 days and miserably failing at trying to burn a bootloader in a new Atmega328p. Here is what I am doing.
1. I have set up two Arduino boards for this purpose. Using Arduino mega as programmer and Duemilanove as slave (with new Atmega328p). I have followed the instructions given at http://arduino.cc/en/Tutorial/ArduinoISP in letter and spirit.

I get the following

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

Besides that, I have tried every possible way of setting up the atmega on a breadboard with an oscillator and all the relevant circuitry and tried to burn the bootloader with no avail.
Downloaded winavr and tried to do it with command prompt, but failed. I have gone through possibly every post in every forum and youtube videos and what not. Tried putting resistor (or 10uf cap) between ground and reset pin on slave Duemilanove. Nothing happens. Checked the comport, cables and connections a million times over and over but can not burn bootloader.
Used IDE 1.0 at first, it gave a device ID error, now using IDE 0018 and the error message is what I copied up here.
I am new to Arduino and don't want to loose hope in it. Please, any help would be greatly appreciated. Please also let me know how to test if atmega328 is shipped bad to me.

Regards
Waseem

drwaseem

#1
Apr 01, 2012, 10:23 pm Last Edit: Apr 01, 2012, 10:35 pm by drwaseem Reason: 1
Besides, I have also followed instructions given in the following post
http://arduino.cc/forum/index.php/topic,99385.0.html

Setup was same that is, Arduino Mega connected to PC while Duemilanove (with the new Atmega328p) connected with Mega.
Results were frustrating. The IDE 0018 gave following error

avrdude: stk500_getsync(): not in sync: resp=0x0a
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I have tried this whole and the previous setup with both the new Atmega328p and the one that came with Duemilanove (it is surely working and taking up the sketches) but I can not get the bootloader burned on any atmega328p.

What to do??

Nick Gammon


madworm

And don't kill yourself because of THAT.

But please familiarize yourself with the concept of getting the right tools for the job. Spending somewhere between 10-30$ for a programmer would most likely (*) have saved you from spending 10 days in self-inflicted hell.

(*) If you use windows that may or may not be different.
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

HugoPT

try to disable the autoreset on the arduino you want to program.you must add a 120 resistor from reset pint to 5V.
You should then be able to sucessefuly upload the bootloader then
Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

Go Up