I have been trying to upload bootloader on ATmega328P SMT package on a custom PCB using Arduino Uno as ISP, I was quite successful.

I have Googled a lot and have tried numerous ways, sometimes I was able to successfully upload the bootloader, but I am not able to upload the sketch am getting "avr sync error".

  • What kind of bootloader should I use for this particular package?

  • How should I upload the sketches into the chip?

  • Are you using a serial converter to upload the sketch? Aug 24, 2014 at 16:57
  • I removed the chip on arduino uno and tried uploading sketchs using tx ,rx and reset pin.
    – srinivas
    Aug 24, 2014 at 17:13
  • Are you using a bootloader for the Uno, e.g. Optiboot? Aug 24, 2014 at 17:31
  • I am using optiboot(arduino duemilanove or nano w/atmeg328) as bootloader i also tried optiloader.I was able to upload the bootloader on both the methods
    – srinivas
    Aug 25, 2014 at 2:34
  • Well, okay, but you need to behave like an Uno, since you're using an Uno as the frontend. Aug 25, 2014 at 2:35

1 Answer 1


I've had success with bootloader of the Arduino IDE. I used to have some trouble uploading sketches, but I solved them by doing this:

  1. If the atmega is already soldered in a pcb and you have a pull up resistor, or something else connected to the reset pin, disconnect it. reset pin must be free.
  2. Connect the tx, rx and rst pins of your atmega to your arduino.
  3. Press the Upload button in the Arduino IDE and see the leds tx,rx in your arduino, just after the first blink, press the reset button, after that both of the leds should start blinking and in the end your code should be uploaded.
  • I tried removing the pull up resister on my pcb still my atmega is not talking back the rx pin is not blinking
    – srinivas
    Aug 25, 2014 at 2:36
  • hmm, I missed something obvious... you are powering the atmega with 5v, right?
    – ehilario
    Aug 25, 2014 at 3:19
  • yes am power it up with 5v from the arduino board
    – srinivas
    Aug 25, 2014 at 3:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.