How to Burn the Arduino BootLoader on to a AtMega328p Chip

I had ordered some ATMega328p chips from China with the Arduino BootLoader already on them for some up coming projects, but as it turned out there was no BootLoader installed, Grrrr !!!

I have read a lot of different articles on this, and i haven't had much luck and spent a lot of time to get them working either because i'm a noob or and idiot (you decide), so i thought i'd make one of these and try and make it as easy as possible so others can benefit when making their own BareDuinos from the awesome AtMega328p chip.

Step 1: B.O.M

What you will need:

The assumption is that you have an Arduino Uno or the like already and your familiar with the IDE and uploading sketches.

I got all the materials from eBay, as the proses varies i won't put in links for the below, as i'm sure by now you can get the items cheaper than i did 2 months ago :)

1 * Atmega328p.

1 * Breadboard.

Jumper cables.

1 * 16mhz crystal.

Step 2: Wire It Up . . .

Wire up the Arduino Uno with the breadboard and the ATMega328p like the above image, don’tforget to include the 16mhz oscillator.

The generalistic error message shown above is what i get when i forgot the 16mhz oscillator.

Wiring:
Arduino Pin 13 -> chip pin 19.
Arduino Pin 12 -> chip pin 18.
Arduino Pin 11 -> chip pin 17.
Arduino Pin 10 -> chip pin 1 Reset (no Capacitor needed).

Vcc and GND too of course.

Step 3: Burn It . . .

In the Arduino IDE, Open the ArduinoISP sketch from, File > Examples > ArduinoISP.

Choose the right serial port that the Arduino is connected on.

UpLoad the sketch ArduinoISP to the Arduino Uno board.

Given you have wired it up correctly it's time to burn the bootloader.

Under Tools > Board: make sure that you select "AtMega328 on a breadboard (8 MHz internal Clock)" as shown above in the second image.

Under Tools > Programmer: make sure that you select "Arduino as ISP" as shown above.

Run Tools > Burn Bootloader.

Once that has uploaded successfully burnt to the chip you should see "Done burning bootloader." as shown above and you are done. Happy days

:)

Step 4: The End...

If you now connect a LED from pin 13 to ground, 5v to pin 20 and GND to pin 22, you should have a flashing LED which means that its now ready to be programmed.

Now on to "How to program and make a minimalistic Arduino running the internal clock" here: (https://www.instructables.com/id/BareDuino-How-to-P...)

Share

    Recommendations

    • Toys Contest

      Toys Contest
    • First Time Author

      First Time Author
    • PCB Contest

      PCB Contest

    4 Discussions

    0
    None
    ВеселинС

    4 months ago

    i can't find in a tools>board> AtMega328 on a breadboard (8 MHz internal Clock).

    there isn't board like this in my arduino ide.

    can you help me please!

    0
    None
    nagarathna m

    Question 7 months ago on Step 2

    I am trying to load bootloader for ATmega 328p but I am getting bellow error please any one can help me

    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
    1 more answer
    0
    None
    evant939012nagarathna m

    Answer 7 months ago

    First, check which serial port it is connected to. When I first used an UNO, it threw an error because I had the wrong COM port selected, saying "Problem uploading to board."

    Next, check your connections. avrdude checks to make sure what you sent is what is on the chip. If it can't read the chip then it may throw this error. Also, make sure there are no shorts or broken wires/components. If there is a short on the Tx/Rx pins it will throw off avrdude.

    Best of luck :)