Development Tools User Guide 2-1
Section 2
AT89S/AT90S Series Flash
Microcontroller Starter Kit
2.1 Introduction This manual describes the AT89S/AT90S Series Flash MCU Starter Kit.
The
AVR
Development Board is designed to help new MCU users get quickly
acquain ted with the Atm el baseli ne microcontr ollers. The
AVR
Development Board can
also be used to “breadboard” and try new designs before a final PCB is made.
The Starter Kit has the following features:
Regulated power supply for both DC and AC voltage sources.
8 push buttons for general use.
8 LEDs for general use.
All
AVR
ports are easy accessible through header connectors.
RS-232 level converter for general use.
Serial programming of AT90S Series AVR MCUs.
Serial programming of AT89S series MCUs.
Development board for AT89C/S series MCUs.
Eac h pa rt o f t h e
AVR
Development Board is described in detail in the following sections.
Note that when the term
AVR
device is used in the text i t also covers both the AT90S
series AVR and AT89S series MCU devices, unless specifically noted.
Rev. 1020A-A–01/98
AT89S/AT90S Series Flash Microcontroller Starter Kit
2-2 Development Tools User Guide
Figure 2-1.
AT89S/AT90S Series Flash Microcontroller Starter Kit.
2.2 The Power
Supply Circuit The power supply input connector (J140) must be connected to a DC or AC voltage
source . The i nput c ircuit is a fu ll bri dge r ectifie r so the pol arit y of t he inp ut vol tage d oes
not really matter, but the general standard on other
AVR
tools without the full bridge rec-
tifier is to connect minus to the center pin. The supplied power cable will get minus on
the center pin if the black/gray lead is connected to minus.
The power supply switch is labeled S140 and is placed close to J140. When a voltage
source is connected to J140, and the power switch is turned on, the power regulator will
supply the
AVR
Devel opment Board wi th a ste ady 5V voltag e. The red LED (D1 44) wi ll
light to indicate that power is on. The input voltage should be within the following range:
VDC: 9.0 V - 20.0 V
VAC: 6.5 VRMS - 15.0 VRMS
The cooling properties of the PCB against the power regulator and the power consump-
tion of the development board set the voltage range
AT89S/AT90S Series Flash Microcontroller Starter Kit
Development Tools User Guide 2-3
2.3 The RS-232 Ports The
AVR
Developme nt Boar d is made with tw o serial po rts. One port (DS UB connec tor
J130) is used by the programming section and the other (DSUB connector J131) can be
freely used. Both ports uses U130 (MAX202) for level converting. This circuit can handle
baudrates up to 120 kbit/s.
Each de velopm ent boar d is suppli ed with an RS -232 cabl e to connect i t to a serial p ort
on a PC. The cable connection is a one-to-one serial cable where pin 1 (male D-SUB) is
connected to pin 1 (female D-SUB), and so on. A null modem cable (twisted RX and TX
pins) will not work.
Note:
J131 and J132 are not mounted on the supplied Development Board. If the user
wants to use the available RS-232 port, these connectors need to be mounted
first.
To use the available RS-232 port, just connect J132 to the
AVR
pins that are used for
the serial port. For
AVR
devices with built-in UART, this is pins PD0 (RX) and PD1 (TX).
For AT89C/S series controllers, the pins are P3.0 (RX) and P3.1 (TX).
2.4 The General
Push-Button
Switches
The push-button switches (marked SW0 - SW7 on the PCB) are each supplied with a 10
kW pull-up resistor. When a switch is pushed down, the corresponding signal will be
forced low (to GND level), otherwise the signal will be high (VDD).
The push-buttons are connected to the header connector (J150, marked SWITCHES on
the PCB) as shown in the ta ble below:
Note:
J150 is positioned right below J103 (AVR Port D) so only a short flat-cable with
10 pin header connectors is required to connect the push-buttons to AVR port
D. Port D should then be configured as an input port.
2.5 The Red LEDs
for General Use The red LEDs (Marked LED0 - LED7 on the PCB) are supplied with 680R series resis-
tors, and can be connected directly to any
AVR
output port. To light a LED, the corre-
sponding signal has to be forced low (to GND level). The LEDs are connected to header
connector (J160, marked as LEDS on the PCB) as shown in the table below:
Note:
J160 is positioned right below J101 (AVR Port B) so only a short flat-cable with
10 pin header connectors is required to connect the push-buttons to AVR port
B. Port B should then be configured as an output port.
SIGNAL J150 SIGNAL
SW0Pin 1Pin 2SW1
SW2Pin 3Pin 4SW3
SW4Pin 5Pin 6SW5
SW6Pin 7Pin 8SW7
GND Pin 9 Pin 10 GND
SIGNAL J160 SIGNAL
LED0 Pin 1 Pin 2 LED1
LED2 Pin 3 Pin 4 LED3
LED4 Pin 5 Pin 6 LED5
LED6 Pin 7 Pin 8 LED7
GND Pin 9 Pin 10 GND
AT89S/AT90S Series Flash Microcontroller Starter Kit
2-4 Development Tools User Guide
2.6 The
AVR
Port
Connections U100/U10 1 are soc kets for 40 pi n and 20 pin
AVR
device s, re spe ctiv ely. S ince U101 is
placed inside U100, only one
AVR
device can be inserted at a time. All
AVR
ports and
special pins are connected to header connectors for easy access. All header connectors
are supplied with GND, to ease connections to external circuits.
The following table shows an overview of the port connections:
Since there is some differences in naming conventions between
AVR
and AT89S
devices, the table below shows the AT89S series port connections:
Each header connector is defined as follows:
Where n is one of the ports A ,B,C, or D (ports 0,1,2, or 3 for AT89S devices ) and x is
one of the header connectors J100, J101, J102, or J103.
The speci al pins on
AVR
40 pin dev ices are con nected to J104 as shown in th e table
below:
AVR
port Connector
AVR
device Comments
Port A J100 40 pin only This port is not available on 20 pin devices.
Port B J101 20/40 pin
Port C J102 40 pin only This port is not available on 20 pin devices.
Port D J103 20/40 pin
Port E J104 40 pin only ALE, ICP and OC1B pins.
AT89S port Connector AT89S
device Comments
Port 0 J100 40 pin only This port is not available on 20 pin devices.
Port 1 J101 20/40 pin
Port 2 J102 40 pin only This port is not available on 20 pin devices.
Port 3 J103 20/40 pin
Port 4 J104 40 pin only ALE/PROG, EA/VPP and PSEN pins.
SIGNAL J10x SIGNAL
Pn0Pin 1Pin 2Pn1
Pn2Pin 3Pin 4Pn3
Pn4Pin 5Pin 6Pn5
Pn6Pin 7Pin 8Pn7
GND Pin 9 Pin 10 GND
SIGNAL J104 SIGNAL
OC1B Pin 1 Pin 2 ALE
ICP Pin 3 Pin 4 GND
GND Pin 5 Pin 6 GND
AT89S/AT90S Series Flash Microcontroller Starter Kit
Development Tools User Guide 2-5
Since there is some differences in naming conventions between
AVR
and AT89S
devices, the table below shows the AT89S series special pins connections:
Note:
Port C, port D, and port E is placed on a 2.54 mm grid (100 mil) so that a single
34 pin flat cable header connector will connect all pins to an external application
with a single flat cable. This make it simple to interface to external memories
since all external memory pins are available on these ports.
The same can be done with port B and D. A 26 pin header conn ector is required to
cover both ports.
2.7 The
AVR
Development
Board
Programming
Section
The develop ment board can be us ed together with the su pplied util ity progra ms to seri-
ally pr ogram
AVR
series devices and AT89S series dev ices. The re are two s ets of pro-
grams for supplied for programming devices, one for Windows95 and Windows NT
users, and MS-DOS command line programs for MS-DOS and Win 3.1x users.
Both AT9 0S120 0 and AT90S 1200A may be p rogramm ed. For AT 90S120 0 device s, the
external crystal should be at least 1.0 MHz.
There are three p rogramming status LEDs on the AT90DEVBOARD. Thes e are num-
bered D1 10 (Y el low, ma rk ed Y on the PCB ), D111 (Gr een , m arke d R on the PCB ) , an d
D112 (Red, marked G on the PCB). Note that there is an error in the silkscreen marking.
The red LED is marked G when it should be R, and the green LED is marked R, when it
should be G. These LEDs will show the programming status according to the following
description:
The yellow LED will be lit when programming/verification is in progress.
The green LED will be lit when verification is OK.
The red LED will be lit when verification fails.
When the AT90DEVBOARD is turned on, all status LEDs will be turned on, and turned
off one a t a time. This i s an in di cat ion th at the bo ar d is OK . The s am e will hap pen if the
programming MCU (U110) is reset.
Note that the programm ing MCU (U11 0) will take control ove r the reset line of the
AVR
device when programming/verification is performed. As soon as programming/verifica-
tion is done, the reset line will be released and the
AVR
device will start to run its pro-
gram.
Note:
When programming AT89S8252, the port connectors should not be connected
to the LEDs or the switches. This may cause programming or verification failure.
2.7.1 Windows95/
Windows NT In order to program an
AVR
device under Windows95 or Windows NT, the program Avr-
Prog should be used. For a detailed description of the programming SW, see the Avr-
Prog User Guide.
SIGNAL J104 SIGNAL
PSEN Pin 1 Pin 2 ALE/PROG
EA/VPP Pin 3 Pin 4 GND
GND Pin 5 Pin 6 GND
AT89S/AT90S Series Flash Microcontroller Starter Kit
2-6 Development Tools User Guide
2.7.2 MS-DOS/
Windows 3.1x If Windows95 or Windows NT is not available, MS-DOS programs can be used to pro-
gram the
AVR
device. To progra m and v erify the Flash, the progr am
progf.exe
must be
used. To pro gram an d ve ri fy the E EP RO M the pro gram
proge.e xe
must be used. There
are also two programs to read the Flash and EEPROM contents,
readf.exe
and
reade.exe
res pectiv ely. In addi tion ther e are als o two progr ams to se t t he fu se b its an d
the lock bits. Thes e progra ms are cal led progfuse .exe an d proglock.e xe resp ectively .
For a detailed description of these programs, see the AvrProg User Guide.
2.8 The
AVR
Development
Board reset
systems
In order to make the development board work with both
AVR
devices and AT89S seri es
microcontrollers a flexible reset system has to be used. The AT89S devices uses active
high reset polarity, while the
AVR
devices uses active low reset polarity. The common
reset switch ( S100) is not connec ted directly to U100/U101 sockets. Ins tead it is con-
nected to the external interrupt pin (pin 6) on the programming MCU (U110). Pin 7 on
U110 is connected the reset pins on U100/U101. U110 will sense the level pin 17 at
power-o n to determi ne which reset pola rity to us e. The reset po lari ty is set acco rding to
following definition:
If pin 17 is high (VDD) at power-on, the reset polarity is active low for
AVR
devices.
If pin 17 is low (GND) at power-on, the reset polarity is active high for AT89S devices.
The volta ge leve l on pin 17 can be set by using the suppli ed jumpe r on header co nne c-
tor J110. If the jumper is set between pins 2 and 4 (or is omitted), the level on pin 17 will
be high. If the jumper is set between pins 4 and 6, the level on pin 17 will be low.
Note t hat th e le vel on pi n 17 has to be set pri or to pow er-on, in o rder to s elect th e righ t
reset polarity for the devices. If the level on pin 17 is changed when power is on, this will
NOT affect the reset polarity of the board.
For advanced use rs, the r e is also a po ss i bil ity to chan ge th e pr ogr am ming MCU (U110)
to either
AVR
or AT89 S devices. U110 i s cu rrently mounted with AT89C2051. To
change this to an AT90S1200 or AT90S2313, the reset polarity has to be changed. This
can be done by moving R115 (0R) to R114 and R116 (0R) to R117. This will reverse the
reset polarity on U110. R118 and R119 (10K) pull-up resistors can also be removed
since they are only required by AT89C2051.
U110 (mounted with
AVR
device) is also prepared for In-System-Programming (ISP)
through J110 mainly for ease of production. The
AVR
ISP programmer that will be avail-
able soon can be plugged direct into J110 to program U110. The pin description for
J110 is shown in the table below:
Note:
All signal directions refer to U110.
2.9 The clock
systems U110 is currently mounted with an 11.0592 MHz crystal to fit the AT89C2051 UART.
This may be changed when an
AVR
device is used later.
The cry stal for U1 00/U 101 (X10 0) is set t o 4.00M Hz. To cha nge thi s, it need to be sol-
dered out and replaced with another value. Note that the mounted load capacitors are
selected to fit parallel resonant crystals. It may be necessary to change the load capaci-
tors to fit any repl aced crystals. Ch eck the datasheet for r ecommended values on the
crystal you are using. This note is also valid for the crystal to U110 (X110).
SIGNAL J104 SIGNAL
DATAOUT Pin 1 Pin 2 VDD
CLKIN Pin 3 Pin 4 DATAIN
RESET Pin 5 Pin 6 GND
AT89S/AT90S Series Flash Microcontroller Starter Kit
Development Tools User Guide 2-7
2.10 Running 40 pin
AT89S devices The 40 pin AT89S series can use external program memory. In order to do this the pin
must be set low. The pin in on U100 is con nec ted to J1 04, pi n 1 an d is flo ati ng. In order
to run reliab le on inte rnal pro gram me mor y , the pi n sh ould be s et hi gh. The eas iest way
to do thi s is to conn ect it to pi n 2 on J110, which is connect ed to VDD. T his shou ld not
be any problem since the jumper (reset polarity setting) on J110 should be connected
between pins 4 and 6 for AT89S devices.
2.11 Troubleshooting A lot of effort has been used to make this development board as reliable as possible, but
there ar e so me si tuatio ns whe re it m ay fai l. The follo wing l ist i s a simple ch ecklis t to g o
through when things do not seem to work the way they should do.
If the development board does not work at all, check this:
Is a power supply applied to the target board?
Is the power switch turned on?
Note:
Check if the power LED on the target is lit.
Is the reset polarity jumper set correct?
Was the reset polarity jumper set correct at power-on?
Is the EA pin set correct on AT89S 40 pin devices.
Is a device inserted into U100 or U110 socket?
Is the device inserted the right way in the socket?
Are all the device pins inside the socket?
Is the correct device inserted to the socket?
Check that the device is thoroughly inserted into the target board programming
socket.
2.11.1 If the development
can not be found by
the AvrProg SW,
check this:
Is the serial cable well connected in both ends?
Is the serial cable of the right type?
Note:
Only a one-to-one cable will work. Null modem cables with twisted RX/TX pins
will NOT work.
Does more then one program accessing the serial port in a Windows environment?
A commo n problem with W indows environme nts is th at two programs ca n not c ontrol
the same serial port at the same time. If a DOS window is open and a program which
used the serial por t has been run (even if the program has been exit), the Windows
v ersion of AvrProg will not work. The same situation will occur if the Windows version
of AvrProg is st ill open, and th e MS-DOS version is r un in a DOS window. The solu-
tion is to close down (completely) all programs (and DOS windows) that may use or
may have used the serial port. This should solve the problem.
2.11.2 Programming/ verify
failures If AvrProg show either of the “Programming failed!” or “Verified failed!” messages,
check the foll owi ng li st:
Have you selected the correct device in the device menu on the Windows version?
Have you remembered to use the -d option on the MS-DOS v ersion?
Have you typed the device name right (-d option) on the MS-DOS version?
Note:
If you have tried to program a device with a wrong device selection, the target
board SW may crash and get totally locked. It may be seen on the
AT90 DEV BOAR D that the ye llow LED is con sta ntl y lit. On the A T90 PRO G120 0
board, the green LED may be constantly lit. If this happens, use the respective
reset buttons on the target boards, and try again. If this does not help, turn off
the power to the target boards and close down the AvrProg programs. If the
MS-DOS version is used in a DOS window in a Windows environment, close
AT89S/AT90S Series Flash Microcontroller Starter Kit
2-8 Development Tools User Guide
down the DOS window. Then turn no the power to target board again and
restart AvrProg. This should resolve the situation.
Note that parts may get damaged in your lab due to a bad ESD environment or bad han-
dling.
NB! Always handle devices with proper ESD precautions.
If you suspect a faulty part, try several devices to check if they behave in the same man-
ner. If they don't you may have faulty part. If they do, the target board may be damaged.
The target boards should be handled with proper ESD precautions as well. Don't exceed
the input power supply range of the target boards. This may cause permanent damage
to the boards. Also be very careful to avoid short circuits on the target boards. This may
cause permanent damage to the boards as well.
2.11.3 Where to get help If you have any problems with the Development Board or AvrProg, or any of the
AVR
tools, pl ease contact you r local ATM EL distributor for help. You may al so send an E-
mail to the
AVR
supp ort serv ice at avr@ atmel.c om. Inc lude all in format ion about the
problem, all HW/SW versions, and which
AVR
tools where use d. Also includ e inform a-
tion on the PC system you are using, and which operating system you are using (MS-
DOS, Windo ws9 5/W in dows NT).
2.12 The
AVR
Develo pmen t Kit
packing list
The
AVR
Development kit should be supplied with the following items:
The
AVR
Development Board.
Two flat-cables with 10 pin female header connectors.
One power cable.
One RS-232 cable.
The ATMEL CD-ROM data books.
The AvrProg SW (one diskette).
The
AVR
Studio SW (two diskettes).
Development Tools User Guide (this document).
AT89S/AT90S Series Flash Microcontroller Starter Kit
Development Tools User Guide 2-9
2.13 Appendix:
AVR
Development
Board schematic
diagram
AT89S/AT90S Series Flash Microcontroller Starter Kit
2-10 Development Tools User Guide