| Home > AVR Microcontroller Projects > Build your own AVR Starter Kit |
This document describes how to build your own AVR starter kit including the necessary adapter cable for in-system programming.
Several commercial AVR Starter Kits are available, the most popular is the STK200 from Kanda Systems. This starter kit consists of a PCB with sockets for various but not all AVR chips, eight LED's and switches, a DB9 connector for RS-232 communication and a socket for an external SRAM. This starter kit is very useful for a beginner, but for me it has the following limitations: The 4Mhz crystal is soldered, this makes it impossible to use a different clock rate. Newer devices like ATiny and ATMega are not supported on the STK200, but Kanda offers another starter kit, the STK300 for ATMega and the STK100 for the ATiny series. Adding external parts like sensors, RTC, ADC, sound chip is difficult, these parts must be placed on a separate boards which must be connected with cables to heads on the STK200 board.
Prototyping boards (Breadboards) are very useful for developing and testing electronic circuits without soldering.
Breadboard
When such a breadboard is used as the base for an AVR starter kit, additional interface
components like real-time clock, sensors or analog/digital converters can be easily
connected to the AVR without soldering.
The AVR device can be programmed directly in the target circuit. This is called In-System Programming (ISP). A adapter cable connects the PC parallel port with the ISP pins of the AVR chip. A special Programmer Software is used to download the program into the AVR flash memory.

There is no standard for such a cable, but the cable shown in the circuit below is compatible with the Atmel AVRISP Programmer, Pony Programmer and UISP. All are available for download, see Development Tools for AVR.

The 74HC125 tristate-buffers are used here to buffer the signals received from /send to the PC and to disconnect the AVR from the PC after programming. A standard cable with DB25 connectors is used between PC and the ISP-adapter. Another cable, which should not be longer than 30 cm, connects the ISP-adapter with the target circuit. I placed the 74HC125 and the two passive components inside a standard DB25 connector shell.
The following circuits are based on the AVR chip AT90S8515, but can be easily adapted
to other AVR devices.
Since the AVR has built-in SRAM, EEPROM and Flash memory, the minimum external components
are a crystal, two capacitors and a reset-circuit.
This first example circuit explains how LED's and switches can be connected to an AVR.

Parts List |
|||
| Atmel AVR Microcontroller | AT90S85158PC | Datasheet (PDF) | |
![]() |
Microcontroller Crystal | 4.00 MHz | |
| Ceramic Capacitor | 27pF | ||
| Film Capacitor | 0.1uF / 10V | ||
| Resistors | 1K, 10K, 100K / 0,25 Watt | ||
| LED | 3mm LED | ||
![]() |
Voltage Detector (4.5 Volt) | Seiko S-80845ANY, Texas Instruments TL7757 or similar |
|
| Integrated Voltage Regulator | 78L05 | ||
The eight active-low LED's are connected to port B and up to eight active-low input
switches to port D as on STK200. The ISP connector is used to connect the ISP adapter. The
reset-button can be used to manualy reset the AVR. The voltage detector resets the AVR
when the power supply voltage is to low, see below for a detailed description of these
Brown-Out Detectors.
A fixed-voltage regulator (78L05) is used to generate the 5V supply voltage, therefore a
standard 9V DC power-adapter can be used as power supply.
For easy testing of my AVR starter kit, I have created a test program which repeatedly turns on/off all LED's and reads the switches. This program is already pre-compiled/linked for direct downloading with the programmer software. (test_starterkit.zip)
Brown-Out Protection
When the power supply voltage is insufficient, the AVR CPU may start to execute some
instructions incorrectly. To avoid these problems, the CPU should be prevented from
executing code during periods of insufficient supply voltage. This is best ensured by the
use of an external Power Supply Low Voltage Detector, also known as Brown-Out Detector.
Below a fixed threshold voltage, the detector forces the RESET pin low (active) and
therefore stops the CPU.
These voltage detectors are available as integrated circuits from various semiconductor suppliers. I selected here a cheap 3-pin fixed voltage detector, TL7757 from Texas Instruments. Seiko Instruments also offers a range of cheap voltage detectors with very low current consumption (S80845ANY). Any other voltage detector with an active-low open-collector output can be used. The open-collector or open-drain output is required by the ISP-circuit.
� Copyright 2001 Peter Fleury e-mail [email protected] home page: http://jump.to/fleury