Help with ATMEGA 2560 and ATMEGA 328P bootloader

Hello, I must say that I am absolutely starting as far as Arduino programming is concerned.
After several projects developed on the beadboard, since yesterday I am trying to use a standalone ATMEGA328P-PU and I am trying to load the bootloader via the Arduini MEGA2560 card.

I found and followed several schemes in different Internet forums, but I can't bring the operation to a successful conclusion.
The connection scheme is as follows:

ATMEGA 2560 ATMEGA328P (OM BREADBOARD)
PIN 10 PIN 1
5V (via Capacitor 100microF) PIN1
5V PIN7
GND PIN8
OSC 16MHZ (via Capacitor 22pF) PIN9
OSC 16MHZ PIN 10
PIN 51 PIN 17
PIN 50 PIN 18
PIN 52 PIN 19
5V PIN 20
GND PIN 22

The software part runs like this:

Loaded from File / Examples / ArduinoISP
Card: ATMEGA2560
Port: COM 3
Upload of the sketch (OK-no error)

Loading bootloader:
Card: Arduino Pro (or Arduino/Genuino one)
ATMEGA 328P processor (5V, 16MHZ) if Arduino Pro
Programmer: Arduino as ISP

The card seems to load, the TX and RX LEDs flash, but then I receive the following errors:
avrdude: stk500_recv (): programmer is not responding
avrdude: stk500_getsync () attempt 1 of 10: not in sync: resp = 0xc3
avrdude: stk500_recv (): programmer is not responding
avrdude: stk500_getsync () attempt 1 of 10: not in sync: resp = 0x44

and as a result: Complete bootloader writing.

Despite the loaded bootloader message, the errors make me think that the writing was not successful

I apologize if I wrote about the castronerie, but as I said they are still a beginner and I thank in advance anyone who can help me. :frowning:

grguido:
OSC 16MHZ (via Capacitor 22pF) PIN9
OSC 16MHZ PIN 10

Do you really have the ATmega2560's oscillator connected to the ATmega328P?

Yes it is. Why is not correct?

The ATmega328P should have its own oscillator, or else you should set the fuses to use the internal 8 MHz oscillator.

I don't know whether there is any way to share an oscillator between chips, because I would never do something like that. This is certainly not something that is done commonly. You want to have the oscillator as close as possible to the chip, which is unlikely to be possible when sharing one.