I was able to burn the bootloader to my atmega328 (no crystal connected; I used the internal 8 MHz clock). Now when I'm trying to upload sketches as shown in that tutorial, I keep getting this error:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
I've been tusseling with this quite a bit today but cannot figure out what might be causing this.
Huh. The wiring for "Minimal Circuit - Uploading" is not complete. The processor has to reset at the beginning of an upload for the upload to work. I suggest adding a reset button and trying an upload using a manual reset. Please report back if you get it working.
I just worked through this tonight and got it working. I was trying the same thing, burning the bootloader to an atmega328 (internal clock) and went through several attempts before I got it working.
Note that I was using a UNO to do this.
Try 1
Following tutorial
Result with reset jumped to pin 1:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
Try 2
boards.txt to changed
From
atmega328bb.bootloader.high_fuses=0xD9
To
atmega328bb.bootloader.high_fuses=0xD8
Re burnt bootloader
Result with reset jumped to pin 1:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
Try 3
Boards.txt changed
From
atmega328bb.upload.speed=57600
To
atmega328bb.upload.speed=19200
Result with reset jumped to pin 1:
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.
Try 4
boards.txt changed
From
atmega328bb.bootloader.file=ATmegaBOOT_168_pro_8MHz.hex
To
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
Change speed line back to
atmega328bb.upload.speed=57600
Re burnt bootloader
Result with reset jumped to pin 1:
SUCCESS
TLDR
Use the following boards.txt to burn the bootloader and upload sketches.
Follow the tutorial instructions except add a jumper wire from the Arduino boards RESET to pin 1 of the atmega when uploading sketches.
If you don't want to pop the atmega out of the Arduino board to upload sketches you can use the following instructions and boards.txt. The only caveats are that you have to erase the breadboarded atmega manually each time before uploading a sketch, and the bootloader will not be present.
Can someone please edit the tutorial to change atmega328bb.bootloader.high_fuses=0xD8, and use the correct bootloader image? I wasted 3 days trying to track this down, came here to post the solution and lo and behold, here it is.
The way it's currently written is worse than not working at all, it will actually upload the sketch once, but because the fuse value is wrong it won't work again until the chip is wiped and a bootloader is re-written.
WyvernX86:
I just worked through this tonight and got it working. I was trying the same thing, burning the bootloader to an atmega328 (internal clock) and went through several attempts before I got it working.
Note that I was using a UNO to do this.
Try 1
Following tutorial
Result with reset jumped to pin 1:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
Try 2
boards.txt to changed
From
atmega328bb.bootloader.high_fuses=0xD9
To
atmega328bb.bootloader.high_fuses=0xD8
Re burnt bootloader
Result with reset jumped to pin 1:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
Try 3
Boards.txt changed
From
atmega328bb.upload.speed=57600
To
atmega328bb.upload.speed=19200
Result with reset jumped to pin 1:
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Double check chip, or use -F to override this check.
Try 4
boards.txt changed
From
atmega328bb.bootloader.file=ATmegaBOOT_168_pro_8MHz.hex
To
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
Change speed line back to
atmega328bb.upload.speed=57600
Re burnt bootloader
Result with reset jumped to pin 1:
SUCCESS
TLDR
Use the following boards.txt to burn the bootloader and upload sketches.
Follow the tutorial instructions except add a jumper wire from the Arduino boards RESET to pin 1 of the atmega when uploading sketches.
Huh, I was wondering if a fuse was set incorrectly. Glad that got cleared up! Thank you for all the responses! I'm going to try this later today. I'll let you know if it worked for me!
Ok so I had some time today to try again. This time I tried putting the blank ATmega328P chip in the Arduino board and flashing the bootloader with the AVR Dragon. And IT WORKED!!!!
Here's what I did (sorry if some points are vague. I'd be glad to verify any confusions):
HOW TO BURN THE ARDUINO BOOTLOADER TO THE DUEMILANOVE WITH AVR DRAGON:
Place desired Atmega328P chip in the Arduino board.
Connect the ICSP header connections to the AVR Dragon ISP header as shown in the AVR Dragon User's Guide in
AVR Studio.
*I had an external 9V power supply connected to the Arduino so it wasn't draining so much power from the Dragon, but it
wasn't required.
Set the Input hex file path under Program path to
\arduino-0022\hardware\arduino\bootloaders\atmega\ATmegaBOOT_168_atmega328.hex
Make sure the fuses are set to: (in order as Extended, High, Low)
0xFD 0xDA 0xFF
The Lockbits should be: 0xCF
I set the ISP frequency to 125 kHz. This is because the chip in the board is fresh out of the Atmel manufacturing
center.
Under Auto be sure the following boxes are checked: Erase Device, Program FLASH, Verify FLASH, Program Fuses, Verify Fuses,
Program Lockbits, and Verify Lockbits
using a 2009 and burning bootloader (2009) worked, while new cpu 328 in
-- breadboard or
-- UNO board!
BUT ONLY WHEN USING ARDUINO 21 (upload, burn bootloader),
not when i used ARDUINO 22.
following
Uploading Using an Arduino 2009 Board ( as FTDI, without CPU)
using circuit
did not work.
after i added one more wire from RESET header of 2009 board to pin1 of breadboard cpu
it worked!
pls change that ArduinoUSBSerial.png, thanks