Author Options:

How to use Arduino UNO as ISP to burn bootloader AND upload program to ATMEGA328? Answered


I am new with Arduinos. Well actually, I know nothing about it.
My friend bought me an Arduino UNO because he knows I like building stuff.
I have a project that I want to carry out, but I just do not know how to program an AVR!
I searched online for hours, but I can't seem to find the exact step-by-step guide I need.

Basically, I want a step-by-step guide showing how to burn a bootloader to a target AVR using an Arduino UNO, AND how to upload the program to the target AVR. (It would also be great if someone could explain to me how the hex file works... I already have all the code and the files I need for my project, and it's got a .c file, and a .hex file. I know that .c file has the C language program in it, and the hex file is the compiled program that gets put into the microcontroller, but I do not know what to do with them...)

Any help is greatly appreciated!




Thanks for the reply, but I've checked that site a multiple times before posting this question.
They already mention that it cannot be done with Arduino UNO...

Sorry, the technique works, you'll just need a capacitor :)


That's where I was confused.
I saw that link as well before.
If you were referring to the bottom picture about using the breadboard (which is what I want to do), they tell you to click 'Arduino to Breadboard' for more details, and that pretty much leads you back to the first link you posted up for me, where it says you can't do this with an Arduino Uno..

You can definitely do this, I've done attiny85's and the atmega328 isnt going to be any different.

You just need the cap (or resistors can do it as well)

So the same configuration can be used to burn the bootloader AND to upload the program to the chip?
That's another thing I was confused about. Does the way things get set up (the circuit) need to change when I am burning the bootloader vs. when I am uploading the code..

yes, you just set the programmer to be "arduino as isp"

This may help as its a bit more visual