Using The ISP Shield

From Evil Mad Scientist Wiki
Revision as of 17:59, 23 March 2011 by Lenore (talk | contribs) (In case of difficulty...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page covers basic usage of the Evil Mad Science ISP Shield


...To program the Arduino Bootloader onto an ATmega168/ATmega328[edit]

  1. Attach the ISP Shield to the Arduino
  2. Connect the Arduino to your computer and bring up the Arduino IDE
  3. If necessary, configure the Arduino IDE for your Arduino or Arduino clone
  4. In the File menu, select Examples, and open the ArduinoISP sketch
  5. Upload this sketch to your Arduino or Arduino clone
  6. At this time place an ATmega168 or ATmega328 into the ZIF socket on the ISP Shield and lock it in place
  7. In the Tools menu, select Board, and select either:
    • Arduino Duemilanove or Nano w/ ATmega328 if you are programing an ATmega328
    • Arduino Diecimila, Duemilanove, or Nano w/ ATmega168 if you are programing an ATmega168
  8. In the Tools menu, select Burn Bootloader, and select w/ Arduino as ISP


...To program the Arduino Bootloader onto an ATmega168/ATmega328 located on an external target board[edit]

You can also use the ISP Shield to program the Arduino bootloader onto an external target board, providing that the target is Arduino compatible and has a standard 6-pin* AVR ISP programming header.

Follow the instructions above, however instead of placing a microcontroller into the ZIF socket connect the ISP Shield to the target board with a 6 pin (2x3 DIL) ribbon cable. Be sure to get the orientation correct; pin 1 is marked with an arrow on the ISP Shield circuit board. In addition, make sure that the target power jumper is set correctly on the ISP Shield. If your target board has its own power, the jumper should be set to 'Nope'.

It is important to make sure that your target is genuinely Arduino compatible, and that you select the appropriate target board type from the Arduino Tools menu. If you are programming an ATmega168 your target board will need the appropriate crystal and related capacitors. If you are programming an ATmega328 your target board may have an appropriate crystal and related capacitors. However if you wish to use the internal oscillator instead you need to install support for an additional hardware configuration. Check the From Arduino to a Microcontroller on a Breadboard tutorial by the Arduino Team - under the Minimal Circuit (Eliminating the External Clock) section there are instructions for downloading and installing the ATmega328 on a breadboard (8 MHz internal clock) hardware configuration in the Arduino IDE. Once installed, select this Board type when programming an ATmega328 on an external target board that has no crystal.


...To use the ISP Shield in place of an AVR ISP[edit]

The ArduinoISP sketch mimics the Atmel AVRISP programmer. The Arduino IDE won't let you use it to upload sketches, but you can use avrdude to upload compiled programs to an ATmega168/ATmega328 via the ISP Shield ZIF socket or either of the ISP headers.

When using an Arduino and ArduinoISP in this capacity the avrdude programmer type should be set to 'avrisp'. If you are using Windows avrdude may not be able to use the Arduino unless it is attached to COM port 9 (COM9) or lower. To change the port number that a device is attached to first locate it in the Device Manager: in the System Properties control panel, select the Hardware tab, then click the Device Manager button, and finally expand the Ports (COM & LPT) item. Right click the appropriate device for your Arduino and select Properties option, select the Port Settings tab, and click the button labeled Advanced.... Select a new unused port in the COM Port Number drop-down selection box.

Check the avrdude webpage for complete instructions and documentation regarding the use of avrdude.


In case of difficulty...[edit]

  • Make sure that you cut the extra reset pin in Step 11 of the assembly instructions.
  • There is a known issue with auto-reset (a common feature on Arduino boards) and the ArduinoISP technique. You may, for example, get the "not in sync: resp=0x15" error message. If so, you may need to disable auto-reset. The ISP Shield kit includes a non-destructive hack for overriding auto-reset, see here for more information.