UNO Multi Programming Shield Tutorial Part: 1

Tutorial Part: 2 - The UNO Multi Programming Shield, how it all works>>


How to install and set up your UNO Multi Programming Shield.

The very first step you need to take is to download the Multi.zip file from the download section here. This zipped archive contains the updated ArduinoISP* sketch for use with the UNO Multi programming Shield.

The zipped archive should be extracted to a folder on your C: drive which can be deleted later if you wish and the sketch within the archive can then be put where you keep your sketches to use as normal..

* The original "ArduinoISP" sketch (as supplied with the "Arduino IDE") was written by Randall Bohn who should receive all the recognition for this excellent piece of software, The "ArduinoISP_Multi" sketch is a modified version of Randall Bohn's original sketch. All alterations were made by Phil Morris.

Tested with Arduino IDE 1.0.x, IDE 1.6.x and IDE 1.8.x  DOES NOT work with IDE 1.5.x

The simplest way to get going:

  1. If it isn't already closed, close the Arduino IDE and disconnect your UNO from the USB connector
  2. Carefully fit the UNO Multi Programming Shield onto your UNO
  3. Check that the "RESET Defeat"  link and Power "ON/OFF" link are open i.e. not linked
  4. Copy the ArduinoISP_Multi sketch that you downloaded from the downloads page to your Sketch or Projects folder
  5. Reconnect the USB cable to your UNO
  6. Open the Arduino IDE and you should now see the "ArduinoISP_Multi sketch in your list of sketches
  7. Open the "ArduinoISP_Multi" sketch in the Arduino IDE and select the correct Board type and COM port for your UNO board
  8. Upload the "ArduinoISP_Multi" sketch to your Arduino UNO board as you would any other sketch
  9. When the upload has completed, you should see the "ERR", "PROG" and "HB" LEDs flash in 3 short bursts of 3 pulses which indicates that the software is loaded and working. The "HB" LED will continue pulsating to indicate that the software is running. If you do not see the LEDs flash, try resetting your UNO board and/or reloading the sketch. The pin 13 LED on the Arduino UNO board will also flash 3 short burst of 3 pulses as the sketch starts up
  10. Put the "RESET Defeat" link in place. This will prevent accidental resetting of the UNO board but, it will also stop you uploading to the UNO as well so, if you want to reload the ISP sketch, you will have to remove this link first
  11. Fit the "ON/OFF" link in place and the "PWR" LED will light. Now remove this link
  12. You are now ready to prepare your first AVR device
  13. With the ON/OFF link removed, insert the AVR device into the relevant socket on the shield making sure that the IC is correctly orientated.
  14. Fit the ON/OFF link in place and the PWR LED will light and your shield is ready to go.

It is recommended that your Arduino UNO is only used with the ArduinoISP_Multi sketch when the Shield is fitted. The Shield may affect the operation of other sketches!

Your Arduino UNO is now a fully fledged ISP programmer for use with the specified AVR devices using the sockets on the shield or, just about any other AVR which uses SPI programming using the ICSP header.

Scenario 1: Bootloading an ATmega328 form use in an Arduino UNO board (16 MHz crystal or resonator required)

The Power ON/OFF link must always be removed when inserting or removing AVRs from the shield. Failure to observe this step could permanently damage your device!

All the files and board definitions for this scenario are already in place within the Arduino IDE environment. The Arduino environment is contained in the Arduino" folder in the original Arduino installation. The default installation for a Windows system is in "C:\Program Files\Arduino" . The following assumes that you are using a virgin ATmega328 AVR.

  1. With the shield fitted to your UNO and the ArduinoISP_Multi sketch uploaded to the UNO, ensure that the Power link is disconnected
  2. Selected "Arduino UNO" from the boards menu and select the correct COM port for your UNO
  3. Insert the ATmega328 into the shield observing the correct orientation to the shield socket
  4. Fit the Power link and the power LED will light
  5. Select "Burn bootloader" from the "Tools" menu and the process should start. You should see activity on the PROG LED. It is normal for the ERR LED to flash on momentarily during programming. The PROG LED will flash rapidly during writing to the AVR and remain solid during the reading phase. Please be patient as the process can take some time
  6. When the bootloading process has completed (look at the red text in the bottom of the IDE window):

    avrdude: verifying ...
    avrdude: 1 bytes of lock verified

    avrdude done. Thank you

    Any other result means something went wrong and needs investigation
  7. Now remove the Power link and remove the AVR from the shield

The "8MHz" link provides a clock signal which can overcome problems with non-virgin AVRs.

Virgin AVRs i.e. new, unused devices are supplied with their internal clock already running so no external clock should be necessary. However, experience shows that this is not always the case!

Scenario 2: Bootloading an ATmega328 to use its own internal 8MHz clock (no crystal or resonator required)

Many stand-alone projects, in fact the vast majority, will work quite happily with an AVR running at 8MHz. This removes the need for an external crystal or resonator and frees up the XTAL pins on the AVR for use as additional I/O pins. If you need very fast processing or very accurate timing, you're stuck with using a crystal.

For this scenario we are going to be using a device type that the Arduino IDE doesn't know anything about so we are going to have to tell it what to do. The boards definitions are contained in a file called "boards.txt" which can be found at "C:\Program Files\Arduino\hardware\arduino". There are other folders in there which contain bootloader, core and other files but fornow, we don'y need to worry about these.

The boards.txt file contains all the definitions for all the boards that you see listed under "Board" on the "Tools" menu of the IDE. Always make a backup copy of the original boards.txt file before making any changes!

Open the boards.txt file in a text editor and remove any entries you will never need. If you only intend to use an Arduino UNO board, remove every other entry. Now you can decide if you want to add a new definition to the boards.txt file or create a separate boards.txt file just for your new definition(s), it's up to you.

You might also consider doing the same with the "programmers.txt" file which defines the programmers which can be used by the IDE. If you only wnt to use your Arduino UNO as the programmer, remove all the other entries after making a backup of the original file of course.

For this scenario, download this example set of board definitions which we will discuss from now on. The principles discussed here apply to all other AVR definitions which you might like to add in the future.

Add the definitions to your edited boards.txt file and save it. The new definitions will not appear until you open the Arduino IDE again. You should now see your new definitions in the "Board" menu 

There a three definitions for the ATmega328 running at 8MHz, one with a bootloader and two without a bootloader. The bootloader variant will expect to be upload via the serial port whereas the others will expect to have their code uploaded via the ISP programmer. Remember that using "Upload using programmer" on the "Files" menu will overwrite the bootloader if installed!

One other thing to remember is that the AVR fuses are only set or reset during the "Burn bootloader" process, "Upload using programmer" does NOT set or reset fuses.

Use the same steps as shown above to burn the bootloader but, if you want to upload sketches to an AVR without a bootloader more than a few times, you will have to use the ICSP header and program your AVR in-circuit once the fuses have been set. Alternatively, you could just use the ICSP header to do the bootloading in-circuit as well.

It is NOT recommended to upload sketches using the shield during program development as this requires multiple insertions and removals of the device which the shield is not designed for. Always use the ICSP header for in-circuit development.

This is only an overview but it isn't too difficult and a little experimentation will be worthwhile.

There is a wealth of information on the Internet on this and many other related subjects but you could go to  www.lydiard.plus.com to start with.

Tutorial Part: 2 - The UNO Multi Programming Shield, how it all works>>