Unable to load bootloader

Hello everyone;
I am developing one project in which i have used ATMEGA328 (TQFP package) and before i upload my sketch in to it i want to burn the bootloader. i have tried to burn the bootloader from ARDUINO UNO as i do have any programmer with me. i am using ARDUINO IDE 2.3.2

my project consist of a ATMEGA328 (TQFP package) as well as ATMEGA16U2-MUR

I have connected ARDUINO UNO (ICSP Header )pins and ATMEGA328 pins in following manner.

**AURDINO UNO ATMEGA328
VCC (pin 7) VCC (pin 4)
GND (pin 8) GND (pin 5/21)
SCK (Pin 19) SCK (Pin 17)
MOSI (Pin 17) MOSI (Pin 15)
MISO (Pin 18) MISO (Pin 16)
RESET (Pin 1) RESET (Pin 27)

can someone please help to load the bootloader in my project.

Let's have a look at:
1: A schematic of your project
2: Clear photos of how you have everything wired up
3: If applicable, clear images of all layers of the PCB layout you've made

I moved your topic to an appropriate forum category.

Please do not post in "Uncategorized"; see the sticky topics in Uncategorized - Arduino Forum.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.

i am new on this forum but i will definitely take note of it and take care from the next time.

Thank you for the reply & information.

Kindly find attached images of schematic, wiring connection images as well as PCB layout (Red - top layer and Blue - Bottom layer) in below link.

https://www.dropbox.com/scl/fo/1i6psfk49pj7y54qghk67/ADJtH4FnLYN-fM42kAo_FNA?rlkey=8zu1ub4wmt89ub7uwncoxdrq6&dl=0

I have also uploaded ICSP header of ARDUINO UNO board as well as Custom board.

I don't think that's right. Pin 1 on the UNO is the RST of the 328P on that board. You want to be able to have the UNO 328P reset the target / slave 328PB. You can't do that the way you have it connected. Please see the notes on the reset connection here: https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/
Also double check the ICSP pin header pinout on the device as it's built; it's easy to get the orientation flipped somewhere in the process.

Your schematic + PCB layout look very decent indeed; I've not checked everything, but the aspects I did verify (mostly the 328PB RESET and SPI connections) looked fine. It's more or less an UNO clone, right?

So what is the problem?
Does it try to burn the bootloader?
Does it give any errors?
Have you selected the correct board?

No cs..?

definitely wrong. You have to get the reset of the target connected to a gpio of the "programmer" uno, not reset to reset. Usually Arduino pin 10...
(yes, this prevents you from being able to use the "obvious" 6-pin to 6-pin connector....)

1 Like

Dear rsmls, jim-p and westfw,
first of all thank you all for your kind support and guidance.
I have followed the steps which are given in https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/ .

i have done necessary changes in the wiring as well on programmer board (ARDUINO UNO) and target board (custom board). i have successfully uploaded the sketch of "Arduino as ISP" and i have connected reset pin of target board to D10 as well as D6 (i have done changes on line 73 to make reset pin 6).

after that i have selected the target board and changed the port and selected the board (Arduino UNO) and then i clicked on "burn bootloader" but in both the attempt i am getting an error message related to "Chip erase"

Error message:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03
Failed chip erase: uploading error: exit status 1

what mistake i am doing can anybody please suggest me?

To be honest, I'd just forego the Arduino as ISP thing and splurge the whole $5 on a USB-ASP device.

1 Like

As per #2 above.......

That would indicate that your computer is not communicating with the Uno programmer.
Do you have the correct port selected?
Do you have Programmer: "Arduino as ISP" selected?

yes sir, i have selected the proper port and verified two times as well as "Arduino as ISP" was also selected. in fact i have tried in another PC also but the results are the same.

i am planning to burn bootloader in one Arduino Nano which i have with me and then i will upload the sketch in to it with necessary changes.

If i succeed then i will redesign with everything with Arudino Nano on breadboard first and then on PCB.

Thank you once again sir for your kind support and help. Hopefully i will succeed this time but in case if i stuck anywhere then i will definitely take help from expert like you :slight_smile:

Best regards

The Nano uses a 328P NOT a 328PB. There is a difference.

Sure Sir,
I will take a note of it.