This circuit is a programmer for 20-pin Atmel's
AVR
microcontrollers.
Currently, only the AT90S1200 and AT90S2313 are supported.
The programmer is connected to PC's serial port.
No external power supply is required. The MCU
is
powered
from the serial port.
Schematic:
Schematic description:
The device is powered from the serial output.
In
order to
get Vcc=5V the serial output must be low. This is accomplished by
forcing
a BREAK state in the serial line.
The 2 diodes and the NPN transistor are the
core of
a cheap
& simple voltage regulator that lowers the 12 V of the serial
output
to about 5 volts.
The programming inputs, SCK & MOSI, are
obtained from
DTR and RTS. The 33-K, series resistors, togheter with the protection
diodes
of the AVR inputs, limits the voltage to about 0 to 5 volts.
The PNP transistor is a level converter for the
programming
output (MISO). It only operates properly if the RTS (MOSI) line is low.
Fortunately, the programming commands allows to transmit a 0x00 through
MOSI when reading data, so this is not a problem.
Any general-purpose transistors will be OK.
Examples: NPN:
BC547 to BC549, 2N2222, PNP: BC557 to BC559, 2N4126.
PCB layout:
Here is a possible PCB layout for this
programmer.
(This is not the actual PCB. The actual PCB was
designed
to fit some surface-mounted devices)
PCB photograph. SMD resistors and capacitors.
(click image
to enlarge)