Sunday, 28 February 2016

Program Arduino Nano via Uno with ICSP




Hello Friends,

            In this tutorial, I have shown that how can you program Nano via Uno. As you can see in the above image, my Arduino Nano's USB female pin is broken. So I have to find a way to upload the sketch to it some way. One day I was Google-ing, I have read somewhere that an Arduino board can also be programmed via another Arduino board. 


Tools you will Need :

  1. Arduino Uno ( which will act as a programmer ).
  2. Arduino Nano ( to be programmed ).
  3. Jumper Cables ( Some male-male, male to female )
  4. Breadboard


Step 1: Preparing programmer

             Attach your Arduino Uno to PC. & go to File > Examples > ArduinoISP > ArduinoISP

A sketch will open, upload it on Uno. When uploading is done. unplug it from the PC. Now, Attach Uno & the board you want to program with jumper cables just like the image below.


In the above image, you can see a small (1) or (*) or (.) is marked near the ICSP headers, that is the 1st pin of ICSP headers.

  • D13 to SCK, 
  • D12 to MISO, 
  • D11 to MOSI, 
  • D10 to RST, 
  • 5V to VIN
  • GND to GND

Note: If your board's operating voltage is 3.3V then use 3.3V instead of 5V.


Step 2: Preparing Arduino IDE

                
            All wiring is done. now we have to do some settings in IDE.

  • Go to Tools > Board & select Arduino Nano.
  • In Processor, select ATmega328.
  • & In Programmer, select Arduino as ISP. ("Arduino as ISP" not "ArduinoISP")
The settings is done.
  • Now, open up the sketch you want to upload on your Nano,
  • In Menu, go to Sketch & click on "Upload using Programmer"
IDE will compile the sketch & upload it to your Nano. The RX TX LEDs will blink rapidly on both boards, & you will see done uploading.

If not, then recheck all the wiring & settings.

If you get any problems or you want to give me suggestions, you can write in the comment section below.
Happy Programming ^_^


Thank You.

18 comments:

  1. hello
    i tried this but not working i don't know the problem

    ReplyDelete
    Replies
    1. first of all check all the wiring...

      Delete
    2. When opening your example sketch arduinoISP
      go down through the program and uncomment the line number 81
      #define USE_OLD_STYLE_WIRING
      it will work fine

      Delete
  2. Thanks alot
    You brought a new life to one of my nanos whitch had its usb port broken

    ReplyDelete
  3. This does not work for the elegoo nano

    ReplyDelete
  4. My igot
    Invalid device signiture oh my

    ReplyDelete
  5. Well Done !
    Nice Job, Thank to share this Tuto.
    It work with my Nano Clone. I use it because this Nano can't conneced to all PC... And now i can use it ;-)
    Thanks again
    Hevrve T (Form France)

    ReplyDelete
  6. I am trying to program atmega328p au using arduino uno icsp.. It is showing error.. I selected promini as a board.

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. You can skip this step. "Attach your Arduino Uno to PC. & go to File > Examples > ArduinoISP > ArduinoISP"

    ReplyDelete
  10. Thank you you saved me having to wait for a new cable to program my Arduino board! thank you! TY!

    ReplyDelete
  11. Hey it worked I used the nano as the programmer for my unorev3...for some strange reason the uno boards weren't reading com ports so I tried the updates nothing working but this did thank you💪🏾

    ReplyDelete
  12. Great and that i have a keen offer you: Full House Reno home restoration companies

    ReplyDelete