diy atmega8 arduino not uploading. please help!

When i found the http://arduino.cc/en/Tutorial/ArduinoISP tutorial i wanted to make my own stand alone arduino.
I bought a couple of atmega8s and put the bootloader on them with my arduino mega2560.
That worked fine and i can see the bootloader working on my diy arduino.(three flashes of the led).
But i cant get it to upload a sketch to it.
When i try to upload it's saying: avrdude: stk500_getsync(): not in sync: resp=0x00
Does anyone know how to get it working propperly?

The complete diy arduino is based on : http://arduino.cc/en/Main/Standalone

thanks for looking into it!

Need a little more information... Which USB2UART are you using? Which board did you use?

Here is the Old Version (boards.txt)

atmega8.name=Arduino NG or older w/ ATmega8

atmega8.upload.protocol=arduino
atmega8.upload.maximum_size=7168
atmega8.upload.speed=19200

atmega8.bootloader.low_fuses=0xdf
atmega8.bootloader.high_fuses=0xca
atmega8.bootloader.path=atmega8
atmega8.bootloader.file=ATmegaBOOT.hex
atmega8.bootloader.unlock_bits=0x3F
atmega8.bootloader.lock_bits=0x0F

atmega8.build.mcu=atmega8
atmega8.build.f_cpu=16000000L
atmega8.build.core=arduino
atmega8.build.variant=standard

But, if you used Optiboot you are going to need to create an Atmega8-UNO entry.

Pictures of you project can be helpful :slight_smile:

thanks for your reply!

I used my arduino mega2560 to bootload the atmega8.
I made some pictures but i don't know how to upload them here.
for uploading my sketches I use: CP2102 USB to TTL Converter Module which i bought from here: Jtron 2272-M4 Non-lock 4-Way Wireless Remote Control Module w / Receiving Panel - Free shipping - DealExtreme

is it possible I somehow burned out my atmega?

I used my arduino mega2560 to bootload the atmega8.

Okay... so you used the Arduino as ISP? Which board did you select (i.e. which bootloader did you put on the ATmega8?)?

I made some pictures but i don't know how to upload them here.

The little arrow with the orange text "Additonal Options..."

CP2102 USB to TTL Converter Module which i bought from here:

Cool, at least this CP2102 has the DTR/RST broke out. Did you install the driver?

Did you put a 0.1uF capacitor between RST on the USB2UART and pin 1 on the Atmega8? This allows the auto-reset, other than that, you will have to use the reset button just before the upload (when the sketch size appears).

is it possible I somehow burned out my atmega?

It is always possible :wink: But I do not think we can make that determination, unless you have already release the "blue smoke" from the chip.

I uploaded the isp sketch on my Mega2560 and then selected the atmega8 as board. for programmer is choose arduino as isp.
after that i burned my bootloader.

I did use the RST pin but from now i will! thanks for the suggestion!
I installed the exact driver you were reffering to.

luckily I haven't seen blue smoke yet so it should be able to work :slight_smile:

I added two pictures of my PCB and the used hardware.

thanks for the support!

No problem.

Also, you might want to put a 0.1uF from VCC-GND, AVCC-GND and AREF-GND close to the ATmega8. It will help with high frequency noise devices can generate.

i made the changes u suggested. i now use the RST pin and added 0.1uf capacitors.
i am still no able to upload anything to the atmega8.

any idea what could be the cause of that?

I can not tell how the USB2UART is hooked up, but if the breakout board is silked correctly, it should be as follows:

3.3V - (Not connected)
RST - Atmega pin 1 thru 0.1uF cap
TX0 - Atmega pin 2 (RX0)
RX0 - Atmega pin 3 (TX0)
GND- Ground
5V - Vcc

I see this USB2UART has a PWR and TX LED, is there any activity on the TX when you upload?

i tried it a couple of times like that but it's not working.
the USB2UART i'm using is slitchly different than the one in the link.
it is the one i ordered but apperently it has changed.
mine doesn't have a TX led.

Well that is unfortunate. Lets try a manual reset. When you press the upload button and the IDE compiles the sketch, press and hold the reset button down until the Binary Sketch Size: 1,234 bytes appears in the IDE window and then release the reset button. There is a fussy timing of this, so a few tests may be needed (delaying release 100-500ms after the Binary Sketch Size). Some people prefer just pressing it when the Binary Sketch Size appears.

It is a little easier with both RX and TX leds.

after trying all you have said i found out that my USB2UART was wrong.
The TX and RX outputs where wrong. By changing the cables it's working now!
thanks for all the help!

René

Yeah, some of those boards are silked wrong. This would number three that I heard of.

Enjoy.