Let's Make Robots!

Bootloader burning problem

Hi,

I've been trying to bootload an AtMega328 for a while now but the chip simply isn't complying.I've followed the instructions given on this link http://arduino.cc/en/Tutorial/ArduinoToBreadboard and not using the minimal configuration.

 I've tried it several times and rechecked pin connections and they all seem fine.Btw, I'm using arduino duemilanove as an isp .Everytime i'm getting an error:

protocol error,expect=0x14, resp=0x51

Help anyone !

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

For anyone having problems burning bootloader into fresh AtMega328 pu and not 328p pu(pico power series),Here's what you need to do

Problem:
"pins_arduino.h: No such file or directory"

Solution:
Copy the contents from the downloaded boards.txt in your src/hardware folder to the boards.txt in App folder instead. On OSX: right click the Arduino app and browse Contents/Resources/Java/hardware/arduino/boards.txt.

You may also need to add the line below after the other text you pasted as it's missing in the downloadable example file:
atmega328bb.build.variant=standard

After this, the ArduinoISP example compiled fine and uploaded to the Duemilanove board that I'm using for burning the bootloader. The next problem I bumped into was that when I selected Tools -> Burn Bootloader, avrdude couldn't communicate with my board.

Problem:

1)stk500_getsync(): not in sync: resp=0x00
You can also get other hex numbers like resp=0x15 and resp=0xf0

Add either a 120 Ohm resistor (didn't work for me) or a 10uF Capacitor (worked like a charm) between the Reset and 5V Pin.

http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection

I had to fiddle a bit to get this right and once it worked I ran straight into the next problem...

Problem:
Avrdude dislikes your lovely 328-PU chips and says "avrdude: Yikes!  Invalid device signature." or "avrdude: Expected signature for ATMEGA328P is 1E 95 0F"

Soln:- This problem happens becoz ur arduino uses 328p - pu and if u bought 328pu(a couple dollars cheap).

The soln is to modify Arduino > hardware >tools>avr>etc and open avrdude.conf file as word document.keep backup of this file incase u mess up.

find 1E 95 0F text under Atmega328 and change it to 1E 95 14 and save.

restart arduino environment and burn bootloaders on all ur chips.use status leds as mogul said.they help a lot.

After burning change the text in avrdude.conf file back to 1E 95 0F and restart arduino ide.Then u can uplode code normally.

For anyone having problems burning bootloader into fresh AtMega328 pu and not 328p pu(pico power series),Here's what you need to do

Problem:
"pins_arduino.h: No such file or directory"

Solution:
Copy the contents from the downloaded boards.txt in your src/hardware folder to the boards.txt in App folder instead. On OSX: right click the Arduino app and browse Contents/Resources/Java/hardware/arduino/boards.txt.

You may also need to add the line below after the other text you pasted as it's missing in the downloadable example file:
atmega328bb.build.variant=standard

After this, the ArduinoISP example compiled fine and uploaded to the Duemilanove board that I'm using for burning the bootloader. The next problem I bumped into was that when I selected Tools -> Burn Bootloader, avrdude couldn't communicate with my board.

Problem:

1)stk500_getsync(): not in sync: resp=0x00
You can also get other hex numbers like resp=0x15 and resp=0xf0

Add either a 120 Ohm resistor (didn't work for me) or a 10uF Capacitor (worked like a charm) between the Reset and 5V Pin.

http://www.arduino.cc/playground/Main/DisablingAutoResetOnSerialConnection

I had to fiddle a bit to get this right and once it worked I ran straight into the next problem...

Problem:
Avrdude dislikes your lovely 328-PU chips and says "avrdude: Yikes!  Invalid device signature." or "avrdude: Expected signature for ATMEGA328P is 1E 95 0F"

Soln:- This problem happens becoz ur arduino uses 328p - pu and if u bought 328pu(a couple dollars cheap).

The soln is to modify Arduino > hardware >tools>avr>etc and open avrdude.conf file as word document.keep backup of this file incase u mess up.

find 1E 95 0F text under Atmega328 and change it to 1E 95 14 and save.

restart arduino environment and burn bootloaders on all ur chips.use status leds as mogul said.they help a lot.

After burning change the text in avrdude.conf file back to 1E 95 0F and restart arduino ide.Then u can uplode code normally.

I often seems to have better luck with this ArduinoISP. Give it a try, and don't forget to wire the 3 status LEDs that will tell you some additional info int the process.

https://github.com/rsbohn/ArduinoISP

Give it a try, and get back to us with the results.

From the comments in the sketch:

// Put an LED (with resistor) on the following pins:
// 9: Heartbeat   - shows the programmer is running
// 8: Error       - Lights up if something goes wrong (use red if that makes sense)
// 7: Programming - In communication with the slave

after uploading got the heartbeat led pulsating .What does that mean??

What version of the Arduino IDE are you using. For the older versions you will need to replace the AVRdude file with one from Avrstudio 4. I created a second copy of the Arduino IDE with the new AVRdude for the purpose of burning bootloaders. For some reason the first time you tell it to burn the bootloader you get an error. I think this is because some pins needed initializing. The second time you tell it to burn the bootloader it works perfectly. The newest version of the IDE solves the need for changing the AVRdude file but you still need to tell it to burn the bootloader twice.

That's a pretty good tutorial, so I'll assume that you're paying attention to things like the clock speed, chip removal and wiring.  I usually get tripped up somewhere between running the Arduino ISP sketch, selecting the sketch/bootloader, selecting the board and checking the port. I don't know the Duemilanove very well.  I do know that if you have certain configurations of hardware in the process that you have to run Arduino ISP before connecting it to the target.