error uploading compiled sketch to arduino nano

I bought 2 x arduino nano 328p from seperate sellers on amazon. when uploading a simple blink sketch to one of the boards I get all sorts of uploading errors like:

" avrdude: stk500_program_enable(): unknown response=0xfc * avrdude: initialization failed, rc=-1* * Double check connections and try again, or use -F to override* * this check.* * An error occurred while uploading the sketch* "

when my board is connected correctly and i have installed appropriate drivers and the board shows up in the device manager as well.

next when reset the board and uploading again i get the error:

" avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc avrdude: loadaddr(): (b) protocol error, expect=0x14, resp=0xfc avrdude: loadaddr(): (b) protocol error, expect=0x14, resp=0xfc avrdude: stk500_recv(): programmer is not responding avrdude: stk500_recv(): programmer is not responding avr_read(): error reading address 0x0001 * read operation not supported for memory "flash"* avrdude: failed to read all of flash memory, rc=-2 the selected serial port avrdude: failed to read all of flash memory, rc=-2 does not exist or your board is not connected "

the board is connected and seems to comunicate indecated by blinking tx and rx led's.

when I change the port to which the board is connected I get this error: " avrdude: arduino_read_sig_bytes(): (a) protocol error, expect=0x10, resp=0xfc avrdude: error reading signature data for part "ATmega328P", rc=-3 avrdude: error reading signature data, rc=-3 avrdude: error reading signature data, rc=-3 "

the signatures in the avr.config file of the 328p board are correct in my ide still i get these errors. (some one on the forum sugested this to someone else on the forum)

when the same ( or any other) sketch is uploaded to the other board it uploads and works correctly.

i am just a beginner and dont know anything about these errors please help. (my first time on the forum)

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link that will allow you to make the attachment.

That will give us a little bit more information that might help us find a solution to your problem.

Arduino: 1.8.12 (Windows 10), Плата:“Arduino Nano, ATmega328P (Old Bootloader)”

Скетч использует 924 байт (3%) памяти устройства. Всего доступно 30720 байт.
Глобальные переменные используют 9 байт (0%) динамической памяти, оставляя 2039 байт для локальных переменных. Максимум: 2048 байт.
Произошла ошибка при загрузке скетча
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xa8
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xa8

Этот отчёт будет иметь больше информации с
включенной опцией Файл → Настройки →
“Показать подробный вывод во время компиляции”

Maybe try the "328P" option instead of the "old boot loader" option

@sterretje I tried that as well.

Now the second board also has the same problem.

My guess is that this occurs when you accidentally short the vin and gnd when it is powered by the usb. This happened with the second board when I accidentally did that.

Is there any what I could reset it or Replace any components?

mnopuqr: My guess is that this occurs when you accidentally short the vin and gnd when it is powered by the usb.

That definitely is not a good thing.

Here is my stock advice for people getting the latest error output you posted:

Remove any connections to pins 0 and 1 on your Arduino board. These pins are used for communication with your computer, including uploads. Connecting anything to these pins can interfere with uploads.

Make sure you have selected the port of your Arduino board from the Tools > Port menu.

Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don’t know which port is your Arduino, you can find it like this:

  • Unplug your Arduino board from the computer.
  • Tools > Port
  • Note the ports, if any, listed in the menu.
  • Close the Tools menu. The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  • Plug your Arduino board into the computer.
  • Tools > Port - The new port listed in the menu is your Arduino board.

@pert

I have tried all basic things including what you have said . But I frequently get the avrdude: stk500_getsync() Error non the less.

The board was not powered by a external power supply, just the usb port, When the vin and gnd pins got short.

The board still powers on and a previous Blink sketch gets executed but no new sketch can be flashed.

Frequently, or always?

Always an error. But they change every time. Some times a avrdude: stk500_getsync()

And all other times a avrdude: error reading signature data, rc=-3

The only other thing I can suggest is for you to try burning the bootloader. However, be warned there is no guarantee this will fix the problem.

You will need an ISP programmer. If you don’t have a programmer, you can use a spare Arduino board as an "Arduino as ISP" programmer. Although the "Arduino as ISP" only works for programming targets of the AVR architecture, you can use boards of any architecture as an "Arduino as ISP" programmer.


The following instructions are for using an Arduino board as an "Arduino as ISP" programmer. If you have a dedicated programmer, you can skip to the next set of instructions.

Make the following connections between the Arduino board you will be using as the programmer and the target. Refer to the "Connections" table on the SPI library reference page to determine the pins:

| Programmer | | Target | | - | - | | ----------- | |------- | | MISO | | MISO | | ----------- | |------- | | VCC | | 5V | | | | (VCC on 3.3 V boards) | | ----------- | |------- | | SCK | | SCK | | ----------- | |------- | | MOSI | | MOSI | | ----------- | |------- | | 10 | | RESET | | ----------- | |------- | | GND | | GND |

Connect the programmer board to your computer with a USB cable.

File > Examples > 11.ArduinoISP > Arduino ISP

Select the port of your board from the Tools > Port menu.

Sketch > Upload

Wait for the upload to finish.

You are now ready to burn the bootloader using your "Arduino as ISP" programmer.


Instructions for burning the bootloader:

  • Connect an ISP programmer to the ICSP header on your Arduino board.
  • Select the target board from the Tools > Board menu and any other custom Tools menus (e.g. Tools > Processor).
  • Select the appropriate programmer from the Tools > Programmer menu.
  • Tools > Burn Bootloader
  • Wait for the process to finish successfully.

Note: only the Arduino IDE has Burn Bootloader functionality. It is not possible to do this via Arduino Web Editor or arduino-cli.