How to Turn Your Arduino Into an ISP

Turn your Arduino into an AVR In System Programmer. This will allow you to burn bootloaders onto new chips or program AVRs without a bootloader.



  1. Materials: To begin you will need:
  • Arduino (I will be using the Uno)
  • AVR Microcontroller (This tutorial will cover the ATtiny85 & ATmega644)
  • Arduino IDE
  • Breadboard
  • Jumpers
     2.  Setup




Before we begin programming chips we must set up the Arduino. First, make sure your Arduino IDE is up to date. Then select the File >> Examples >> ArduinoISP sketch and upload it to your Arduino. Now your Arduino is now an AVR ISP.

    3.  Using Your Arduino ISP:  Programming AVRs Without Bootloaders



There are a few instances in which it is neccesary to program microcontrollers without a bootloader. For example, if have run out of storage on a chip you can get an additional 2KB when you program without a bootloader. Another example, the one I will show you how to do, is to program chips that have no serial capabilities and therefore cannot use a bootloader. The ATtiny85 is one of these chips.

To program the ATtiny85 using the Arduino ISP you must first add ATtiny85 support to the Arduino environment:
  • Download attiny45_85.zip
  • Unzip the folder
  • Copy the folder to the Arduino IDE's Hardware folder
  • Reopen the Arduino IDE, you should see the ATtiny85 in the Tools >> Board menu
Now connect your Arduino ISP to the ATtiny85

Open the Blink sketch, change every '13' to '0', select ATtiny85 from the Tools >> Board menu, and select the serial port that is your Arduino ISP. Now click on upload and your ATtiny will begin blinking the LED once it's done.

    4.  Using Your Arduino ISP: Burning Bootloaders

What if you want to program your chip over USB without an ISP? Well then you can use a bootloader. The process of programming a bootloader onto a chip is called burning a bootloader. Let's look how you burn a bootloader onto an ATmega644 using your Arduino ISP.

To burn the bootloader to the ATmega644 you must first add ATmega644 support to the Arduino environment:
  1. 'sanguino.bootloader.file=ATmegaBOOT_644P.hex' to 'sanguino.bootloader.file=ATmegaBOOT_644.hex'
  2. 'sanguino.build.mcu=atmega644p' to 'sanguino.build.mcu=atmega644'
  • Reopen the Arduino IDE, you should see Sanguino in the Tools >> Board menu 
  • Now connect your Arduino ISP to the ATmega644 
  • Select Sanguino from the Tools >> Board menu, and select the serial port that is your Arduino ISP. Now click on Tools >> Burn Bootloader >> w/ Arduino as ISP. If there is more than one 'w/ Arduino as ISP' just try each one until it works. 
You now have an Arduino ISP and know how to use it!

* This project is taken from Internet
0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment