Home

51tracer simulator user manual

image

Contents

1. 7 view modify value of variable When the program pauses we can view related variables At monitor call stack watch window local tab shows current local variables could be seen watch tab shows variables specified by the user press F2 key let us input variable like delay S Q A 0 A um HO OPP vl Qlav SOE xi 7 ORG 0000H j a ja LJMP MAIN a ttt ORG 0080H i OxfE MOV Pl 0DBH 11011011 S3 ACALL DELay MAW Pl n nn niiniini nected tal i CEST C O0x0091 GRFZRE AT sate gt Move mouse to delay and a message indicator pops 14 ff ACALL DELay fE MOY P1l 06DH 01101101 zE ACALL DELay wee MOY Pl O0B6H 10110110 xdo ACALL DELay xBT AJMP MAIN d 55 4 tae oo qdelay OxFFOOO091 x00 d2 dinz r6 d2 x07 djnz r7 dl a na OX s00 end Move mouse to one variable like d1 right click it then click Add d1 to Watch Windows click 1 2 the variable will occurs at the corresponding watch call stack watch window je H R ACALL DELay AIMP MAIN 0 Oxf mov r7 255 3skat FIBA 1 Oxf 2 Oxff 3 Oxf 4 Oxf 5 Oxf 6 Oxd5 T 0x87 E Prams 0x00 re Ox00 A gt BET BE H PIZTIA C test BT M HAREE C 0x0093 BREAKER aa S B dir ERIT 33 di S FA4T HNN di SMR dl C 020093 deren Sate gt Modify variable method left click the line of that variable press F2 input data you want to
2. D yE B I4 A B V V Step 4 itisshown new hardware installation is ready for use atthe right bottom At this moment you can see the COM port information at control panel system hardware device manager which means USB driver is installed correctly in the system Device Manager File Action View Help Hes 2 a a IEEE 1394 Bus host controllers J Keyboards Mice and other pointing devices Monitors Network adapters 2 Ad Ports COM amp LPT oy Communications Port COML a mange aisa iel CES We Printer Port ee ne Processors Sound video and game controllers System devices eg Sn ae toe sD TE Tips for installation failure If the system exits abnormally or power down during installation it causes a installation failure At this moment you can see the USB device with yellow exclamation mark in the device manager window just delete it and reproduce above steps to reinstall it USB installation under special situation A normal USB driver installation scenario is like above steps Under special situation you may have already installed other USB device like printer USB programmer etc In this case the virtual COM port number allocated to our USB maybe COM5 even COM6 However the KEIL simulation only supports COM1 COM2 COM3 COM4 four ports how to solve this issue A stupid solution maybe reinstall the OS and install XLISP USB driver in the new system there the COM port number is smaller
3. Dependencies Simulation part adopts MON51 protocol please do setting as below before using it Click Project then click options for target target 1 click output tab check Create HEX file generate hexfile option Options tor larget Target T Device Target Output Listing C51 A51 BL51 Locate BLS Select Folder for Objects Name of Executable Create Executable sses iY Debug Information i Browse Information D 7 Crale HES Bik a Hexa Create Library es2s LIB s click Debug tab select KeilMonitor 51 Driver check load code into simulator option check run to main option In option group recover debug setting check break point browsing poing and memory display options Locate BLE1 Misc Debug Ltiities T Use Keil Monitor 51 Driver Uv Dead Application at Startup till rrairi Initialization File gt r Restore Debug Session Settings E Breakpoints E Toolbox aw 8051 TRACER SIMULATOR DEBUGGER www 8951 com_ 9 Bs click Settings to select COM port Make it consistent with the actual situation Your PC may allocate COM2 for your simulation If you are not sure about it you can check it at control panel hardware PORT COM PORT Meanwhile please close other software may occupy the COM resources like serial port debugging software to avoid conflicts If you are using U
4. Figure 1 when plugged with many USB devices on PC the number is COM5 which is not supported by KEIL software as Device Manager File Action View Help ass 2 A A Floppy disk drives 3 IDE ATA ATAPT controllers 63 IEEE 1394 Bus host controllers z Keyboards Ss Mice and other pointing devices Monitors BS Network adapters ed Ports COM amp LPT a Communications Pork COMI md Communications Pork Cone CP210 USE to UART Bridge Controller Oc op 15 ny Printer Port LFT1 E oe Processors Sound video and game controllers a System devices i DTITERRRE aw 8051 TRACER SIMULATOR DEBUGGER www 8951 com_ 5 Figure 2 move the mouse to the COM5 devices right click and switch to property menu 2 Device Manager File Action Views Help Here X Be JA Flopp disk drives ES IDE ATAATAPI controllers a IEEE 1394 Bus host controllers 5 gt Keyboards T Mice and other pointing devices Monitors E8 Network adapters 7 Ports COM amp LPT __ Communications Pork oom 4 4 Communications EOL AS SEC RSSCRCRCRGEC p pdas Driver Ee Proce Disable H Sounc Uninstall E Syst 5 l kE E Scan For Mariae Chapges ee i Figure 3 click Port Setting then advanced property in the COM option list select an unused port like COM2 compatible a Select lower pnnecton problems Select higher ertormance Receive Butter Transmit Buffer COM
5. Fort Surber COMS A Figure 4 system allocated COM3 to USB virtual serial port Device Manager File Action View Help Hes ARA 437 IEEE 1394 Bus host controllers H a keyboards wT Mice and other pointing devices Monitors Network adapters nd Ports COM amp LPT a J Communications Pork fCOM1 Y Communications Port COM oe af CP210x USB to HART Bridge Controller COM3 ow YF Printer Port LPT1 H ne Processors H Sound video and game controllers Gg System devices E ELEERI eg PE A A et EA ETR P RE Simulator connection graph connect USB to PC simulation cap to target development board pay attention to the frequency selection DAA 8051 TRACER SIMULATOR DEBUGGER www 8951 com_ 6 Chapter 3 51TRACER simulator operation guide 51TRACER simulator works with powerful KEIL IDE in the CD the evaluation version is provided If you feel this software is good you can contact software vendor to get a professional version Due to the complex of the KEIL software if you are a beginner please follow below operation guide Hardware install first connect simulator to PC with a USB cable you will find a sound from speaker and also a green flash on the indicator which means system testing is OK Insert simulation cap into target board Pay attention to insertion direction B files must be C other directory does not work Software install copy CD
6. of the CPU If the direction is invert the system may become hot and light is dusky Please change the direction immediately Your target board may not works well maybe no correct clock and reset on it You can test it by burning a program into the chip if the burning is OK it means the target board is correct Need extra power for target board wa 8051 TRACER SIMULATOR DEBUGGER ww Si com S Silat cap sould ovis 5v 500ma power saps the target board in normal case it is enough If you fell it is not enough you can provide an extra 5V power by yourself The system is designed for protecting it from too high voltage power supply o Why some port is not active Maybe the simulator cap connection is not tight If possible please unpack the simulator and have a measure on it by a multimeter 410 Is the clock and reset of the target board is still functional When using 51 TRACER simulator the clock and reset of the target board is taken over by the simulator Bh Why the program is not stable Please insert one line before main function if C code char code dx516 3 _at_ 0x003b Please Skip interruption vector area until 0050H if ASM code like org OOOOH jmp main org 0050H main program starting point If you do not follow above instruction when loading program the simulator will generate dididi alarm sound and the simulation result maybe not correct As the development of
7. 2MHz and 24MHz One can select any one of them push up the switch to ON position Attention it must have one and only one switch is set to ON else the simulator may work abnormally State indication this light is a double color LED A single green flash means system reset Continuous green flash means system running Red color is for system self testing ON means low level TTL on P1 0 port Reset button two buttons are the same one of them is for backup When assert a short press on it we can find a single green flash and a sound from speaker this means the system is reset When assert a long press on it more than 3 second we can find continuous green flash and two sounds from speaker this means the system Is running offline aw 8051 TRACER SIMULATOR DEBUGGER www 8951 com_ 3 Chapter Two USB driver installation guide 8 Step 1 Connect usb socket to usb interace on PC with a usb cable It is shown founding new hardware wizard choose from list or specified location advanced option and click next 51TRACER adopts USB communication please follow below steps to install USB driver f Found New Hardware Wizard This wizard helps you install software for CP210 USB to UART Bridge Controller 9 If your hardware came with an installation CD ZEA or floppy disk insert it now What do you want the wizard to do Install the software automatically Recommended Install from a list or specific lo
8. CP210 USB to UART Bridge Controller Coma E oo AY Printer Port LPT1 Processors Sound video and game controllers i System devices let ee eel Oem 2k lle gt Simulation needs KEIL uv2 version 7 0 or higher version Note some early version is not compatible also the software must be installed under C root directory can not be other directory When creating new file DO NOT save it in other directory also no Chinese character file name Please strictly follow 1 8 ascii char xxx filename style Make sure the COM port selection is correct If it is a new system that have not been installed other USB device before then the COM number should be COM3 Because simulation and programming both need COM port so when doing simulation please close XLISP programming or other similar debugging software that may occupy some COM port 4 Make sure the simulator is reset well Please press down the reset button We can find a single green flash and a sound from speaker and this means the system is reset When assert a long press on the reset button more than 3 second we can find continuous green flash and two sounds from speaker this means the system is running offline Os Check if the oscillation frequency is setup OK One an only one frequency can be set Be Check if the simulator cap insertion direction is correct Pay attention to make the first PIN of the cap red align to first pin
9. DS a E E E S Chapter One Introduction 51 TRACER 2 WWW 51051 COM amp and beginners often can not afford it Meanwhile a large volume of simulator designed with SST single chip Currently the price of most professional 51 simulator in the market is more than 2000yuan about US 300 solution is very slow and occupies much resources and it is not enough for real application 51 TRACER simulator is a brand new professional simulator developed by Xuelin Electronics Shenzhen who owns the full intellectual property on it Top ten innovations amp It adopts the latest high tech air class magnesium alloy case and imported flannel fabric bag 2 A large number of devices using the latest technology and all SMT installed Adopt imported tantalum capacitor Os Comprehensive protection to avoid any possible mistakes The power supply adopts fast recovery insurance even if short circuit it could be effectively protected All IO ports are designed with anti shock resistance and USB port is also designed with electrostatic prevention of the lightning strike 6 Single USB interface no extra power supply or serial port real plug in peripheral Convenient for desktop or laptop without RS232 interface This product adopts 3 chip structure that is simulation chip monitor chip USB chip which is a real individual simulator Os High speed of downloading at 115200bps compared with the previous version it is improved by more t
10. SB communication not RS232 please choose the virtual COM number that the system allocates i Target Setup Comm Fort Settings Cache Options Porte Eom 3 gt y M Cache DATA SFR Baudra g jiis200 WV Cache IDATA W Cache DATA Stop Program Execution with i E T e Cache CODE Interrup ti click icons that shown as below photo to compile the code or press down F7 after successful compilation you will see the result at the bottom window like 0 error O warning E File Edit view Project Debug Flash Peripherals Tools Svcs Window Help agawhi B K Wo 3 4Q mna ga m m ka i gtiTagett1 x PEERAA AR AARAA AARRE RAAR A EER EEE EEE EERE y Target 1 org 0000h Source Group 1 ajmp start E 001 asm org 0030h Start mawr a NFFfFh Build target ou i assembling OOl asm linking ogram Size data 6 0 xdata 0 code dene hex file from ssss out Window Beginner may often have error when writing program Let us change the 3 line from ORG 0080H to RRG 0080H and do compilation and linking Due to the syntax error we can see 001 ASM 3 error A9 SYNTAX ERROR in the bottom window Double click this message locate to error line after correction recompile and link until 0 Cerror O Cwarning fo eee ae ron C 001 asm E Ele Edit View Project Debug Flash Peripherals Tools SVCS Window Help d Sr su
11. age like Connected to monitor 51 v9 1 Cif not please check the setting carefully Running with Code Size Limit 2k Connected ta Monitor 51 V9 1 jLoad Cis ss ssss gt 2 lasm ASSIGN BreakDisahble BreakEnable Hr a E h Build Command Find in Files Ready Output window successful connection message for simulation Chapter 4 51TRACER debugging tips After enter debugging mode we can see following debugging menu bar most debugging menu items has corresponding shortcut icon ef EO amp PiP REY BEE A From left to right they are reset run pause step into into function call step over skip function call run until current function exit run to current line next state open trace watch trace disassemble window watch window code scope analyze 1 serial window memory window performance analyzer tool icon Press down the 2 icon and connect related experiment resources This example connect P1 port JP44 to 8way indicators JP32 with a 8pin line Then we can see the 8 lights turned on one by one L stepinto 4 click Debug gt Step or the 4 icon or shortcut key F11 to trace program running process Here once press down F11 key the line is executed pointed by the arrow At the same time the arrow moves to next line If function all exists in the program then simulation will get into that function and continue run as single step style 2 step over p If the Delay program i
12. cation Advanced Click Next to continue Step 2 choose include this location for searching click browsering switch to CD folder like E drivers XLISP drive USBDRIVER2 0V click next Found New Hardware Wizard Please choose your search and installation options ae cy Search for the best driver in these locations Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed C Search removable media floppy CD ROM Include this location in the search E DRIVERS usbdriver2 0 iv Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware step 3 it is shown hardware installation dialog if the system prompts not pass windows icon testing just ignore it and click continue we can see the software installation is started When it is shown complete new hardware wizard dialog click complete Found New Hardware Wizard i Completing the Found New Hardware Wizard The wizard has finished installing the software for F CP210x USB to UART Bridge Controller Click Finish to close the wizard aT COIR A II ATAN JG NAFN STN TT L HY z t _ KH W V LJ AN JIAN
13. developing tool KEIL to C remove readonly attribute of all HEDI Wve amp ior click Project menu select New Project input project name like test The extension of the saved file is uv2 which is project file extension name of KEIL uVision2 After this we can click this file to open the project Execute keil uv2 uv2 exe You can create a shortcut at the desktop as your wish create your first project software operation guide Attention DON T type file extension name At this moment it is shown a dialog to choose sing chip type Let us choose ATMEL AT89C51 Note we actually use 89s52 it is totally compatible with AT890C52 SA A te Ate TIFE R ee CPU ls Vendor Atmel Device ATS89C51 Family MCS 51 Data base AT 48801 E ATS7F51 C ATS7F51RC C ATS7F52 E 4T89C1051 C AT89C1051U C AT89C2051 C AT89C4051 C ATS89C52 9 ATS89C55 C ATS9F51 F Use Extended Linker LX51 instee Description 8051 based Full Static CMOS controller with Three Lev 32 1 0 lines 2 Timers Counters 6 Interrupts sources 4K Flash Memory 128 Bytes On chip RAM SE Cl Cancel aw 805 CE SIMULATOR DEBUGGER www 8951 com_ SS o create ASM source click FILE gt NEW to open a text edit window Input a program like marqueen lights then click FILE gt SAVE note the file extension name must be asm such as C prog 001 asm Attention no Chines
14. e character for file name and not more than 8 ASCII chars make sure the filename is like 1 8 ASCII char asm Save in Se Local Disk C do e E boot 3 WINDOWS Documents and Settings bsmain_runtime log E keil Program Files A RavBin O TOCOWNLOAD Save az Ippe AI Files 5 Cancel ATTENTION Please insert one line before main function if C code char code dx516 3 _at_ 0x003b Please Skip interruption vector area until 0050H if ASM code like org OOOOH jmp main org 0050H main program starting point If you do not follow above instruction when loading program the simulator will generate dididi alarm sound and the simulation result maybe not correct As the development of the single chip machine technology 00 40H is occupied by more and more new registers not the original OO 30H If your program is still 30H please adjust it to 40H or 50H 80H If you have any question about it please refer the program examples in the CD they are all tested click before Target 1 get to Source Group 1 right click it and select Add files Group Source Group 1 load one assemble source file into this project 8051 TRACER SIMULATOR DEBUGGER www 8951 com_ 8 Project Workspace x Se Target 1 E Source Group Options for Group Source Group 1 mat Tarnet Rebuild target Remove Group Source Group 1 and it s Files V Include
15. g B O A Hs He Dl gt amp G amp Qrnrk ar G l 2 EE sta Target 1 al mov all 0ffh 4 Source Group 1 iv noy r2 0Sh loop for 6 times iBuild target ee i error A45 UNDEFINED SYMBOL PASS 2 Output Window Build Command A Find in Files j IK a L 20 C 25 aw RACER SIMULATOR DEBUGGER www 8951 com_ 10 At this moment we can see test hex file is seneraied undei the project directory Once we have this hex file we can burn it into the CPU chip by ISP downloading Then we can do hardware simulation Insert simulator cap into 40PIN socket on the target board and begin simulation 8 Press down the 3 icon debug as shown in below photo to begin simulator or press Ctrl F5 shortcut is ssss Mision C 001 asm B File Edit View Project Debug Flash Peripherals Tools S C5S Window Help oo e 4 3G Al a serg A C Project Workspace Piciri i iia i i a a Target 1 H E Source Group 1 001 asm z shift light understanding register PA ea F datet Ot s 25 pt SEESton 3 0 zt author Xuelin Electronics Shenz z mail 5xj19740163 con website http rww 51lc51 cou E Ciir r a a a a a a a a a a a aa aa a a r r a a a a ar a 4 hardware verfied on XL400rxL600 xL eiir r a a a a a a a a a a a a a ra CopyrightiC ruelin Electronics wi o Ey File P Build target Target 1 assembling 001 asm see lum en oe It is shown mess
16. han 10X Not occupy resources no limit to simulate 32 I O ports serial port T2 etc Compatible with keilC51 UV2 ID support single step breakpoint view modify register variable IO and memory data anytime Support pause during full run the system will stop at point to the next line to be executed Support simulation of all kinds of 51family chips ATMEL Winbond INTEL SST and ST Support simulation of ALE disable PCA double DPTR and hardware SPI Os Multi frequency crystal options could select 4 11 0592 12 24 MHz as you wish Solve the unstable issue caused by long crystal cable Bo Designed with system self testing with speaker and LED indicator convenient for debugging 10 Designed with long pressing reset button to enter offline running mode from PC perspective the simulator works like a real chip on the target board 8051 TRACER SIMULATOR DEBUGGER www 8951 com_ 2 B 51 TRA System configuration one simulator once USB cable one 40PIN simulator cap with DIP one manual textile bag one CD KEIL software evaluation If you buy this product with testing instrumental of XLxxxx series from our company then it is not necessary to buy extra USB cable simulator cap and the CD Hardware overview USB PORT ya Toe j 3 USB interface connect USB cable to PC has the functionality of power supply and communication Crystal selection from left to right oscillation frequency is 4MHz 11 0592MHz 1
17. here is same as register value E El a ia a CC U2 EO UO FP FE SP FE PE EF PE 0xE8 91 OO OO OO OO OO OO FF OxFO OO FF FF FF FF FF FF FF UxFo FF OO 00 00 00 OO OO FF 0x00 FF FF FF FF FF FF FA 9C 0x08 07 OO 50 00 00 OO OO FF r0x10 PFPE FE FE FF EF FF PE EF vio FE PPPE PE Pr PE PP TE 020 FF FF FF FF FF FF FF FF l bM E a A Ea e A Fiaa OA IF Click Memory 2 tab we can monitor another memory area BO aa ta O F AEE Memory 3 and Memory 4 is the same Modify data over Memory window MOOS a G o The data in Memory window is modifiable For example if we want to modify the value at address 0XE0 move the mouse to the display position right click the value and select Modify Memory at D 0xE0 input the data at the dialog xi Deh Bi HATE D 0e0h jo FF FF FF FF FF FF FF til FF THS FF ane FF Asciih jh Ceum View data by command window For example if we want to view data space from address 0x01 to 0x03 we can input D 0x01 03H inthe command window D means data space 0x01 is staring address 03H is ending address The data value is displayed in the output window Modify data by command window For example if we want to change the value of p1 port from 0x02 to 0x05 only need to input p1 0x04 in command window Then we can input d 00h to show if the data is modified Z Files et es Pe Ef Connected to Monitor 51 V9 t3 a d Load C test
18. ress F5 program pauses at the second break point 1l clear all break points If want to cancel all breakpoints clear one by one is awesome we only need to click this icon to clear all break points in the program 12 run to cursor Click reset button Ut start the simulation Click one line the we want to pause then click this run to cursor icon we Can see program pauses at this line 13 exit simulation rey First press down pause icon then reset and ray exit simulation mode At this time we can modify the program source then we can do compilation and simulation ATTENTION Because KEIL software keeps communication with simulator under simulation mode please better exit as above steps DO NOT force to exit else PC will down _ 16 Chapter 5 FAQ Why the connection cannot be established under simulation mode USB driver may have not been setup successfully Please check if it is OK at control panel system hardware device manager If you can see the COM port number information shown like below photo If not please reinstall the USB driver or change to another PC and have a try sometimes if the USB port number is changed USB driver should also be reinstalled 5 Device Manager File Action wiew Help Hee a9 IEEE 1394 Bus host controllers la Keyboards j i Mice and other pointing devices E Monitors Eg Network adapters li Ports COM amp LPT Communications Port COM1 ay Communications Pork OMe 1
19. s wrong it could be debugged by step into However if we already know the program is correct then it is not efficient to single step into it for each run We can use F10 instead of F11 to avoid it menu Step Over is also OK When executed to Delay in main function we can see the delay function is executed as a single statement 3 full run J Click this icon 5 to staring full run We can see LEDs turned on one by one on the target board Register Value Regs 4 pause Off Off Click this icon or corresponding menu we can see only one LED is on 5 view modify register value Project window will show registers under debugging mode which includes values of working registers RO R7 A B and SP a 12 Except for viewing the register value user can also modify them For example change the value of register A from 0x62 to 0x85 Method 1 click register a with the mouse and then click the value when prompted with textbox input 0x85 Method 2 in the command window input A 0x85 then press enter key to change register A value to 0x85 6 view modify memory value Click menu View gt Memory Windows we will see memory window The Memory Window displays 4 different storage areas Click window number could switch among them In Memory 1 tab input D 0eOh and press enter key we can see memory values are displayed from address EOH Note EOH is the address of register A so the value
20. set 8 reset RS If want to rerun the program you can click the reset icon and reset the simulator After resetting is done the PC counter is set to OOOOH Meanwhile some internal registers are also reset like set A to OOH DPTR to OOOOH SP to 07H I O port to OffH At this moment all the LEDs connected to P1 port on the target board 9 set break point alll Move the cursor to the source line like MOV P1 0B6H click the break point icon we can see a red mark on the left of the line click this mark will remove it We can set more breakpoints by this way 15 m roy Silly SiBE A B a st zll MAIN MO Pl 0DBH 11011011 ACALL DELay Moy F1 06DH 701101101 ACALL DELay P1 0R6H ACALL DELay AJMF MAIN delay moy r7 255 aketF ASF 10 full run with breakpoints mmm mA Press F5 key to start full run when the breakpoint is encountered the program will pause at that line At this moment you can see values of variables and ports As below photo the first breakpoint is after the line mov 01 06dh input D 000h at the Memory 1 window we can see the value is really 6D UKY VUON MOV Pl 0DBH 311011011 B4 701101101 D 710110110 ACALL DELa AJMP MAIN mov r7 255 EnF E noy r6 255 djnz r6 d2 Hati fa 00h Ih SUG FE FE FF FE FF EFE FEF FE FE FF FEF FF FF FF EF PF FF FF The target board will display the state of current break point Continue p
21. the single chip machine technology 00 40H is occupied by more and more new registers not the original OO 30H If your program is still 30H please adjust it to 40H or 50H 80H If you have any question about it please refer the program examples in the CD they are all tested 12 If cannot make certain what is wrong with it please long press down the reset button to offline running mode If the program still does not work well please check your program s If you want to simulate 2051 please refer to the pin definitions of 2051 and 51 and try to make an interface adaptor Usually we suggest you just use the 51 simulation and avoid the resources that not exist in 2051 Below is the photo of simulator XL2000 connection connect USB to PC simulator to target board note the frequency 51TRACER simulating XL2000 photo

Download Pdf Manuals

image

Related Search

Related Contents

  HD1521 - Mackie  Untitled  Samsung RT27SCSS دليل المستخدم  Silvercrest SKD 1000 A3 User manual  適切なチャイルドシートを    QNAP Surveillance VS-8124U-RP Pro  Lexmark W820/X820e/X830e/X832e Service Manual  SATELLITE PRO L500  

Copyright © All rights reserved.
Failed to retrieve file