[SOLVED] Upload to stand alone Atmega328 Using Arduino Uno SMD edition


I'm quite new to programming AVRs. I managed to upload the bootloader to my Atmega328 by using these tutorials:

  1. http://arduino.cc/en/Tutorial/ArduinoToBreadboard
  2. http://arduino.cc/en/Tutorial/ArduinoISP

Now want to upload a sketch to it. I had already managed to upload sketches to Attiny's before, but when I try to use the Arduino as ISP programmer to program the Atmega328 it gives an error "avrdude: stk500_getsync(): not in sync: resp=0x00". The error LED controlled by the "mega-isp" sketch also starts burning. Maybe i'm doing something wrong here, perhaps programming it with the Arduino as programmer is impossible when the bootloader is already burned to the chip??

The first tutorial says that the Atmega chip needs to be removed and then the stand alone Atmega can be programmed via USB by connecting it to digital pins 0 and 1. Removing the atmega is more or less impossible with the SMD edition of the UNO, so is there any other solution to use the arduino as programmer?

Unless you have the TxData and RxData pins of your mcu linked to the PC either through RS232 or through an FTDI chip and USB, then you can’t upload via the bootloader. But you don’t need to, you can upload via ICSP instead. It shouldn’t matter that you have already uploaded the bootloader. Use the same connections as for uploading the bootloader, and upload your sketch using the “Upload using programmer” menu option.

If you can’t get it to work, try uploading the bootloader again to check whether your fuse settings are compatible with the mcu clock you are using. If you find that you can’t upload the bootloader any more, then either you burned the wrong values for the fuses, or your clock isn’t working - perhaps because of shorts on the crystal pins of the mcu or the wrong value capacitors connected to those pins.

Thanks! That's what I was doing wrong. I used the upload button instead of the menu option "Upload using programmer".