Tutorial: How to use the ArduinoISP Deluxe Shield

Dec 23, 2012 by     12 Comments    Posted under: Arduino, Tutorials

Introduction

This tutorial will show you how to upload the Blink example sketch to an AVR microcontroller using the ArduinoISP Deluxe Shield v2.5. If you need the instructions for a previous version of the shield, you can find them here: v1.0 & v2.0. You can verify the version of your shield by checking the version number printed on the shield or by colour: v1.0 shields are red, v2.0 shields are green, and v2.5 shields are black.

If you have not already installed additional hardware support files for ATtiny microcontrollers, you can get them from here. Installation instructions are included in the readme.txt file.

Steps

1. Plug your Arduino into your computer. Open up the Arduino IDE and then open ArduinoISP sketch from the File > Examples menu.

IMG_6713

ArduinoISP_Deluxe_Instructions_1

2. When the ArduinoISP sketch is finished uploading, unplug your Arduino and plug the ArduinoISP Deluxe shield in.

IMG_6714

3. Set the Auto Reset jumper to “OFF.” In the “OFF” position, sketches will be uploaded to the microcontroller in the ZIF socket instead of the ATmega328 on the Arduino.

IMG_6718

4. Set the switches and jumpers according to the microcontroller you wish to program. Ensure that only the relevant bank of switches is ON and all others are OFF. The image below shows the switch/jumper configuration for programming an ATtiny 24/45/85.

IMG_6720

Warning: be sure the jumpers and switches are set properly before inserting your microcontroller. Failure to do so may result in damage to your Arduino, the shield, and the microcontroller.

5. Insert your microcontroller into the ZIF socket, with pin 1 in the left-most contacts. Make sure that the dot or half-circle is facing the LEFT. See the photos below for clarification. Make sure that you insert your microcontroller properly, or you may damage the Arduino, the shield, and the microcontroller.

IMG_6722

IMG_6723

6. Plug the Arduino back into your computer.

7. Open up the Blink sketch from the File > Examples > 01.Basics menu.

ArduinoISP_Deluxe_Instructions_2

8. In the Blink sketch, change the led pin from pin 13 to either:

  • Pin 1 for ATtiny24/44/84/2313/4313 or ATmega mircocontrollers

or

  • Pin 4 for ATtiny13/25/45/85 microcontrollers.

ArduinoISP_Deluxe_Instructions_3

9. Change the board under the Tools > Board menu to the microcontroller that you will be using.

Note: for ATtiny microcontrollers, you will have to use the internal clock (either 1MHz or 8MHz) as there is no external clock source available on the shield. If you choose a different value then you may not be able to program the microcontroller with this shield again. ATmega microcontrollers can make use of the 16MHz crystal on the shield. If you are trying to program an ATmega328, you can select “Arduino Uno” as the board.

ArduinoISP_Deluxe_Instructions_4

10. Under the Tools > Programmer menu, make sure you have “Arduino as ISP” selected.

ArduinoISP_Deluxe_Instructions_5

11. If you are using a brand new microcontroller that has never been programmed before, then you will need to set the fuses on it and / or burn the Arduino bootloader to it. If you are not using a new microcontroller or have purchased one with a bootloader pre-loaded, then skip to step 12. If you are unsure, then just follow this step.

The fuses on a microcontroller are used to control things like clock speed, clock source, brown-out detection, etc. If you’d like a more technical explanation of AVR fuses, you can read a little more about them here, but in this tutorial we’ll just be using the default fuse settings. To set the fuses / upload the bootloader, you simply go to the Tools menu and select “Burn bootloader.” This process may take about 20 seconds.

ArduinoISP_Deluxe_Instructions_6

12. After setting the fuses, you can now upload the blink sketch. Go to File > Upload Using Programmer to upload the sketch.

Note: when programming an ATtiny microcontroller, you can simply use the regular “File > Upload” to upload your sketches. ATmega microcontrollers require you to use “Upload Using Programmer” or else it will try and upload your sketch to the Arduino your shield is plugged into.

ArduinoISP_Deluxe_Instructions_7

And that’s it! You should now see the “Blink” LED flashing.

