This article briefly describes my build of an Atmel ISP (in circuit programmer). I decided to build one rather than buy one partly for the learning experience and partly because it is cheaper. The Atmel ISP programmer from Digikey is $29 where as this one is less than $9.
I originally started with a programmer based on the Atmel AVR 910 application note as documented on Serasidis Vasilis’ webpage (http://www.serasidis.gr/circuits/avr_isp/avr_isp.htm). John Samperi improved the original software to support more devices and the current version is 3.2. However one common complaint with this programmer is that it only runs at 19,200 baud and so it very slow for downloading larger flash images.
I then discovered that Klaus Leidinger has a variation of an AVR 910-based programmer that supports 115,200 baud. His webpage, although written in German, has everything you need and the programmer even includes support for a bicolor LED just like the original Atmel programmer. The rest of this document explains how I built a programmer based on Klaus’ work. Credit goes to him and his colleagues on creating this faster (and better) AVR programmer.
The schematic below has been modified from Klaus’ schematic in the following ways:
· Replaced discrete RS-232 interface with MAX-232 compatible chip
· Added jumper on reset line that allows the AT90S2313 to be reprogrammed if needed.
· Added a reset button for programmer to save disconnecting power
· Swapped RS-232 TX/RX so that I could use it with an existing null modem cable
The Eagle file for the schematic is available here and is reproduced below. I used a 6 pin SIL socket rather than the usual 3x2 or 5x2 socket as it connects easily to my 40-pin DIP Atmel/BasicX development board using a flat 6-wire ribbon cable. I also included a 2 pin SIL for daisy-chaining of 5V power.
A 7.3728MHz crystal is used (rather than a 4Mhz as used by other AVR programmers) to provide an integral ratio for the clock to run the UART at 115,200 baud. The bicolor LED is optional although it is nice to see a power indicator (green) and a programming indicator (red).

This programmer works by using a serial
communication
protocol between the host PC and the embedded AT90S2313. This means
that a
program needs to be downloaded to AT90S2313 but the question is how to
do this
without another programmer. The solution I used was to bootstrap the
program
using the PonyProg
serial
programmer which requires a much simpler hardware connection (http://www.lancos.com/e2p/siprog_base.png).
I built the programmer on a breadboard as shown in the picture below
and made a
few simplifications to reduce the number of components. In the
breadboard
layout below the label “SI Prog” is for
the PonyProg serial programmer hardware,
“ISP In” is the
connection from the serial programmer to the AT90S2313, and “ISP Out”
is the
connection to the actual AVR that will be programmed and is not shown
in the
picture. The “Host PC” label is for the connection to the host PC which
in this
case is connected to the AVR ISP programmer. If you look carefully at
the
bottom right of the breadboard you can see labels for the host PC
connection to
the PonyProg serial programmer.
I used PonyProg to program the AT90S2313 with Klaus Leidinger’s version 3.8b of his programmer software. Klaus also provides the source code so you can modify and/or compile it yourself.

After prototyping the programmer on breadboard, I wanted to build a more permanent circuit. The diagram below shows an Eagle board layout suitable for stripboard (aka veroboard). The blue color is used for the strips and the red is used for 16 direct bare wire links and 5 indirect wire links. Some of the wire links are part of a component wire such as C6, C7, R3, and PB1. I bent the pins on the 9-pin D-SUB male socket to fit to the 0.1” spacing of the stripboard – this is not exactly reflected in the layout below.

The diagram below shows the stripboard layout without all of the detail to provide a better view of the 58 required breaks in the stripboard which are shown as drill holes (crosses). Obviously you could use the Eagle schematic and create your own PCB as well.

Here is the complete parts list and for those
people in the
|
Part |
Value |
Description |
Mouser Part # |
Price |
|
C1 |
0.1uF |
ceramic capacitor |
581-SR205E104M |
$0.08 |
|
C2 |
0.1uF |
ceramic capacitor |
581-SR205E104M |
$0.08 |
|
C3 |
0.1uF |
ceramic capacitor |
581-SR205E104M |
$0.08 |
|
C4 |
0.1uF |
ceramic capacitor |
581-SR205E104M |
$0.08 |
|
C5 |
0.1uF |
ceramic capacitor |
581-SR205E104M |
$0.08 |
|
C6 |
22pF |
ceramic capacitor |
140-50N2-220J |
$0.06 |
|
C7 |
22pF |
ceramic capacitor |
140-50N2-220J |
$0.06 |
|
IC1 |
AT90S2313P |
AT90S2313P Atmel chip |
556-AT90S231310PC |
$3.59 |
|
IC2 |
SP232A |
Maxim 232 compatible |
511-ST232ABN |
$1.10 |
|
PB1 |
|
Reset push button (optional) |
688-SKHVBA |
$0.28 |
|
Q1 |
7.3728MHz |
|
815-AB-7.3728-B2 |
$0.36 |
|
R1 |
4.7 KOhm |
1/8 watt resistor |
Parts Box |
$0.02 |
|
R2 |
470 Ohms |
1/8 watt resistor (optional) |
Parts Box |
$0.02 |
|
R3 |
1 MOhm |
1/8 watt resistor (optional) |
Parts Box |
$0.02 |
|
X1 |
|
9 pin male DSub socket |
152-3309 |
$0.99 |
|
bicolor |
|
Red/green bicolor LED (optional) |
512-MV5491A |
$0.30 |
|
ISP |
|
6 pin female header |
575-193108 |
$0.23 |
|
JP1 |
|
2 pin female header (optional) |
see above |
|
|
JP2 |
|
2 pin male header (optional) |
517-647-01-02 |
$0.18 |
|
JP2-A |
|
Shorting jumper (optional) |
151-8000 |
$0.12 |
|
S1 |
|
20 pin DIP machined screw socket |
517-ICE-203-S-TG |
$0.52 |
|
S2 |
|
16 pin DIP socket (optional) |
571-3902614 |
$0.11 |
The picture below shows the completed programmer. The bicolor LED is displaying red because the programmer is in the middle of a verify.

The AVR programmer is compatible with AVRDude and AVRProg that is packaged with Atmel’s AVR
studio. AVRProg
automatically recognizes the programmer and communicates with it at
115,200
baud. AVRDude needs a little more help in that you need to use the
flag –b 115200 for it work correctly.
| Device | Device Code | Programmer | AVRDude 5.1 | AVRProg 1.40 |
| AT90CAN128 | 0x1d | Y | Y | |
| AT90PWM2 | 0x06 | Y | Y1 | |
| AT90PWM3 | 0x07 | Y | Y1 | |
| AT90S1200 | 0x13 | Y | Y | Y |
| AT90S2313 | 0x20 | Y | Y | Y |
| AT90S2323 | 0x48 | Y | Y | |
| AT90S2333 | 0x34 | Y | Y | Y |
| AT90S2343 | 0x4c | Y | Y | Y |
| AT90S4414 | 0x28 | Y | Y | Y |
| AT90S4433 | 0x30 | Y | Y | Y |
| AT90S4434 | 0x6c | Y | Y | Y |
| AT90S8515 | 0x38 | Y | Y | Y |
| AT90S8535 | 0x68 | Y | Y | Y |
| ATmega103 | 0x41 | Y | Y | Y |
| ATmega128 | 0x43 | Y | Y | Y |
| ATmega1280 | 0x08 | Y |
Y1 | |
| ATmega1281 | 0x09 | Y |
Y1 | |
| ATmega16 | 0x74 | Y | Y | Y |
| ATmega161 | 0x60 | Y | Y | Y |
| ATmega162 | 0x62 | Y | Y1 | |
| ATmega163 | 0x64 | Y | Y | Y |
| ATmega164 | 0x37 | Y | Y1 | |
| ATmega165 | 0x36 | |||
| ATmega168 | 0x35 | Y |
Y1 | |
| ATmega169 | 0x79 | Y | Y1 | Y |
| ATmega2560 | 0x0a | |||
| ATmega2561 | 0x0b | |||
| ATmega32 | 0x72 | Y | Y | Y |
| ATmega324 | 0x39 | Y | Y1 | |
| ATmega325 | 0x3c | |||
| ATmega3250 | 0x0c | |||
| ATmega329 | 0x3d | Y | Y1 | |
| ATmega3290 | 0x3e | Y | Y1 | |
| ATmega48 | 0x31 | Y | Y1 | |
| ATmega64 | 0x45 | Y | Y1 | Y |
| ATmega640 | 0x01 | Y |
Y1 | |
| ATmega644 | 0x02 | Y | ||
| ATmega645 | 0x03 | |||
| ATmega6450 | 0x0d | |||
| ATmega649 | 0x04 | Y | Y1 | |
| ATmega6490 | 0x05 | Y | Y1 | |
| ATmega8 | 0x76 | Y | Y | Y |
| ATmega8515 | 0x3a | Y | Y | Y |
| ATmega8535 | 0x69 | Y | Y1 | Y |
| ATmega88 | 0x33 | Y | Y1 | |
| ATtiny10 | 0x51 | Y | Y | |
| ATtiny12 | 0x55 | Y | Y | Y |
| ATtiny13 | 0x57 | Y | Y1 | |
| ATtiny15 | 0x56 | Y | Y | Y |
| ATtiny2313 | 0x23 | Y | Y1 | Y2 |
| ATtiny24 | 0x0e 3 | Y |
Y1 | |
| ATtiny25 | 0x1a | Y | Y1 | |
| ATtiny26 | 0x5e | Y | Y | Y |
| ATtiny44 | 0x0f 3 | Y |
Y1 | |
| ATtiny45 | 0x1b | Y | Y1 | |
| ATtiny84 | ??3 | Y |
Y1 | |
| ATtiny85 | 0x1c | Y | Y1 |
Notes
1. These devices need an updated AVRDude.conf
file that uses compatible AVR910 device codes.
2. Use ATTiny26 device in AVRProg 1.40.
3. These AVR109 device codes are not yet known.
Last updated
© Mike Perks 2005 – All views
expressed
in this document are my own and have been derived from Internet
research and/or
personal discovery. Please let me know if I have unintentionally
infringed any
copyrights or patents. All copyrights and trademarks belong to their
respective
owners and are not explicitly marked. BasicX website visited
times.