User Manual - Software Instalation Misvel
User Manual - Software Instalation Misvel
User Manual
User Manual
Microcontroller AT89s51 Trainer Kit
User Manual
Introduction
Learn 8051 Programming and Code Development the quick and easy way, with this
easy to use Educational/Training Board. The 8051 Educational board incorporates an
AT89S51 Atmel Microcontroller with 4k of In-System Flash Memory, which can be
programmed and re-programmed easily with simple to use standard download
ATMEL ISP software. This kit allows you to begin writing application software and
contains all supporting documents.
Hardware
The hardware in Microcontroller AT89s51 Trainer Kit include:
¾ Mikrokontroller AT89s51 Trainer evaluation board
¾ Smart Cable for PC to Microcontroller AT89s51 Trainer evaluation board
(Using LPT DB 25, to download Hex File)
¾ Cable for PC to Microcontroller AT89s51 Trainer Kit (interface with RS232
communication, DB9 Female)
System/Software Requirements
An IBM PC (or compatible computer) with the following minimum configurations:
Features
The features of Microcontroller AT89s51 Trainer evaluation board are:
MCU
The Microcontroller AT89s51 is member of a family of MCS-51 microcontroller
products based upon the 8-bit CPU. The Flash in-circuit programming capability
allows for faster development time and program changes in the field. The AT89s51
core CPU is upward compatible with existing MCS51 (8051) instructions. The rich
peripheral set of the AT89S51 with 4K makes it suitable for a variety of applications
including motor control, security systems, home appliances, personal electronic
devices,and sensors.
The evaluation board contains circuitry to support and present all the features of the
AT89S51 with 4K.
Table 1 provides jumper information concerning the shunt status, functions, devices
and defaults affected of jumpers.
4
Microcontroller AT89s51 Trainer Kit
User Manual
Table 1 Jumper position
Jumper Status Device Affected Status
JP1/ EN_7Segmen IN 8 x 7 Segmen Enable
JP2/ EN_LED IN LED Enable
JP3/ IREF DAC IN* DAC 0808 Enable
JP4/ EN_DAC* IN** DAC 0808 Enable
JP5/ EN_LCD IN*** LCD Character 2x16 Enable
Note:
¾ **This jumper must be out, when using keypad or push button
¾ Toggle swicht must be at RUN position, to Enable CS ADC0804
¾ Toggle swicht must be at PROGRAMMING position, to Enable ISP
programming MCU
¾ * This jumper must be in, for current reference to DAC
¾ * For measurement the current referrence, connects this jumper to
amperemeter
¾ *** This jumper must be in position in any experiment (do not move
this jumper)
5
Microcontroller AT89s51 Trainer Kit
User Manual
Table 4 Advance board jumper position
Connector Function
JP13 To control printer (Busy, Strobe, Reset )
JP8 To send data to printer
JP7 To receive data and clock signal from keyboard/ PS2
JP6 Pulse out from monostable 555
JP5 Clock out from astable 555
JP15 To control RTC DS12C887
JP14 To send/ receive data/ control from/ to RTC
JP4 Pulse PWM input
JP1 To Drive stepper motor
6
Microcontroller AT89s51 Trainer Kit
User Manual
7
Microcontroller AT89s51 Trainer Kit
User Manual
How to use the Software:
Please install both the software first before used !.
The M-IDE Studio for MCS-51 is the primary means for performing compiling for
the MCS-51 devices. The M-IDE Studio for MCS-51 has a comprehensive set of
features that allows you to edit, compiling, and debugging file.
The M-IDE Studio for MCS-51 also allows you to write a programming language
with c programming. Using the software, you can see the error by viewing report in
file LST.
You will notice that most of the toolbar buttons and menu options are disabled. This is
because a file has not been made. To make a file, do the following:
1. New File
To make a new file, click on File menu or shortcut as shown in figure 1, after made a
new file, then you'll see the page look similar as figure 2.
To implementation the program, you may write the assembly program in blank file.
After writes the program, see that is no colour in the page.In this case you must save
the program as shown in figure 3.
3. Save As
Save your file with extension according to your program, in this case if your program
is assemly then you must save the file with extension *.ASM, as shown in figure 3.
After saving the program you will see the program with colour, this indicates that the
mnemonic is right reseved, as shown in figure 4
9
Microcontroller AT89s51 Trainer Kit
User Manual
4. Compiling
To load the file into your device, you need to compile the file *.ASM to be HEX file.
To compiling file *.ASM into *.HEX you can click shortcut as shown in figure 4.
5. Troubleshooting Error
Assembly errors apply to the consistency of the assembly language program in syntax
and semantics. If one of these errors is detected, it is flagged in the list file, and
program execution continues.
As you see in figure 6, we have an error instruction, with S JMP that should be SJMP.
Before you can detect the error you must save the file and compile the file again.
7. LST File
If you like to see more detail about the error, in a file you should see the *.LST file as
you see in dialog box below.
11
Microcontroller AT89s51 Trainer Kit
User Manual
Atmel Microcontroller ISP Software
The Atmel Microcontroller ISP Software is the primary means for performing in-
system programming (ISP) for the Atmel devices. It provides an intuitive interface for
in-system programming that can be run from your personal computer. The Atmel ISP
Software has a comprehensive set of features that allows you to view, program, and
erase data from an Atmel ISP device.
The Atmel Microcontroller ISP Software also allows you to load hex files containing
the code you want to add to the device. Using the software, you can manipulate this
code, verify it against the existing code on the device, and program the code onto the
device.
You will notice that most of the toolbar buttons and menu options are disabled. This is
because a device has not been selected. To select a device, do the following:
1. Make sure the board is connected to the LPT port of your computer with the Atmel
ISP cable and that the board is turned on.
2. Select the LPT port that the board is connected to by selecting Select Port from the
Options menu (You could also press the select port toolbar button).
3. You can then select a device by choosing Select Device from the Options menu or
by clicking on the toolbar. You should see a dialog box similar to the one in Figure 3.
12
Microcontroller AT89s51 Trainer Kit
User Manual
4. Select the device that you are trying to program from the tree control by clicking on
the desired device.
5. Next select whether you want to read and write from the device in page mode
(read/write a page at a time) or in byte mode (read/write byte by byte).
6. Enter the external clock frequency (MHz) provided to the device in the text box.
7. Select OK.
Once you finished selecting a device you will see one or two windows appear
depending on whether or not the device has internal data memory. The window(s) will
look like Figure 4. Each window signifies a buffer. There are two types of buffers, a
code buffer and a data buffer. The code buffer corresponds with the in-system
programmable flash memory of the chip and the data buffer corresponds with the
chip’s internal data memory.
After determining if the device can be programmed or not, it is time to load the
program that you wish to encode onto the chip into the software. The Atmel
13
Microcontroller AT89s51 Trainer Kit
User Manual
Microcontroller ISP Programming software can load in programs that are in the
Intel Hex file format.
.
Figure 5. Load Buffer Dialog
2. Select the HEX file that contains the program you wish to encode onto the chip and
click Open.
3. The buffers will then be updated with the contents of the hex
14
Microcontroller AT89s51 Trainer Kit
User Manual
4. Initialize Target
The Initialize Target command sets the device to programming mode. This is needed
when swapping devices after already selecting the device in the Atmel ISP Software.
Additionally, it is needed when setting the device out of run mode. This command can
also be activated by clicking on the toolbar.
Once the program has been loaded into the buffer(s) the most straightforward way to
program the device is to select Auto Program from the Instructions menu (You can
also press on the toolbar). Auto program performs all of the most common tasks done
when programming a device.
15
Microcontroller AT89s51 Trainer Kit
User Manual
After selecting Auto Program you should see a progress dialog similar to the one
shown in Figure 10.
6. Lockbit Settings
The Lockbit Settings command allows the user to set the lockbit protection mode for
the current device. A dialog box, similar to Figure 11, showing the protection modes
supported by the current device is displayed to the user. After selecting a protection
mode, the software sets the device to the specified mode.
16
Microcontroller AT89s51 Trainer Kit
User Manual
7. Run Target
The Run Target command removes the device from programming mode and sets it
into a run state. When the device is in this state, programming commands can not be
sent to the device. Most of the commands in the Atmel ISP Software are disabled
during this state. To return to a programming state, the Initialize Target command
must be executed.
17
Microcontroller AT89s51 Trainer Kit
User Manual
8. Troubleshooting
This section discusses some of the common problems you might encounter when
using the software and what to do when you encounter them. The program reports that
the device is locked even after a Chip Erase command has been executed. The
software is most likely having trouble communicating with the device. Check the
cable connection and make sure the device is on. Then run the Initialize Target
command from the Options menu.
The program reports write failures when attempting to write the buffer(s) to the chip.
This usually occurs when the XTAL frequency is not set to the correct value in the
software. To set the XTAL chose Select Device from the Options menu and input the
correct XTAL frequency that is being used by the device. Then run the Initialize
Target command from the Options menu.
The software reports “…Atmel ISP Cable is not connected…” but the cable and
device appear to be connected properly. Make sure the correct port is selected in the
software. This is done by selecting Select Port from the Options menu.
18
Microcontroller AT89s51 Trainer Kit
User Manual
Customer Support
If you experience any problems while operating this product, please see the Technical Support
web page:
www.misvel.com
19