Programming Notes

  • When your sketch is uploading to the microcontroller, the blue “Prog” LED on the shield will light up / flash. When it goes out, the upload is complete.
  • The “Error” LED will blink if there is an error during the upload.

Note: You may encounter the following error when uploading a sketch, but feel free to ignore it:

avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

If you encounter any other errors, double-check that you have all of the proper jumpers set. Also be sure that you have the microcontroller inserted properly into the ZIF socket, and that the shield is securely inserted into the Arduino.

12 Comments + Add Comment

  • I am trying to program an ATTiny2313 using the ArduinoISP Deluxe 2.5 and have been able to load the sketch to the arduino, then change the board to ATTiny2313 and LED PIN in the sketch, but when I upload the sketch, I get the following error. (I have the 2313 library.)

    ERROR COMPILING.

    In file included from Blink.ino:10:
    /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:213:26: error: pins_arduino.h: No such file or directory

    The heartbeat LED is throbbing, but no blinking LED.

    Any insight is appreciated.

    • What cores are you using for the ATtiny2313?

  • Well, it seems I have the arduino core. Here is an image of my Arduino
    http://i.imgur.com/EvlkI.png

    and here’s my sketchfolder with the attiny cores. Are the cores meant to located in the correct place?
    http://i.imgur.com/g9Z8k.png

    TIA,
    D

    • Hey David,

      Sorry it took so long to reply, I’ve been insanely busy with work and your comment notification email got lost in my inbox.

      I don’t think you have downloaded the correct cores. I recommend downloading the ones from the Arduino-Tiny project here:

      http://code.google.com/p/arduino-tiny/downloads/detail?name=arduino-tiny-0100-0015.zip

      Download those and install them in your Arduino/hardware/ folder and try the “Attiny2313 @ 8 MHz” option under Tools > Boards.

  • Arrived very promptly. Soldered on pins plugged in atmega328p set pins. Uploaded bootloader
    and had heartbeat. This works great so far only have had one style mcu but will be trying 2313 real soon. I am thrilled about this because i have tried designing 3 different shields and none worked. After tones of frustration i purchased this hopeing it would work and was pleasantly surprised. By the way thanks for the fritz designs. I told guys at work i will replicate the design for them. Hope thats ok with you.

    • Glad to head that you like it! Obviously it’d be great if they bought ‘em from me, but feel free to modify the shield’s design and make your own, so long as you don’t sell them. They’re licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license.

  • Hi Jeff,

    I got the board with the header for the crystal, thanks!
    I have a couple questions.

    1. The Blink LED on the board, how does that work?
    2. Do I ever need to do anything with the auto Reset Jumper?

    Thanks,
    Tony

    • Hey Tony,

      Glad to hear you got it!

      1. The Blink LED can be used to test your microcontrollers. Just insert the microcontroller you want to program and then open the Blink example sketch that comes with the Arduino IDE. If you are using an ATtiny13/25/45/85, change the LED pin in the sketch to pin 4. For all other microcontrollers, change it to pin 1. Upload it to the microcontroller, and you should see the LED start to blink.

      2. With the jumper in the “OFF” position, your sketches will be uploaded to the microcontroller in the ZIF socket. With the jumper in the “ON” position, your sketches will be uploaded to the ATmega328 on the Arduino itself.

      Personally, I almost never switch it from the OFF position because if I need to reuse the Arduino I’ll remove the shield anyway.

  • Hi Jeff,
    OK, thanks for the info I really like your shield.
    You should have Sparkfun sell it.
    But, make the crystal removable.

    Tony

  • Got the kit, went together perfectly. Followed the instructions to load the sketch on the Arduino, ]programmed my VERY first of many ATTINYs. Thanks Jeff.

  • Jeff. Do any of the pins for the ZIF socket correspond to the breakout pins on
    the opposite side above the DIP switches?

    • Yes, and they change when you flip the DIP switches. The SCK pin of the microcontroller selected goes to pin 13, MISO goes to 12, MOSI goes to 11, and RESET goes to 10. Here’s a helpful guide. Just note that on ATtiny*4′s, MOSI is pin 7. It’s missing that one for some reason.

Got anything to say? Go ahead and leave a comment!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>