ebay store
Chapter
4 Guidance of simulated operations
General introduction: Simulated
part of XL400+ is realized by SST89E516RD simulated monitoring chips.
Being used with KEIL
software, it could not only realize the simulation with the resource
on board, but could simulate the out-connected target boards through
40PIN simulated heads.
Hardware
installment:First connect USB wires, insert the simulated chips (not at89w51) into
the experimental card socket and lock it hard.( Please make sure the
USB driving program has been installed correctly. 请注意仿真头插入方向!
 | | |
Software
installment: Directly copy disk\open tool\keil\to the root catalog in
disk C, take off the read-only characteristic of all files.(Please
notice that must the root catalog of disk C rather of any other
catalogs.)
Build
your first project(software operation guidance):
1
Click
project manual, choose new project, input the name of your fist
program project in “file name”. Suppose we use
“test” as the name, after “save” our files, the
extended name is uu2 which is the extended name of KEIL uVision2
project files. Then we could click this file to open the project done
before. Now,
there will flip a dialogue frame for you to choose the style of the
single chip machine, we choose ATMEL---AT89C51. Please notice that we
are using 89S52 actually, but their resources are basically the same
so you don’t have to care about that.

2.The
build-up of source files: Click new…in the file manual to create a
text editing window. Insert in it a program example such as flowing
water programs. Then “save” order in file manual to save files.
Please notice that a suffix name .asm of files must be inserted.
(Notice that there could not be Chinese catalogs and make sure the
file names could not be longer than 8 bits, or the programming will
not be passed. If you are using that for the first time, we suggest
that you save the file in the root catalog of disk C with the same
file name 001.ASM. Do not try to save it to the desktop\my document
etc.)

3.Click “+”before target 1,
there will be source group 1, click the right button to choose “add
files group source group 1”, then choose the file type as Asm,
choose 001.asm file then press add, in the frame following that, click
“confirm”.

4.Simulated
part uses Mon51 protocol, so we must setup the software project as
follows: single click “project”, in the manual under it, single
click “options for target 1” As is shown in the following picture,
single click “target” to input the frequency of simulation
machines.(12MHz).

5.
Click output and “create HEX file” option to produce HEX codes
after for programmer.

6.
Click “KeilMonitor-51 Driver” in “Debug”, choose loading codes
to simulation machines and run it to main0, then click setup.

7.
Single
click “settings” to choose the serial port to be used.(That must
accord with the real situation. If you are not sure about that, you
could check and solve the problem through controlling
board\hardware\port\communication port. Meanwhile, please notice that
there could not be other software such as XLISP downloading software
which might occupy resources running at the same time, or there might
be conflict.(Usually the COM3)

8.
Program according to the following two downward arrows ,( or press F7
for convenience). After successful programming, there will be
indicated as 0 mistake, or 0 warning. Now hex files are produced and
we could also use isp method to program HEX into single chip machines
to experiment. Then we could do the hardware simulation, insert the
simulated chip into the experimental card socket of XL400+, please do
press the “reset” button on XL400+ when beginning to simulate.

9
Click the 3rdred d
(debug)
or press Ctrl+F5 for convenience to enter simulation. Now an
indication of successful connection will be shown on the interface.(Or
the settings must be wrong please check it carefully.)
(Indication
of the successful connection of simulation.) Then
click the “run fully” button shown in the picture, and you will
see the 8 red LED of XL400+ light in turn which means successful
operation. You could also see related variables and parameters or
which is also very convenient. When
withdrawing from simulation, press the reset button of XL400+, then
click d to be back to the editing mode. After revising programs, we
re-program, click the d in red and you could enter the simulation mode
again. Till
now you’ve finished the standardized operation of keil software, you
could observe the change of registers on experimental board in order
to experience the running process through clicking running for each
step. Please do press the button of XL400+ entering or withdrawing.) (Please
notice: Simulation state will occupy some of CUP resources and make
some programs can not simulate correctly. And we |