Burning bootloader

Hi,

I have having some issues burning bootloader to a Atmega328p. I am using Arduino Uno as an ISP to burn the bootloader. My setup is as below

  1. Atmega328p on the breadboard with a 16 MHz crystal connected and two 22 pF capacitors and a 10k resistor from the reset pin of the atmega's to 5v

Below is the error I keep getting

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): protocol error

I do see the rx tx flashing for about 5 sec and then it stops when i click on burn bootloader and in about 15 sec I get the error above. Any ideas? Thanks for your help!

Using Arduino 1.0?

I bought this off ebay few days back. how can I tell if it's 1.0?

Did you remember to disable auto-reset on the Arduino Uno?

Yea I put a 110 ohm resistor from reset pin to 5v..I didn't have 120 ohms.

Tried to use the avrdude and here what the error is:

C:\Users\Temp>avrdude -c Arduino -p m328p -P COM3 -U flash:w:optiboot_atmega328
.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "optiboot_atmega328.hex"
avrdude: input file optiboot_atmega328.hex auto detected as Intel Hex
avrdude: writing flash (32768 bytes):

Writing | #################################################  | 98% 0.65savrdude:
 stk500_loadaddr(): (a) protocol error, expect=0x14, resp=0x55

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0xe0
avrdude: stk500_cmd(): programmer is out of sync

Are you using version 1.0 of the Arduino software?

oh sorry yes version 1.0

...or switch to Arduino 0023.

tired 0023 and it worked! thank you sooo much!!!

Hey,
I had the same problem like you, I also switched to version 0023 and in worked better, but stil have some errors.

console output:

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: failed to write flash memory, rc=-4
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

any ideas? I build my "2nd" arduino with this tutorial VeroBoardUino – Last Part – Burning a Bootloader and Uploading Programs – Martyn Davis | Marengo my "real" arduino is an Uno rev 3

thanks in advice,
andi

guitar1:
I build my "2nd" arduino with this tutorial VeroBoardUino – Last Part – Burning a Bootloader and Uploading Programs – Martyn Davis | Marengo my "real" arduino is an Uno rev 3

You need to connect through the six pin ICSP header to burn the bootloader and that circuit doesn't seem to include the ICSP header.

hmm .. i dont realy know what you mean .. i connected everything exactly like in that tutorial, and the author never mentioned an/the "ICSP" header?!

the only differance, the author uses a uno rev 1 or 2 and i have an uno rev 3

i dont use an external programmer, i want to use my uno to burn the bootloader onto the atmega168 in the "2nd" arduino.

where should i connect through the icsp header?!

i dont use an external programmer, i want to use my uno to burn the bootloader onto the atmega168 in the "2nd" arduino.

where should i connect through the icsp header?!

The problem is that you don't have the icsp header. You need to look up using the Arduino as an isp, and the information exists on many site on the web. Try the search term - arduino as isp - and read several of them. they will show you what pins need to be connected and what commands to use. It requires 6 wires - from Arduino pin 10 to 168 pin 1 (reset), from Arduino pin 11 to 168 pin 17, from Arduino pin 12 to 168 pin 18, from Arduino pin 13 to 168 pin 19, from Arduino +5V to 168 pins 7 & 20, and Arduino GND to 168 pins 8 & 22 and on teh Arduino board a 120Ohm resistor between +5V and Reset.

oh - i think there is a little misunderstanding - the tutorial i mentioned discribed this, i only didn't know, that these pins are the isp pins.
my board is connected to the arduino like in this picture

and i also uploadet the "arduinoISP" sketch to the uno, also switched the IDE to the board i want to burn the bootloader to (Arduino Diecimila or Duemilanove w/ATmega168P) and the bootloader burning process starts, but the RX/TX lights of my arduino uno stoped blinking after ~15 sec, the burning process fails and i got the error messages i posted above.

guitar1:
oh - i think there is a little misunderstanding - the tutorial i mentioned discribed this, i only didn't know, that these pins are the isp pins.
my board is connected to the arduino like in this picture

and i also uploadet the "arduinoISP" sketch to the uno, also switched the IDE to the board i want to burn the bootloader to (Arduino Diecimila or Duemilanove w/ATmega168P) and the bootloader burning process starts, but the RX/TX lights of my arduino uno stoped blinking after ~15 sec, the burning process fails and i got the error messages i posted above.

I had a VERY similar problem getting started with arduino last month putting the boot loader on a few ATMEGA328PU's. I found you need to change the expected ID of the chip and then pulled out my hair trying to debug the circuit. It looks like you are trying to use the Arduino as ISP to burn the boot loader... I can't find it again, but I found one credible article on the internet saying you couldn't use the Uno (Just Older versions maybe?) as a ISP.

I resisted for a day and a half but in the end ended up making a parallel programmer really quickly and simply using the Uno as a glorified socket for the new atmega I am burning the bootloader to and plugging the parallel programmer into the ICSP header opposite the board from the power and USB plug.

One thing to remember, or so I'm told, is that you must be powered externally when burning the bootloader with the parallel programming method.

I hope this helps.

well about 2 minutes before I read your post I still got it :slight_smile:

my error was to use the ArduinoISP sketch frome the IDE 1.0 version, an burning with ther 0023 version, now I uploaded the sketch from the 0023 and i got it working :slight_smile:

but also, thank you :wink:

Can i use a arduino mega 2560 to burn a bootloader to a atmega 328 chip on a breadboard?

Yes.

not trying o be a noob but I cant seem to find a tutorial that will work. Can you point me in the right direction. I am trying to burn the "atmega328 with internal 8mhz) bootloader onto a minimalist breadboard config. I just keep getting errors. mostly not in synch resp=0x00