-// this sketch turns the Arduino into a AVRISP
-// using the following pins:
-// 10: slave reset
-// 11: MOSI
-// 12: MISO
-// 13: SCK
-
+// ArduinoISP version 04m3
+// Copyright (c) 2008-2011 Randall Bohn
+// If you require a license, see 
+//     http://www.opensource.org/licenses/bsd-license.php
+//
+// This sketch turns the Arduino into a AVRISP
+// using the following arduino pins:
+//
+// pin name:    not-mega:         mega(1280 and 2560)
+// slave reset: 10:               53 
+// MOSI:        11:               51 
+// MISO:        12:               50 
+// SCK:         13:               52 
+//
 // Put an LED (with resistor) on the following pins:
-// 9: Heartbeat - shows the programmer is running
-// 8: Error - Lights up if something goes wrong (use red if that makes sense)
+// 9: Heartbeat   - shows the programmer is running
+// 8: Error       - Lights up if something goes wrong (use red if that makes sense)
 // 7: Programming - In communication with the slave
+//
+// 23 July 2011 Randall Bohn
+// -Address Arduino issue 509 :: Portability of ArduinoISP
+// http://code.google.com/p/arduino/issues/detail?id=509
+//
+// October 2010 by Randall Bohn
+// - Write to EEPROM > 256 bytes
+// - Better use of LEDs:
+// -- Flash LED_PMODE on each flash commit
+// -- Flash LED_PMODE while writing EEPROM (both give visual feedback of writing progress)
+// - Light LED_ERR whenever we hit a STK_NOSYNC. Turn it off when back in sync.
+// - Use pins_arduino.h (should also work on Arduino Mega)
 //
 // October 2009 by David A. Mellis
 // - Added support for the read signature command

    Serial.print((char)STK_OK);
  } 
  else {
    Serial.print((char)STK_NOSYNC);
  }
}

    start_pmode();
    empty_reply();
    break;
  case 'U': // set address (word)
    here = getch();
    here += 256 * getch();
    empty_reply();
    break;

