Arduino As ISP || Burn Hex File in AVR || Fuse in AVR || Arduino As Programmer

Introduction: Arduino As ISP || Burn Hex File in AVR || Fuse in AVR || Arduino As Programmer

About: i believe to help people and share my knowledge i always want to build creative thing some of them for learning and some of them is very useful.

...........................

Please SUBSCRIBE To my YouTube channel for more videos........

This article is all about arduino as isp.

If you want to upload hex file or if you want to set your fuse in AVR then you no need to buy a programmer, you can do it with arduino.

In this article i have uploaded hex file in atmega8 if you want to upload hex file in other AVR then understand the process and follow same steps.

........................

Step 1: Requirements

  1. Arduino uno
  2. Some jumper wires
  3. Breadboard
  4. Crystal oscillator (optional if your controller is set on external oscillator)

*** if your controller is out of the box then no need to connect Crystal oscillator this ****

Step 2: Connect Arduino With Pc

  • Connect your arduino with PC
  • Open arduino IDE and click on tools
  • Then click on board, here select arduino uno
  • Now click on port below board, here select port where arduino is connected.

***** my arduino is connected on COM2, remember your we will use it later.

Step 3: Upload Code

  • Go to the file then examples
  • Find ArduinoISP example
  • Upload ArduinoISP program
  • Now go in tools and select programmer "arduino as isp"

Don't confuse about arduino isp and arduino as isp in programmer.

Step 4: Connect Circuit

  • Here we burn Hex file and set fuse in Atmega8. Please understand the concept so you can burn hex file in any type of avr via arduino.
  • Connect the circuit as given in photo.
  • Crystal oscillator is optional if your Avr is set on external fuse, if AVR is out of the box then no need to connect this.

Step 5: Pin Out Understanding

  • As you can see in first photo there is MISO, MOSI AND SCK pin, which we will connect to the respectively 13,12,11 pin of arduino.
  • As you can see in second photo there is Reset pin which we will connect to the 10th pin of arduino.
  • In third photo you can see VCC, AVCC and GND pin, connect AVCC and VCC to 5v of arduino, GND to GND of arduino.

Step 6: Download the Zip File

  • Download the zip file given below
  • Extract the zip file

Mirror Github :

https://codeload.github.com/vishalsoniindia/Arduin...

Step 7: Find Your Controller Code

Paste your Hex file in same folder which we have downloaded, where you can see cmd.txt file.

  • Open cmd.txt file in folder
  • Copy first line which is "avrdude -c arduino -b 19200 -p xyz"
  • Type cmd at the top bar of your pc as shown in photo.
  • Here command terminal is opened
  • Paste your line and hit enter
  • In last photo you can see controlled name and controller code mine is m8 for atmega8.

Step 8: Detect Controlled

  • Copy second line in taxt file which is "avrdude -c arduino -b 19200 -p m8 -P COM2 -n"
  • Paste it in command terminal
  • Now change your com port mine is COM2 where your arduino is connected.
  • Change your controller code mine is m8.
  • Hit enter.
  • When you see some device signature and fuse ok it means your controller is detected.

Step 9: Set Fuse

  • Copy this line which is "avrdude -c arduino -b 19200 -p m8 -P COM2 -U lfuse:w:0xE2:m -U hfuse:w:0xD9:m"
  • Past it in command terminal.
  • Now change your com port mine is COM2 where your arduino is connected.
  • Change your controller code mine is m8.
  • This fuse is set on internal 8MHZ, it means you no need to connect external Crystal oscillator.
  • Hit enter.
  • Now fuse is set it is one time process no need to to next time.

If you want to change fuse then E2 is lower fuse and D9 is higher fuse, you can change it according to your requirements.

Step 10: Upload Hex File

    Before this paste your hex file in same folder, where you can see cmd.txt file.

  • Copy last line and paste it in command terminal.
  • At the last of line you can see file name, replace it with your hex file name.
  • Now change your com port mine is COM2 where your arduino is connected.

  • Change your controller code mine is m8.

  • Hit enter.

  • If you see same massage as in my third photo then your hex file is burned in AVR.

....ALL DONE....... HO HO HO..

