Discuss this article in the Nuts & Volts forums at http://forum.nutsvolts.com.
The ArduinoISP program was written by
Randall Bohn and is included in the Arduino
IDE under Examples as shown in Figure 2. The
ATmega328 can be programmed using the ISP
(In-System Programmer) feature that allows
you to use the SPI (Serial Peripheral Interface)
bus to load programs into Flash memory. SPI
uses the SS, MOSI, MISO, and SCK lines
shown below. Fortunately, the ISP and SPI 'just
work,' so we don't need to discuss them in
Before we learn to use it, let's first look at
how to build it.
BUILD AN ARDUINOISP
BOARD ON AN ARDUINO
The ArduinoISP code is wired to use the
Arduino pins as follows:
7 - Programming LED
8 - Error LED
9 - Heartbeat LED
10 - SS
11 - MOSI
12 - MISO
13 - SCK
■ FIGURE 2. ArduinoISP in IDE.
The ArduinoISP program uses three LEDs
to help you see what is going on. These LEDs
aren't absolutely necessary to
make this project work, but I
included them in case you want
to watch the action.
Since we are going to build
a proto shield board that uses
the ArduinoISP, we will need to
design our ISP programmer to
use these Arduino pins with
components on the proto shield.
To do that, we need to
remember that the Arduino pins
are not the same as the
When you are wiring an
Arduino to an ATmega328, it is
easy to get confused. Figure 3
shows an ATmega328 with both
the native IC pin numbers and
the associated Arduino pin
numbers. This diagram may help
when you are wiring this project,
as will the schematic in Figure 4.
■ FIGURE 3.