Atmega 8 bootloader Burning

Well, I’ve got a Problem: I’d like to burn a bootloader to a new Atmega.
I bought a Duelimanove-Board and of course an Atmega8.

AA)I followed these instructions: http://arduino.cc/en/Tutorial/ArduinoToBreadboard
BB)And used the Bootloader from there: http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/

What I did:
1)I copied the folder from the link BB) to arduino-0022\hardware\arduino\bootloaders
2)I put THIS to the arduino-0022\hardware\arduino boards.txt:

##############################################################

atmega8noxtal.name=ATmega8-noxtal @8MHz

atmega8noxtal.upload.protocol=stk500
atmega8noxtal.upload.maximum_size=7168
atmega8noxtal.upload.speed=38400

atmega8noxtal.bootloader.low_fuses=0xe4
atmega8noxtal.bootloader.high_fuses=0xc4
atmega8noxtal.bootloader.path=atmega8_noxtal
atmega8noxtal.bootloader.file=ATmegaBOOT.hex
atmega8noxtal.bootloader.unlock_bits=0x3F
atmega8noxtal.bootloader.lock_bits=0x0F

atmega8noxtal.build.mcu=atmega8
atmega8noxtal.build.f_cpu=8000000L
atmega8noxtal.build.core=arduino

3)Uploaded the ISP-Sketch to the 2009.
4)Wired up the Atmega (like in AA)) but didn’t connect the crystal cable (should use the internal osc)
5)Changed the Board to Atmega8-noxtal
6)Tools>Burn Bootloader>Arduino as ISP
7)ERROR: avrdude: stk500_getsync(): not in sync: resp=0x15

What did i do wrong?
PLEASE HELP!!!

You did disable reset on the Duemilanove, right?

The error looks like your PC is having trouble communicating with the ArduinoISP sketch. Try it without the ATmega8 connected. I think it should work except for a verification error.

Can't burn the bootloader

Well, I found out that there has to be a 120 Ohm resistor between 5v and reset on the 2009 while bootloading. So, i actually bootloaded my atmega8 with this bootloader: http://todbot.com/blog/2009/05/26/minimal-arduino-with-atmega8/

Then, I loaded the blink-sketch to the atmega 8 (via my sparkfun ftdi breakout board [just connectet tx/rx/vcc/gnd]) --- and it worked fine!!! :) :) :) :)

But, I can't upload sketches anymore. if i re-bootload the atmega i can upload a sketch again, but only once!!

I think i've got to connect the reset pin somehow! Am I right? but how do i have to do this?

taer:
I loaded the blink-sketch to the atmega 8 (via my sparkfun ftdi breakout board [just connectet tx/rx/vcc/gnd]) — and it worked fine!!! :slight_smile: :slight_smile: :slight_smile: :slight_smile:
But, I can’t upload sketches anymore. if i re-bootload the atmega i can upload a sketch again, but only once!!

When the bootloader is fresh it has nothing better to do than wait for a download. After you’ve uploaded a sketch the bootloader waits a fraction of a second after a reset for a download and if it doesn’t see one it goes back to the last loaded sketch.

To implement auto-reset, connect the RTS (Green) line of the FTDI cable through a 100 Ohm resistor to the Reset pin.

If you don’t have a resistor handy, hold down the reset button until you see the “Binary sketch size” message in the sketch window.

I tried the option with the button, so I could see that the reset worked. (the blinking of the led stopped for about one second)

But i still can't upload any new sketches... Maybe I pushed the reset button to early or to late. So i simply couldn't find the right moment for pushing the button.

The second option with the auto-reset function would "push" the button in the right moment for me, right? But, the problem is I don't use a ftdi cable, i use the ftdi breakout board from sparkfun: http://www.sparkfun.com/products/9716

So, there must be a possibility to auto-reset the atmega 8 with this converter, because i can upload sketches to an arduino mini with it without any problems...

Now, I just found the shematic of the arduino mini pro, and I wired up the resistor and a 0.1uF to the reset pin: http://arduino.cc/en/uploads/Main/Arduino-Pro-Mini-schematic.pdf

Well, now the atmega8 is automatically reseted when i upload a sketch (blink sketch is stopped), but instead of saving the new sketch to the atmega8 the bootloader has nothing better to do than wait for about one second and restart the old sketch...

My arduino IDE prints this error:

Binary sketch size: 850 bytes (of a 7168 byte maximum) avrdude: stk500_getsync(): not in sync: resp=0x00 avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I think the bootloader has a mistake somwhere. Are there any other arduino-bootloaders in the net which support atmega 8 with internal oscillator?

could anyone help me please?

every small hint would be very useful for me!

I haven't done what you're trying to do, so I can't tell you what you're doing wrong. But as far as I can see, the most important factor is that when the IDE starts your upload, the ATMega8 must be reset and the Duemilanove must [u]not[/u] be reset. The 'not in sync' message makes me suspect that the Duemilanove has been reset.