Offline
Jr. Member
Karma: 0
Posts: 61
|
 |
« on: December 25, 2011, 01:57:54 pm » |
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!
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #1 on: December 25, 2011, 02:12:58 pm » |
Using Arduino 1.0?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 61
|
 |
« Reply #2 on: December 25, 2011, 02:17:27 pm » |
I bought this off ebay few days back. how can I tell if it's 1.0?
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 96
Posts: 6368
|
 |
« Reply #3 on: December 25, 2011, 02:18:22 pm » |
Did you remember to disable auto-reset on the Arduino Uno?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 61
|
 |
« Reply #4 on: December 25, 2011, 02:20:26 pm » |
Yea I put a 110 ohm resistor from reset pin to 5v..I didn't have 120 ohms.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 61
|
 |
« Reply #5 on: December 25, 2011, 02:45:41 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #6 on: December 25, 2011, 02:47:49 pm » |
Are you using version 1.0 of the Arduino software?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 61
|
 |
« Reply #7 on: December 25, 2011, 02:50:42 pm » |
oh sorry yes version 1.0
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 118
Posts: 10153
|
 |
« Reply #8 on: December 25, 2011, 03:07:37 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 61
|
 |
« Reply #9 on: December 25, 2011, 03:13:28 pm » |
tired 0023 and it worked! thank you sooo much!!!
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #10 on: January 22, 2012, 01:12:48 pm » |
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 http://www.martyndavis.com/?p=188 my "real" arduino is an Uno rev 3 thanks in advice, andi
|
|
|
|
|
Logged
|
|
|
|
|
Massachusetts, USA
Offline
Tesla Member
Karma: 96
Posts: 6368
|
 |
« Reply #11 on: January 22, 2012, 02:18:24 pm » |
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
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #12 on: January 22, 2012, 02:34:05 pm » |
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
God Member
Karma: 8
Posts: 976
|
 |
« Reply #13 on: January 23, 2012, 02:13:59 pm » |
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
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #14 on: January 23, 2012, 02:27:26 pm » |
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
|
|
|
|
|
|