Hi. I am programming an Atmega 328 that already has Arduino boot loader on a breadboard. I do not use an external oscillator. I use the 8MHz internal clock and set the Arduino IDE board to "Atmega328 on a breadboard (8MHz internal clock)".
I am using an FTDI board with a USB cable to my computer to program the chip. I use the DTR pin on the FTDI board through a .1uF capacitor to the reset pin on the Arduino and it is working as expected with a nice charge curve after it gets pulled low by the FTDI chip. The reason I mention this is that this is the most recent thing I have changed. I used to simply pull the reset pin low manually every time I uploaded code to it.
The problem I am having is that occasionally I get this error message when I upload code to the chip:
avrdude: stk500_paged_load(): (a) protocol error, expect=0x10, resp=0xcc avrdude: stk500_cmd(): programmer is out of sync
It still successfully uploads the new code even though the error pops up. I have verified this by displaying a new message using the serial print.
I am curious as to what is causing this because it might prove problematic later on.
Does someone know what is going on?