Use Uno to program ATMega328P-PU

Hi,

I've been searching hi and lo but could not find a proper solution. I bought 3 ATMega328P-PU with Arduino bootloader only to find out that I'd have to use an external quartz as a clock source.

I then followed the following tutorial to upload a bootloader that would make the ATMega use its internal clock: Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board

The board detector tells me the ATMega is fine after burning the new bootloader.

I then uploaded the ArduinoISP sketch to the Uno, selected "Arduino as ISP" as programmer and "LilyPad Arduino w/ ATMega328" as the board and wired things up as described in the bottom left picture here: http://arduino.cc/en/Tutorial/ArduinoISP

When I try to upload the "Blink" sample I get varying error messages:

  • Programmer not responding
  • avrdude: stk500_getsync(): not in sync: resp=0x00
  • avrdude: stk500_getsync(): not in sync: resp=0x1c

I've also tried to add a resistor between VCC and PIN 1 of the ATMega. I also tried to add a capacitor between RESET and GND on the Uno (as required to program ATTiny45s, which I've done successfully before).

What am I doing wrong? Is there some tutorial that I've missed so far?

ANY help is really appreciated.

PS: I've tried both 1.0.4 and 1.0.5+r2 of the Arduino environment.

tdittmar:
I then uploaded the ArduinoISP sketch to the Uno, selected "Arduino as ISP" as programmer and "LilyPad Arduino w/ ATMega328" as the board and wired things up as described in the bottom left picture here: http://arduino.cc/en/Tutorial/ArduinoISP

The lilypad normally uses a serial port programming so that's what the IDE is trying to use.

You should be able to upload using the "Upload using programmer" option of the file menu. If that works then you can hack your boards.txt file to change the 'lilypad' entry to use ISP programmer instead of serial port.

Thank you very much for your fast reply. :slight_smile:

I'll try this tonight when I get home and post the results here.

fungus:
You should be able to upload using the "Upload using programmer" option of the file menu.

Thank you so very much! That was the key hint. I never actually noticed this menu item until you mentioned it.