Pages: [1] 2   Go Down
Author Topic: Burning bootloader  (Read 2688 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
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!
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 208
Posts: 12939
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Using Arduino 1.0?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8860
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
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
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 208
Posts: 12939
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Are you using version 1.0 of the Arduino software?
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh sorry yes version 1.0
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 208
Posts: 12939
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


http://arduino.cc/forum/index.php/topic,84095.msg631631.html#msg631631

http://arduino.cc/forum/index.php/topic,84095.msg632561.html#msg632561

...or switch to Arduino 0023.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
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 http://www.martyndavis.com/?p=188 my "real" arduino is an Uno rev 3

thanks in advice,
andi
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8860
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I build my "2nd" arduino with this tutorial http://www.martyndavis.com/?p=188 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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?!
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset 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.
Logged

Pages: [1] 2   Go Up
Jump to: