Introduction: Bootloader on ATMEGA328P-PU


In questo articolo faremo l'upload del bootloader in un ATMEGA328P-PU utilizzando un Arduino Mega 2560.

In this section we will upload the bootloader to the ATMEGA328P-PU using an Arduino Mega 2560.

Step 1: Materials

  • ATMEGA328P-PU;
  • Arduino Mega 2560;
  • Oscillatore (4/8/10/16 MHz);
  • 2 condensatori da 22pF;
  • Cavi.
  • ATMEGA328P-PU;
  • Arduino Mega 2560;
  • Oscillator (4/8/10/16 MHz);
  • 2 condensator 22pF;
  • Wires.

Step 2: Software

Scaricare ed estrarre il file zip dal seguente link: https://github.com/nickgammon/arduino_sketches .

Dopo aver estratto il file, spostarsi nella cartella dell' IDE Arduino e creare una nuova cartella come libreria avente un nome a vostro piacimento (ad esempio il mio percorso nella quale devo creare la nuova cartella sarà C:\Program Files (x86)\Arduino\libraries).

Download and extract the zip file from the following link https://github.com/nickgammon/arduino_sketches.

After extracting the file, move to the Arduino IDE folder and create a new folder as a library with a name of your choice (for example my path in which I have to create the new folder will be C: \ Program Files (x86) \ Arduino \ libraries).

Step 3: Arduino ISP

Ora collega l'Arduino Mega 2560 al tuo PC e attraverso l'IDE Arduino vai su File>Esempi>ArduinoISP e Carica lo sketch (Assicurati di aver scelto la giusta tipologia di scheda e la giusta porta su "Strumenti").

Now connect the Arduino Mega 2560 to your PC and through the Arduino IDE go to File> Examples> ArduinoISP and Load the sketch (Make sure you have chosen the right type of card and the right USB door on "Tools").

Step 4: Connections

Effetturare i collegamenti come illuistrato nella figura soprastante.

Make the connections as shown in the figure above.

Step 5: ATmega Detector

Vai sulla cartella che hai scaricato dal link precedente, apri lo sketch Arduino_Board_Detector.ino, vai su Stumenti>Programmatore e cambialo in "Arduino as ISP", successivamente carica lo sketch andando su Sketch>Carica tramite un programmatore (oppure premi contemporaneamente Ctrl+Maiusc+U).
Apri la comunicazione Seriale (lente d'ingrandimento in alto a destra) e segui le istruzioni.

Go to the folder you downloaded from the previous link, open the sketch Arduino_Board_Detector.ino, go to Tools> Programmer and change it to "Arduino as ISP", then load the sketch going to Sketch> Load with a programmer (or press simultaneously Ctrl + Shift + U).

Open the Serial communication (magnifying glass top right) and follow the instructions.

Step 6: ATmega_Board_Programmer

Dopo aver svolto le operazioni indicate dalla comunicazione seriale ed aver concluso con successo, apri lo sketch ATmega_Board_Programmer.ino scaricato nella cartella "arduino_sketches-master" dal precedente link e caricalo come il precedente (Ctrl+Maiusc+U), svolgi le operazioni nella comunicazione seriale (Scegliendo se usare 8Mhz o 16Mhz ad esempio).

After performing the operations indicated by the serial communication and having successfully completed, open the sketch ATmega_Board_Programmer.ino downloaded in the "arduino_sketches-master" folder from the previous link and load it as the previous one (Ctrl + Shift + U), perform the operations in the serial communication (choosing whether to use 8Mhz or 16Mhz for example).