Error when trying to burn the bootloader of a new AtMega328p

Hi, hello. I'm having trouble of burning the bootloader of a new AtMega328p that I bought on amazon, I'm trying to do it with 2 arduino uno, as I saw in some youtube videos. But I'm reciving this error:
image

I don't know what am I doing wrong, can please somebody help me? :pray:

which?
and why you think you must burn bootloader?

1 Like

I think I have to burn bootloader the new AtMega328p because I have to re-program it, because if I try to use it on an arduino it doesn't work, meaning it doesn't have the code for making arduino work

you got 2 arduino, both not working, so how you plan to use one for programming other ?

What I tried to mean is that I was trying to use 2 arduino uno, one with the chip to program it and the other with a working chip, so I have 1 working arduino and the other not, I apologize if I explained myself poorly earlier

the working one is with ArduinoISP sketch uploaded and correct to the target connected. show.

The sketch is uploaded in the arduino that works, and this is how i connected the cables.

From the Arduino that works: pin 13 to pin 13 of the target. pin 12 to pin 12 of the target. pin 11 to pin 11 of the target. pin 10 to pin named reset of the target. Then 5v and GND to their correct position.

good. black board is "Arduino as ISP"(it have ArduinoISP sketch uploaded), green is the target. you connect black to USB, select option Programmer -> Arduino as ISP, select board: Arduino UNO, click "Burn Boottloader", after success you disconnect green board and connect it to PC with USB cable.
right ?

The error appears right after I click "Burn Bootloader", it doesn't give me the succes, it just gives me the error
image

you forgot to select COM port where black board is enumerated.

That is the right port. I checked, and the "other" one that appears doesn't work. sometime this black one gives me some troubles, so I can try to change it. But even changing arduino (with the right sketch on it and everything) it doesn't burn bootloader.

last chance: swap MCU IC from green to black and program normally (thru simple Upload click)

you mean that i should try to upload with a working chip with the green one? if is this, I already done it and it works

green may be destroyed already
изображение

oh right, I'll do it and I will give you an answer in a few minutes, now I have to do a stuff that I got requested

not clear. you took MCU from black and put to green and then connect green to PC, try to upload, it was successful, or what?
ok, if it was success, then do otherwise: take MCU from green and check if it working inserted in black board.

I swapped them. The chip that works (from the black one) works fine on the green one, but the chip that was on the green one doesn't work on the black one

you see, chip from green is damaged

oh perfect.. now i have to search for a new one then :joy: Thanks you a lot for the help that you gave me :pray:

If the "troubles" you mention is either one of the following:

  • "avrdude: ser_open(): can't set com-state for "\.\COM5"" error while uploading (as shown in your screenshot)
  • "Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM5 serial port." error when Serial Monitor is open in Arduino IDE

There is a known workaround for the problem that causes those specific error messages when using certain Arduino derivative boards like your "ELEGOO UNO R3" and we'd be happy to share it with you if you are affected by that problem.