
10
0943E–AVR–08/08
AVR910
A Simple Low-cost
In-System
Programmer
This application note will not discuss all aspects of an In-System Programmer. Instead, it will
show how a simple low-cost programmer can be made, using only an AT90S1200 and a few dis-
crete components.
The programmer will plug into any serial port of any PC. The AT90S1200 doesn’t come with a
hardware UART, but the software will run a half duplex UART by using the Timer/Counter0 to
clock data. The AT90S1200 also takes care of programming the target AVR by running the Mas-
ter SPI entirely in software.
The schematics to the programmer can be seen in Figure 4. Power to the AT90S1200 is taken
from the target system. The negative voltage needed to communicate serially with the PC is
stored in C100 when receiving a logical one (negative line voltage).
The transmit line is fed with this negative voltage from C100, when transistor Q100 is closed.
This sends a logical one on the transmit line. Logical zeros (positive voltage) is sent by opening
Q100, connecting V
CC
(actually V
CC
- 0.2V) to the transmit line.
Some older PC systems might have serial port not accepting voltages below +10 volts as logical
zero. This, however, is not a problem with the majority of existing PCs.
The file avr910.asm contains the firmware for the AT90S1200.
Figure 4. A Low-cost In-System Programmer
U100
AT90
S
1200
GND
AIN0/PB0
AIN1/PB1
PB2
PB
3
PB4
PB5
PB6
PB7
XTAL2
VCC
RE
S
ET
PD0
PD1
PD2/INT0
PD
3
PD4
PD5
PD6
XTAL1
10
12
1
3
14
15
16
17
1
8
19
4
20
1
2
3
6
7
8
9
11
5
1M0
R106
XC100
4 MH
Z
VCC
MO
S
I
GND
J101
2
4
6
1
3
5
MI
S
O
S
CK
RE
S
ET
CONNECTOR A
S
S
EEN FROM BELOW
GND
C101
100N
R10
3
4K7
R102
4K7
4K7
4K7
PAD
R
X
D
T
X
D
R101
4K7
R100
4K7
BC
8
47C
Q101
R105
D101
BA
S
16
BA
S
16
D100
20V
1.0
u
F
+
C100
RECEIVE
TRAN
S
MIT
1
2
3
6
7
5
4
8
9
9-PIN D-
S
UB
FEMALE
R104
J100
BC
8
57C
Q100