Be the First to Share

    Recommendations

    • Teach With Tinkercad Contest

      Teach With Tinkercad Contest
    • Cheese Challenge

      Cheese Challenge
    • Fandom Contest

      Fandom Contest

    28 Comments

    0
    arafathossain.369741258
    arafathossain.369741258

    Question 1 year ago on Step 4

    If programming internal oscillator. So do I need to use extra oscillator when burn files?

    thnq....

    0
    vishalsoniindia
    vishalsoniindia

    Answer 1 year ago

    If you already set it to internal oscillator then no need to add external crystal

    0
    nazur030
    nazur030

    Reply 6 months ago

    Do i need to execute this command "avrdude -c arduino -b 19200 -p m8 -P COM2 -U lfuse:w:0xE2:m -U hfuse:w:0xD9:m" in order to use 16Mhz external crystal ?

    0
    vishalsoniindia
    vishalsoniindia

    Reply 5 months ago

    No it's for internal 8Mhz for 328p

    0
    nazur030
    nazur030

    Reply 5 months ago

    What command can we use in order to use 16Mhz external crystal ?

    0
    vishalsoniindia
    vishalsoniindia

    Reply 5 months ago

    Tell me your controller name

    0
    nazur030
    nazur030

    Reply 5 months ago

    I use Atmega88. Does it use different command at different AVR family for 16mhz external crystal ?

    0
    vishalsoniindia
    vishalsoniindia

    Reply 5 months ago

    Yes, every controller has different fuse settings, as i said in video if you watched it.
    Command for Atmega88 16Mhz external crystal :- avrdude -c arduino -b 19200 -p m8 -P COM2 -U lfuse:w:0xFF:m -U hfuse:w:0xDF:m -U hfuse:w:0xF9:m

    0
    nazur030
    nazur030

    Reply 4 months ago

    Hi, I tried to run the command above and I received an error (Content mismatch) like the attached picture.

    I noticed that you used 2 hfuse bit setup which is "-U hfuse:w:0xDF:m -U hfuse:w:0xF9:m". Is it okay to use it both in one line?

    Screenshot_5.png
    0
    nazur030
    nazur030

    Reply 5 months ago

    I see. So different MCU has different fusebit setup. Thank you so much for your explanation.

    0
    arafathossain.369741258
    arafathossain.369741258

    Question 1 year ago on Step 7

    help please. "xyz file not found" it's problem face. this problem solutions please...

    IMG_20210323_225443.jpgIMG_20210323_110840.jpg
    0
    vishalsoniindia
    vishalsoniindia

    Answer 1 year ago

    This is not a problem.
    Did you seen my video i clearly said why or read Step 7,
    If you ask already written things then people will be irritate, please ask me when you really stuck in problem,
    Watch full video and read whole Instructable.
    This xyz give you list of controller code below see your controller code and replace it with xyz, mine is m8 for atmega 8

    0
    arafathossain.369741258
    arafathossain.369741258

    Question 1 year ago on Step 10

    The file I want to burn, change the name of the file in place of the hex file name change?

    example, my burn hex file name "sun detect.hex "

    so,name change write,"sun detect.hex ""

    plz hlp me .

    and you known Bangla language ?

    0
    vishalsoniindia
    vishalsoniindia

    Answer 1 year ago

    Yes,
    You have to change name and com port as well.
    No bangali but can speak hindi and English

    0
    navbert85
    navbert85

    Question 1 year ago on Step 10

    y para leer el archivo hexadecimal en ves de grabarlo como se le aria???

    0
    vishalsoniindia
    vishalsoniindia

    Answer 1 year ago

    Can you just type in English please?

    0
    navbert85
    navbert85

    Reply 1 year ago

    and to read the hexadecimal file instead of saving it as it would be ??

    0
    vishalsoniindia
    vishalsoniindia

    Reply 1 year ago

    Not understand yet. I already translated it.
    Please write your sentences with proper line end and dots so it can translate perfectly

    0
    dave.ramsey
    dave.ramsey

    Question 1 year ago

    Hi Vishal, trying to burn bootloader on to AT90Can128. But not achieving a result. Can you assist. Dave

    0
    vishalsoniindia
    vishalsoniindia

    Answer 1 year ago

    Yes, how you are doing this please explain