Play the AVR HyperTerm
10 milliseconds), it sends an XOFF character to the host,
so the host stops sending until the programmer has completed this byte programming and sends an XON character
to inform it. Then, the host continues data sending.
Setting Up HyperTerminal
It’s clear from the last section that properly setting up
the HyperTerminal for our unique requirements is vital for
the programmer to work.
The HyperTerminal program has many capabilities
and many options, but we only utilize a few of them.
More importantly, many of its “default” settings are NOT
what we want. We must change them to match our
To find the HyperTerminal program on the PC, begin
from the “Start” button, go to Programs > Accessories >
Communications, where you can see the HyperTerminal
icon, and double-click it. This opens a New Connection.
The New Connection dialog box appears and prompts you
to enter a Name for it. Type in any name (such as Xtm)
and choose an icon, then click OK.
The next dialog box is Connect To. Here, you have to
reject and click NO to many default settings: don’t enter
any area code or phone number, but, rather, choose the
“Connect using Direct to COM1” option and click OK.
Once you’ve chosen COM1, the Port Settings dialog
box appears. Select Baud rate and other settings to match
the programmer: 9600, 8-N-1; also, remember to select
XON/XOFF for Flow Control (reject default “Hardware”).
Now, we will deal with the HyperTerminal window
displays, but not everything has been set up. Click the File
menu under the title bar; find the item Properties. Click it
and you’ll see the “Settings” tab within the Properties. You
need to change two items in it: Choose “TTY” for the
Emulation type and then, in the ASCII Setup menu, put a
check mark in the box for “Send line ends with line feeds.”
Click OK. You’re finished with Terminal set-ups.
Using the Programmer
After setting up HyperTerminal, you can connect
the programmer to COM1 of your PC and power it up.
Then, you’ll see the following start-up message appear in
AVR HyperTerm Programmer
Enter your selection (press ctrl key first)
Listing 2. The Intel hex file LED1AVR.HEX.
Now, press ctrl-B. If you can see a response after a
while, that means the programmer is working. Then,
perhaps, press ctrl-R to read the Flash memory; it will
display 100 bytes of memory contents on the screen. If
you see that not all bytes are FF FF..., that means the chip
is not blank. You can press ctrl-E to erase it. Press ctrl-B to
make sure that it really confirms as blank.
Then, we come to the most important task: writing
Flash memory or programming. The bytes to be written
should be stored in an Intel Hex file. Atmel has a free
assembler program called AVRASM.EXE, which is used to
generate the hex file from an assembly source program.
You can download AVRASM.EXE from Atmel’s website
( www.atmel.com). A brief description on how to use the
AVRASM assembler follows.
For example, if we want to use the AT90S2313 in a
circuit to light up an LED with 1 Hz frequency or 60
blinks/minute, then we can use a text editor (such as
EDIT.EXE under Windows) to create the assembly
program LED1AVR.ASM, as shown in Listing 1. Then,
invoke the AVRASM assembler by typing the following
C1 — 100 mF 16 volt radial electrolytic capacitor
C2 — 2.2 mF 16 volt radial electrolytic capacitor
C3, C4 — 27 pF ceramic capacitor
C5 — 0.1 mF ceramic capacitor
R1 — 330 ohm 1/4 watt carbon resistor
U1 — RS-232 transceiver DS275 by Dallas Semiconductor
U2 — AT89C2051 Flash microcontroller (programmed)
U3 — AT90S1200 or AT90S2313 AVR to be programmed
VR1 — 78L05 voltage regulator IC
J1 — Power jack
J2 — DB9F connector
D1 — Schottky diode 1N5817
LED1 — General-purpose light emitting diode
XTAL — 3.6864 MHz crystal
CR1 — 4 MHz ceramic resonator
Miscellaneous: 9-12 VDC wall wart power supply, wires, solder, etc.
NOTE: The following items are available from
G. Y. Xu, P. O. Box 14681, Houston, TX 77021
Phone: (713) 741-3125
1. Assembled and tested AVRTMP-1 programmer — $34.95
2. Kit only — $29.95
3. PCB and programmed AT89C2051 — $10.00
Please visit www.geocities.com/xumicro for ordering information.