M68ICS05KJ Freescale Semiconductor, M68ICS05KJ Datasheet

no-image

M68ICS05KJ

Manufacturer Part Number
M68ICS05KJ
Description
SIM PROGRAM FOR 68HC705KJ/J1A
Manufacturer
Freescale Semiconductor
Type
Simulator/Programmerr
Datasheet

Specifications of M68ICS05KJ

Contents
Programmer, Power Supply, Assembler/Simulator/Debugger, Cable, Software and Documentation
For Use With/related Products
68HC705KJ/JIA
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
M68ICS05KJOM/D
October 1998
M68ICS05KJ
HC705KJ/J1A IN-CIRCUIT SIMULATOR
OPERATOR’S MANUAL
© MOTOROLA Inc., 1998; All Rights Reserved

Related parts for M68ICS05KJ

M68ICS05KJ Summary of contents

Page 1

... HC705KJ/J1A IN-CIRCUIT SIMULATOR OPERATOR’S MANUAL © MOTOROLA Inc., 1998; All Rights Reserved M68ICS05KJ M68ICS05KJOM/D October 1998 ...

Page 2

Important Notice to Users While every effort has been made to ensure the accuracy of all information in this document, Motorola assumes no liability to any party for any loss or damage caused by errors or omissions or by statements ...

Page 3

... ABOUT THIS USER’S MANUAL.......................................................................................1-3 1.7 QUICK START INSTRUCTIONS........................................................................................1-4 1.8 CUSTOMER SUPPORT........................................................................................................1-6 CHAPTER 2 2.1 OVERVIEW...........................................................................................................................2-1 2.2 INSTALLING THE M68ICS05KJ POD................................................................................2-1 CHAPTER 3 SOFTWARE INSTALLATION AND INITIALIZATION 3.1 OVERVIEW...........................................................................................................................3-1 3.2 THE ICS05KJW SOFTWARE COMPONENTS ..................................................................3-1 3.2.1 The WinIDE Editor .......................................................................................................3-1 3 ...

Page 4

... Copy ............................................................................................................................4-15 4.9.5 Paste ............................................................................................................................4-16 4.9.6 Delete...........................................................................................................................4-16 4.9.7 Select All .....................................................................................................................4-16 4.10 WinIDE ENVIRONMENT OPTIONS ..............................................................................4-16 4.10.1 Open Project ..............................................................................................................4-17 4.10.2 Save Project...............................................................................................................4-18 4.10.3 Save Project As .........................................................................................................4-18 4.10.4 Close/New Project.....................................................................................................4-18 4.10.5 Setup Environment....................................................................................................4-18 ii THE WinIDE USER INTERFACE M68ICS05KJOM/D ...

Page 5

... ASSEMBLER DIRECTIVES ................................................................................................5-8 5.6.1 BASE.............................................................................................................................5-8 5.6.2 Cycle Adder...................................................................................................................5-8 5.6.3 Conditional Assembly .................................................................................................5-10 5.6.4 INCLUDE....................................................................................................................5-10 5.6.5 MACRO ......................................................................................................................5-11 5.7 LISTING DIRECTIVES ......................................................................................................5-12 5.7.1 Listing Files.................................................................................................................5-12 5.7.2 Labels ..........................................................................................................................5-14 M68ICS05KJOM/D THE WinIDE USER INTERFACE (continued) ASSEMBLER INTERFACE CONTENTS iii ...

Page 6

... CPU WINDOW....................................................................................................................6-15 6.9.1 Changing Register Values...........................................................................................6-15 6.9.2 CPU Window Keyboard Commands ..........................................................................6-16 6.10 CHIP WINDOW ................................................................................................................6-16 6.10.1 Reading Values in the Chip Window........................................................................6-16 6.10.2 Chip Window Keyboard Commands ........................................................................6-17 6.11 CYCLES WINDOW ..........................................................................................................6-17 iv ASSEMBLER INTERFACE (continued) ICS05KJW SIMULATOR USER INTERFACE M68ICS05KJOM/D ...

Page 7

... Reset Processor..........................................................................................................6-32 6.21.2 Step............................................................................................................................6-32 6.21.3 Multiple Step .............................................................................................................6-33 6.21.4 Go ..............................................................................................................................6-33 6.21.5 Stop............................................................................................................................6-33 6.21.6 Repeat Command ......................................................................................................6-33 6.22 ICS05KJW WINDOW OPTIONS .....................................................................................6-34 6.22.1 Open Windows..........................................................................................................6-34 6.22.2 Change Colors ...........................................................................................................6-34 6.22.3 Reload Desktop .........................................................................................................6-35 6.22.4 Save Desktop.............................................................................................................6-35 M68ICS05KJOM/D CONTENTS v ...

Page 8

... B.2 FUNCTIONAL DESCRIPTION OF THE KIT.................................................................... B-1 B.2.1 The Emulator ............................................................................................................... B-2 B.2.2 Programming ............................................................................................................... B-2 B.3 TROUBLESHOOTING THE QUICK START.................................................................... B-3 B.4 TROUBLESHOOTING THE PROGRAMMER ................................................................. B-4 B.5 SCHEMATIC DIAGRAM, PARTS LIST, AND BOARD LAYOUT................................. B-5 vi ICS05KJW DEBUGGING COMMAND SET EXAMPLE PROJECT S-RECORD INFORMATION M68ICS05KJOM/D ...

Page 9

... The Window Menu ...........................................................................................................4-31 4-24. WinIDE with Subordinate Windows Cascaded ................................................................4-32 4-25. WinIDE with Subordinate Windows Tiled.......................................................................4-33 4-26. WinIDE with One Source Window Displayed and Remaining Windows Minimized .....4-34 4-27. The WinIDE Editor with Subordinate Windows Minimized............................................4-35 M68ICS05KJOM/D GLOSSARY INDEX FIGURES CONTENTS ...

Page 10

... Specify MACRO File to Record Dialog ............................................................................6-29 6-30. Specify Output LOG File Dialog.......................................................................................6-30 6-31. Logfile Already Exists Dialog ...........................................................................................6-30 6-32. A Sample Output Log File................................................................................................6-31 6-33. ICS05KJW Execute Menu ................................................................................................6-32 6-34. Window Menu ..................................................................................................................6-34 6-35. Change Window Colors Dialog ........................................................................................6-35 viii M68ICS05KJOM/D ...

Page 11

... Modify Memory Dialog .......................................................................................................7-58 7-4. Programmer Pick Window..................................................................................................7-67 7-4. Program EPROM Personality Window ..............................................................................7-68 8-1. CASM05W Window.............................................................................................................8-4 B-1. M68ICS05KJ Schematic Diagram ...................................................................................... B-6 B-4. M68ICS05KJ Board Layout.............................................................................................. B-11 1-1. M68ICS05KJ Specifications.................................................................................................1-3 3-1. The ICS05KJW Software Files.............................................................................................3-3 4-1. WinIDE Toolbar Buttons......................................................................................................4-8 4-2 ...

Page 12

... CONTENTS x M68ICS05KJOM/D ...

Page 13

... When you connect the pod to your PC and your target hardware, you can use the actual inputs and outputs of the target system during simulation of code. Use the M68ICS05KJ toolkit with any IBM-Windows 3.x or Windows 95-based computer with a serial port. 1.2 TOOLKIT COMPONENTS ...

Page 14

... An IBM-compatible host computer running Windows 3.x or Windows 95 operating system. Approximately 640 Kb of memory (RAM) and 2 Mb free drive space. A serial port for communications between the M68ICS05KJ and the host computer. 1.4 TOOLKIT FEATURES The M68ICS05KJ toolkit is a low-cost development system that supports in-circuit simulation. ...

Page 15

... Characteristic Temperature: Operating Storage Relative humidity Power requirement Dimensions 1.6 ABOUT THIS USER’S MANUAL This manual covers the M68ICS05KJ software, hardware, and reference information as follows: Chapter 2 Pod Installation Chapter 3 Loading and Initializing the ICS05KJW Software Chapter 4 WinIDE User Interface Chapter 5 ...

Page 16

... Typical Install option to install the files to your hard disk, or choose the Compact Install option to copy the files onto another diskette. Connect the M68ICS05KJ pod: connect the M68ICS05KJ pod to the host PC’s serial port using the included cable. Plug the cable into the pod connector P2. ...

Page 17

... WINIDE.INI file and close the Environment Settings dialog. Create a project file: The desktop and environment settings you make in the Environment Settings dialog are stored in the WINIDE.INI file and read each time you start the WinIDE editor. You may also choose to save project-specific desktop and M68ICS05KJOM/D INTRODUCTION 1-5 ...

Page 18

... CUSTOMER SUPPORT For information about technical assistance and ordering parts, contact the Motorola help desk: Telephone: (800) 521-6274 Fax: (512) 895-6146 Web site: http://www.mcu.motsps.com Mailing address: Motorola, Inc. MCTG Software Support, MD OE45 6501 William Cannon Drive West Austin, TX 78735 1-6 M68ICS05KJOM/D ...

Page 19

... This chapter explains how to install the hardware components of the M68ICS05KJ in-circuit simulator on your host PC in both interactive and standalone modes. When the M68ICS05KJ pod is connected to the serial port of a host PC, you can use the actual inputs and outputs of your target system during simulation of your source code. When the pod is not connected to the PC, you can use the ICS05KJW software as a standalone simulator ...

Page 20

... POD INSTALLATION 3. To run the ICS05KJW software with actual input and output from the target device, connect the M68ICS05KJ pod to the 16- or 20-pin DIP socket on the target board using the emulation cable included in the M68ICS05KJ kit. When this connection is established and the pod and target system are started up, the target system will provide inputs to and accept output from the ICS05KJW software ...

Page 21

... Because the WinIDE editor is modular, you may, for example, choose to substitute a third party C-compiler or other assembler for the CASM05W cross assembler provided in the toolkit. 3.2.2 CASM05W The CASM05W is a cross assembler that creates Motorola S19 object files and MAP files from assembly files containing 68HC05 instructions. M68ICS05KJOM/D SOFTWARE INSTALLATION AND INITIALIZATION CHAPTER 3 3-1 ...

Page 22

... M68ICS05KJ pod is attached to the host computer. If you want to use I/O from your own target board, you can attach the M68ICS05KJ pod to your board through the extension cable that comes with the toolkit. You can also program HC05KJ devices using the ICS05KJ board and ICS05KJW software ...

Page 23

... From the Windows 3.x Program Manager, double-click the WinIDE and/or ICS05KJW icon(s). From the Windows 95 Start Menu, select the WinIDE and/or ICS05KJW icon(s). You can start the ICS05KJW simulator alone or from within the WinIDE. M68ICS05KJOM/D SOFTWARE INSTALLATION AND INITIALIZATION NOTE Description ...

Page 24

... COM port, the Can’t Contact Board dialog appears, with options for changing the COM port or baud rate and retrying the connection, or choosing to run the simulator in standalone mode (with no input or output from the pod). The COM port assignment defaults to COM 1 unless you specify another port in the startup command. 3-4 NOTE M68ICS05KJOM/D ...

Page 25

... The Windows Integrated Development Environment (the WinIDE editor graphical interface for editing, compiling, assembling, and debugging source code for embedded systems using the M68ICS05KJ In-Circuit Simulator. The WinIDE interface consists of standard Windows title and menu bars, a WinIDE toolbar, a main window containing any open source or project file windows, and a status bar. The WinIDE components are labeled in Figure 4-1 and described in paragraph 4 ...

Page 26

... Launch the in-circuit simulator, compiler, debugger, or another program. 4.3.2 Main Window Components Figure 4-1 shows how the WinIDE main window might look during a typical editing project, and labels the standard window components: Title Bar: The title bar appears at the top edge of the main window and contains: 4-2 M68ICS05KJOM/D ...

Page 27

... GETTING STARTED 4.4.1 Prerequisites for Starting the WinIDE Editor Before you can start the WinIDE editor, the Windows operating environment must be running and the ICS05KJW software must be installed in the host computer. M68ICS05KJOM/D Figure 4-2. WinIDE Status Bar WinIDE USER INTERFACE 4-3 ...

Page 28

... WinIDE USER INTERFACE Remember that for the M68ICS05KJ to run in simulation mode, the asynchronous communications cable must connect the M68ICS05KJ pod on the platform board to the host computer, and the power to the M68ICS05KJ pod must be on. 4.4.2 Starting the WinIDE Editor To start the editor, select the WinIDE icon by double-clicking the ICS05KJW Program Group icon in the Windows 3 ...

Page 29

... This feature is useful if you are editing a large file. Markers can also be set, changed, navigated to, or cleared using options on the Edit shortcut menu (Figure 4-3). Open the Edit shortcut menu by clicking the right mouse button in any edit window. M68ICS05KJOM/D Figure 4-3. Edit Shortcut Menu WinIDE USER INTERFACE to switch ...

Page 30

... You may also change the extension of the passed filename, by specifying it within the %FILE% parameter. For example, to specify an .S19 extension on the current filename the user would specify a %FILE.S19% parameter. 4-6 Figure 4-4. Marker Sub-menu M68ICS05KJOM/D ...

Page 31

... The WinIDE Toolbar (Figure 4-5) provides a number of convenient shortcut buttons that duplicate the function of the most frequently used menu options. A tool tip or label pops up when the mouse button lingers over a toolbar button, identifying the button’s function. Table 4-1 identifies and describes the WinIDE toolbar buttons. M68ICS05KJOM/D Parameters passed to program MYPDA.ASM MYPDA ...

Page 32

... Save the file in the active source window (this button is a shortcut for the File - Save menu option). Save the active project (this button is a shortcut for the Environment - Save Project As menu option). Close the active source window (this button is a shortcut for the File - Close menu option). M68ICS05KJOM/D ...

Page 33

... Undo Redo Cut Copy Paste Delete Select All M68ICS05KJOM/D Description Open a new file window ("No name") Display the Open File dialog to choose a file to open Save the current file Open the Save As dialog to choose a directory and filename in which to save the current file ...

Page 34

... Arrange minimized window icons along the bottom edge of the main window Minimize all open windows Toggle a split window in the active file Itemize the open and minimized windows by name in order of opening Opens the WinIDE Help Contents Page of the Help File Displays the WinIDE About Window M68ICS05KJOM/D ...

Page 35

... WinIDE editor prompts you for a new filename. This new filename replaces the [NONAME#] in the title bar. Alternatives: Type Ctrl + N or click the New toolbar button. This is the keyboard equivalent to choosing the File - New File menu option. M68ICS05KJOM/D Figure 4-6. File Menu WinIDE USER INTERFACE 4-11 ...

Page 36

... Choose Save File As from the File menu to save the contents of the active source window and assign a new filename. The Save As dialog opens. Enter a new file name in the File Name field and click the OK button to save the file and return to the source window. 4-12 Figure 4-7. Open File Dialog M68ICS05KJOM/D ...

Page 37

... The Print dialog for your operating system and printer capabilities opens for you to choose Print range, Print quality, and open the Print Setup dialog to change printer settings. The Print option is active when at least one source window is open. The WinIDE editor disables the option if no window is open. M68ICS05KJOM/D Figure 4-8. Print Dialog NOTE WinIDE USER INTERFACE ...

Page 38

... Reversible actions are local to each source window. Commands that are not reversible do not contribute to the undo stack. You cannot, for example, undo the command to open a new window using the Undo command. Alternatives: Type Ctrl + Z. This is the keyboard equivalent to selecting the Edit - Undo menu option. 4-14 Figure 4-9. Edit Menu M68ICS05KJOM/D ...

Page 39

... Copy Choose Copy from the Edit menu to copy the selected text from the active source window to the Windows clipboard. The Copy option is available only if you have selected text in the active source window. M68ICS05KJOM/D WinIDE USER INTERFACE NOTE NOTE NOTE 4-15 ...

Page 40

... If there is an open project, the project file’s environment settings are read and used instead. This lets you have different environment configurations for different projects. Environment information stored in the WINIDE.INI file includes project is open, its name Current font information Current source directory and project directory paths 4-16 M68ICS05KJOM/D ...

Page 41

... Enter the project name in the File name: text box or select the project name from the list box below. 2. Press the OK button to open the new project file (or press the Cancel button to close the dialog without opening a file). M68ICS05KJOM/D Figure 4-10. Environment Menu WinIDE USER INTERFACE 4-17 ...

Page 42

... Choose Close/New Project from the Environment menu to: Close an active current project file Open a new project 4.10.5 Setup Environment Choose Setup Environment from the Environment menu to display the Environment Settings dialog box. The Environment Settings dialog contains five tabs: General Environment General Editor Assembler/Compiler 4-18 M68ICS05KJOM/D ...

Page 43

... If you do not select this option, the editor prompts you to save the open project when you exit. This setting only has an effect if a project is open when you exit. M68ICS05KJOM/D General Environment Tab NOTE ...

Page 44

... General Editor Tab Click the General Editor tab in the Environment Settings dialog (Figure 4-14) to bring the General Editor tab to the front. Use the General Editor tab to change editing options such as indentation, word wrap, and tab settings. 4-20 NOTE M68ICS05KJOM/D ...

Page 45

... Enter key. Wrap to Column: Select this option to wrap text to the left side when the cursor reaches a specified column. This lets you see all the text in the file, M68ICS05KJOM/D NOTE: General Editor Tab WinIDE USER INTERFACE ...

Page 46

... EXE Path: Enter the full path and executable name of the compiler in the text box. The extensions EXE/COM/BAT are legal. For a DOS executable or BATch file, you may want to create a PIF file to prevent the screen from changing video modes when the executable runs. 4-22 M68ICS05KJOM/D ...

Page 47

... Listing files are useful for debugging, as they let you see exactly where and how the code assembled. The output listing file has the same name as the assembly file, but with the .LST extension. M68ICS05KJOM/D Assembler/Compiler Tab WinIDE USER INTERFACE ...

Page 48

... WinIDE editor. If you do not save the file before assembling it, the assembler will assemble the last saved version. In general, you should leave this option checked. Sound Bell on Error: Select this option to have the assembler beep if it encounters an error. 4-24 run the assembler. This is important because the M68ICS05KJOM/D ...

Page 49

... Error Filename text box is found, the editor parses that file from end to beginning looking for the error. If the editor finds an error, it opens the file, highlights the error line, and displays the error in the status bar. M68ICS05KJOM/D WinIDE USER INTERFACE 4-25 ...

Page 50

... Environment Settings dialog to bring either tab to the front. Enter options for the general-purpose external programs, for example, the ICS05KJW, that you will be using with this project. The options are the same in both tabs. Figure 4-17. Environment Settings Dialog: EXE 1 (Debugger) and EXE 2 (Programmer) Tabs 4-26 Figure 4-16. Error Format List OPTIONS > ERROR.TXT M68ICS05KJOM/D ...

Page 51

... If you do not select this option, the editor starts the compiler, and allows Windows to manage the program. 4.10.6 Setup Fonts Select the Setup Fonts option in the Environment menu to open the Setup Fonts dialog (Figure 4- 18) to change font options in the editor. M68ICS05KJOM/D WinIDE USER INTERFACE 4-27 ...

Page 52

... Script: If you have installed multilingual support, use this option to choose a non- western script. 4.11 WinIDE SEARCH OPTIONS This section describes the WinIDE Search menu options for specifying search criteria and entering a line number source file. 4-28 Figure 4-18. Setup Fonts Dialog M68ICS05KJOM/D ...

Page 53

... The Find window is modeless and can remain open, allowing you to interact with either the Find dialog or the source window. Alternatives: Press Ctrl + F. This is the keyboard equivalent to selecting the Search - Find menu option. M68ICS05KJOM/D Figure 4-19. Search Menu Figure 4-20. Find Dialog NOTE ...

Page 54

... Go to Line Select the Go to Line option from the Search menu to open the Go to Line Number dialog (Figure 4-22). You may note line numbers in the Status Bar and use the dialog to navigate between points in the text. 4-30 Figure 4-21. Replace Dialog M68ICS05KJOM/D ...

Page 55

... This section describes the WinIDE Window menu options for managing the arrangement of open client windows in the main WinIDE window. To perform a Window operation, click once on the Window menu to open the menu (Figure 4-23). Click on the option to execute. M68ICS05KJOM/D Figure 4-23. The Window Menu WinIDE USER INTERFACE 4-31 ...

Page 56

... WinIDE main window, with their title bars visible. Figure 4-24. WinIDE with Subordinate Windows Cascaded To choose a window from the cascaded display, click on its title bar. This moves the selected window to the top of the stack, and makes it the active window. 4-32 M68ICS05KJOM/D ...

Page 57

... Figure 4-25. WinIDE with Subordinate Windows Tiled If the contents of a source window cannot be displayed in their entirety, use the scroll bars. The tiled arrangement is practical to use when cutting and pasting from one window to another. M68ICS05KJOM/D WinIDE USER INTERFACE 4-33 ...

Page 58

... Arrange Icons Select the Arrange Icons option from the Window menu to rearrange the icons of minimized windows into columns and rows at the bottom of the WinIDE main window (Figure 4-26). with One Source Window Displayed and Remaining Windows Minimized 4-34 Figure 4-26. WinIDE M68ICS05KJOM/D ...

Page 59

... Minimize All Select the Minimize All option from the Window menu to minimize all open source windows and display them as icons at the bottom of the WinIDE main window (Figure 4-27). Figure 4-27. The WinIDE Editor with Subordinate Windows Minimized M68ICS05KJOM/D WinIDE USER INTERFACE 4-35 ...

Page 60

... Adjust the relative size of the panes by dragging the split bar, a double horizontal line separating the panes. Position the pointer over the split bar until it changes to the split pointer (Figure 4-28). Figure 4-28. Cascaded Windows with Active Window Split 4-36 M68ICS05KJOM/D ...

Page 61

... Listing files show the original source code, or mnemonics, including comments, as well as the object code translation. You can use this listing during the debugging phase of the development project. It also provides a basis for documenting the program. M68ICS05KJOM/D CHAPTER 5 ASSEMBLER INTERFACE ASSEMBLER INTERFACE ...

Page 62

... Current File: the path and filename of the current file being assembled Status: the assembler status as the assembly proceeds Current Line: the current line position of the assembler Total Lines: the total number of lines in the file being assembled with CASM05W Assembler Window Displayed 5-2 Figure 5-1. WinIDE M68ICS05KJOM/D ...

Page 63

... In general, use the path to the program and its executable file name as the command line entry. You may also add optional command-line switches or parameters and the name of a specific file to run. M68ICS05KJOM/D ASSEMBLER INTERFACE Enter command line parameters ...

Page 64

... Figure 5-3. CASM05W for Windows Assembler Parameters 5.3 ASSEMBLER PARAMETERS You may configure the CASM05W assembler using the following parameters in the Windows command line. If you specify multiple parameters, separate them by spaces. You can enter the parameters in any order. All parameters default to off. 5-4 M68ICS05KJOM/D ...

Page 65

... The object filename depends on the choice made in the command line of the Windows Program Item Properties. By default, the object filename is that of the file being assembled, with the proper object file format extensions. An existing file with the same name will be overwritten. M68ICS05KJOM/D ASSEMBLER INTERFACE 5-5 ...

Page 66

... CASM05W. Remember that assembler directives must begin with the characters $, /, ., or #, and must begin in column necessary, use the BASE directive to change the default base for the operands (CASM05W defaults to hexadecimal base). 5-6 M68ICS05KJOM/D ...

Page 67

... The assembler also accepts ASCII constants. Specify an ASCII constant by enclosing it in single or double quotes. A character ASCII constant has an equivalent value: ‘A’ is the same as 41H. An example of a string constant is: db “this is a string” M68ICS05KJOM/D NOTE ;start is a previously defined label ;jump to location start + 3 ...

Page 68

... It is good practice to specify a base explicitly so that you are always sure that base is currently in effect. 5.6.2 Cycle Adder The CASM05W assembler contains an internal counter for instruction cycles called the cycle adder. Two assembler directives, CYCLE_ADDER_ON and CYCLE_ADDER_OFF, control this counter. 5-8 Base Prefix Suffix M68ICS05KJOM/D ...

Page 69

... If the parameter value is false, code between IF and ELSEIF will not be assembled, but code between ELSEIF and ENDIF will be assembled. ELSEIF gives the same alternative arrangement to a directive sequence that begins with IFNOT. ENDIF See IF, IFNOT, ELSEIF M68ICS05KJOM/D Table 5-2. Assembler Directives Action Action ASSEMBLER INTERFACE 5-9 ...

Page 70

... You may nest included to a maximum depth of 10, that is, each included file may contain additional included files. Examples $INCLUDE “INIT.ASM” $INCLUDE “C:\project\init.asm*" 5-10 ;sets debug = true ;sets test = false ;always assembles ;always assembles ;if debug = true ;assembles ;if debug = false ;does not assemble ;always assembles ;always assembles ;if test = true ;does not assemble M68ICS05KJOM/D ...

Page 71

... Although code may not jump into a macro, it may jump out of a macro. Macros cannot be forward-referenced. M68ICS05KJOM/D ;starts macro definition ;divides accumulator by 2 ;divides quotient by 2 ;ends macro definition ...

Page 72

... Environment Settings dialog, the listing file (.LST) is created during the assembly. This listing file has the same name as the file being assembled, but with the extension .LST. Any existing file with the same name will be overwritten. 5-12 Table 5-3. Listing Directives Action M68ICS05KJOM/D ...

Page 73

... Source The last field contains the actual source code from the source code file. code Listing The listing table provides a summary of every label and its value, displayed in table table format at the end of each listing file. M68ICS05KJOM/D [CC] VVVVVVVV LLLL Source Code . . . . [05] 1608 37 ...

Page 74

... Labels within macros must not exceed 10 characters in length. Examples: Label: ThisIsALabel: Loop_1 This_label_is_much_too_long: The assembler would truncate the last example to 16 characters. 5-14 porta equ $0000 portb equ $0001 portc equ $0002 portd equ $0003 ddra equ $0004 ddrb equ $0005 ddrc equ $0006 ddrd equ $0007 M68ICS05KJOM/D ...

Page 75

... On the second pass, the assembler generates the listing file and/or the S-record object file, as specified in the command line parameters for the assembler. This two-pass arrangement allows the programmer to reference labels that are defined later in the program. M68ICS05KJOM/D ASSEMBLER INTERFACE Action 5-15 ...

Page 76

... It is good practice to also specify interrupt vectors, even if you do not expect to use interrupts. 5.8.5 Reserve Memory Byte (RMB) Use this assembler directive to set aside space in RAM for program variables. The RMB directive does not generate any object code, but it normally generates an entry in the assembler’s internal cross-reference table. 5-16 M68ICS05KJOM/D ...

Page 77

... The opcode on the highlighted line is too long wrong. MACRO label too A label in the macro has 11 or more long characters. M68ICS05KJOM/D Probable Cause ASSEMBLER INTERFACE Corrective Action Declare the variable using the SET or SETNOT directive. Change the label to one not used already. ...

Page 78

... Limit conditional variables fewer. Create a file that consists only of an INCLUDE directive, which specifies your primary file. Assembling this file leaves the maximum memory available to the assembler. Declare the label. Correct the opcode or make it consistent with parameters. Insert the closing brace. M68ICS05KJOM/D ...

Page 79

... Remember that assembler directives must begin with the character $, /,., or #, and must start in column necessary, use the BASE directive to change the default base for operands (CASM05W defaults to hexadecimal). M68ICS05KJOM/D ASSEMBLER INTERFACE 5-19 ...

Page 80

... ASSEMBLER INTERFACE 5-20 M68ICS05KJOM/D ...

Page 81

... Windows 3.x and Windows 95. The ICS05KJW can get inputs and outputs (I/O) for the target device from an external pod, the M68ICS05KJ board, that is attached to the host computer. If you want to use actual inputs and outputs (I/O) from your own target board, you may attach the M68ICS05KJ board to your target board using the supplied extension cable ...

Page 82

... Project Files: Project files store two types of information: Desktop information includes all the information stored concerning the files that are currently open in the project. Whenever you save the project file, WinIDE records information about each window open in the desktop, including: Window size Window position 6-2 M68ICS05KJOM/D ...

Page 83

... CASM05W window. Depending on the environment settings, the assembler may also open the file in which the error was encountered, and create an error file with the assembly filename and the .ERR extension. M68ICS05KJOM/D SIMULATOR USER INTERFACE NOTE 6-3 ...

Page 84

... CC field will show the best case (lowest number). Hexadecimal digits (the number of which depends on the actual opcode) representing values put into that memory address. Line count. The actual source code M68ICS05KJOM/D ...

Page 85

... If the ICS05KJW software can communicate with the pod through the serial port, the status bar message reads, Contact with pod established. If the software is not able to connect with the board, the Can’t Contact Board dialog (Figure 6-1) appears. M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-5 ...

Page 86

... C-series devices (chips). If you want to open this dialog and change the device later, enter the CHIPMODE command in the ICS05KJW Status Window command line file named STARTUP.05KJ exists in the current directory, the WinIDE runs macro file on startup. See the MACRO command for more information. 6-6 NOTE M68ICS05KJOM/D ...

Page 87

... ICS05KJW command set can be entered (Figure 6-2). Figure 6-2. The ICS05KJW Windows Default Positions The ICS05KJW also displays these sub-windows when appropriate: Stack Window Trace Window Breakpoint Window Programmer Windows Register Block Window M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-7 ...

Page 88

... The Code Window Shortcut Menu (Figure 6-4) offers these options: Toggle Breakpoint at Cursor: Choose this option to set or remove the breakpoint at the current cursor location. Set PC at Cursor: Choose this option to set the Program Counter (PC) to the current cursor location. 6-8 with Breakpoint Toggled M68ICS05KJOM/D ...

Page 89

... Press the Page Up key to scroll the Code Window up one page. Press the Page Down key to scroll the Code Window down one page. Press the F1 key to show the Help Contents topic. Press the Escape (Esc) key to move the cursor to the command line of the Status Window. M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-9 ...

Page 90

... Select the variable type (size) and base. You may enter values for commands in the simulator as either labels (which you have defined in the map file or with the SYMBOL command numbers. You may 6-10 Figure 6-6. Variables Window with Shortcut Menu Figure 6-7. Add Variable Dialog M68ICS05KJOM/D ...

Page 91

... Clear All: Choose this option to clear all variables in the current variable list. 6.6.3 Variable Window Keyboard Commands Use these keys to navigate in the Variable Window: Press the Insert key to add a variable. Press the Delete key to delete a variable. M68ICS05KJOM/D Base Prefixes Suffixes 16 ‘$’ ...

Page 92

... Show as HEX and ASCII: Choose this option to display memory map information in both HEX and ASCII formats. Show as HEX Only: Choose this option to display memory map information in HEX format only, allowing more bytes per row. 6-12 Figure 6-8. Memory Window with Shortcut Menu M68ICS05KJOM/D ...

Page 93

... Press the End key to scroll the window to the last status line. Press the Page Up key to scroll the window up one page. Press the Page Down key to scroll the window down one page. Press the F1 key to display the Help Contents topic. M68ICS05KJOM/D Figure 6-9. Status Window SIMULATOR USER INTERFACE 6-13 ...

Page 94

... Choose Overwrite or Append to begin logging in the file or Cancel to close the dialog without opening the logfile. Figure 6-12. The Logfile Already Exists Message Status window messages are added to the logfile while logging is enabled. 6-14 M68ICS05KJOM/D ...

Page 95

... To change the CPU CCR values, double click the CCR value in the CPU window to open the Change CCR dialog (Figure 6-14). Change the CCR bits by pressing the button below each to toggle condition code register bits between 1 (on) and 2 (off). Press OK to close the dialog and save the values. M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-15 ...

Page 96

... Press the Escape (Esc) key to move the cursor to the command line of the Status Window. 6.10 CHIP WINDOW 6.10.1 Reading Values in the Chip Window Use the Chip Window (Figure 6-15) to see a visual representation of the logic levels at all pins of the chip. 6-16 NOTE M68ICS05KJOM/D ...

Page 97

... In order to calculate the timing of code for a device, take the number of cycles shown in the window and multiply by the amount of time that a cycle represents in the target system. (i.e. for a 2MHz HC05, the time per cycle is 500 ns (½ sec.) M68ICS05KJOM/D Figure 6-15. Chip Window SIMULATOR USER INTERFACE ...

Page 98

... The interrupt stack Data values in the stack Values of the condition code register (CCR), accumulator (A) and index register (X). This information indicates the restored state of the stack upon the return from the interrupt. 6-18 Figure 6-16. Cycles Window Figure 6-17. Stack Window M68ICS05KJOM/D ...

Page 99

... Trace Available". The number in the beginning of a trace line is the slot number in the trace buffer. The slot number is an offset for the instruction in that slot compared to the current instruction executing (slot number=0). M68ICS05KJOM/D NOTE Figure 6-18. Trace Window ...

Page 100

... Address text box. Press the OK button to close the dialog and save the new breakpoint. Figure 6-20. Edit Breakpoint Dialog You may qualify the breakpoint using these qualifiers: Count: Enter the number of times the address will be reached before breaking, i.e., break after n times (the default is n=1). 6-20 Figure 6-19. Breakpoint Window with Shortcut Menu M68ICS05KJOM/D ...

Page 101

... Removing All Breakpoints In the Breakpoint Window, click the right mouse button to open the Breakpoint Shortcut Menu. Choose the Remove All Breakpoints menu option to clear all breakpoints. Press the OK button to M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-21 ...

Page 102

... Use the Programmer Windows to enter or display programming information and to choose the files to upload or download. The KCS05KJW software controls the M68ICS05KJ pod’s programming sockets XU7, XU8, and XU9, and sends RESET, CLOCK, DATA, and other control signals to the pod by means of the serial connection ...

Page 103

... I/O, timer, and COP Watchdog Timer). You can view the registers, modify values, and store results in memory. M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-23 ...

Page 104

... The ICS05KJW Toolbar (Figure 6-25) provides a number of convenient shortcut buttons that duplicate the function of the most frequently used menu options. A tool-tip or label pops up when the mouse button lingers over a toolbar button, identifying the button’s function. Table 6-2 identifies and describes the WinIDE toolbar buttons. 6-24 Figure 6-25. ICS05KJW Toolbar M68ICS05KJOM/D ...

Page 105

... Go Stop Play Macro Record Macro Stop Macro Function Open Logfile Close Logfile M68ICS05KJOM/D SIMULATOR USER INTERFACE Button Function Return to the WinIDE editor. Open the Specify S19 File to Load dialog to choose an S19 file. Reload the last (most currently loaded) S19 file. Simulate a reset of the MCU and sets the program counter (PC) to the contents of the reset vector (does not start execution of user code) ...

Page 106

... Close the ICS05KJW simulator. Reset the emulation MCU and program counter to the contents of the reset vector. Execute the STEP command. Execute the STEPFOR command. Execute the GO command. Stop code execution. Repeat the last command entered in the Status Window command line. M68ICS05KJOM/D ...

Page 107

... To perform a File operation, click once on the File menu (Figure 6-26) title to open the menu. Click on the option to execute. The following topics describe and explain the ICS05KJW File operations and dialogs. M68ICS05KJOM/D Description Toggles the Code 1 Window open/closed. Toggles the Code 2 Window open/closed. ...

Page 108

... S19 or .MAP file to open in the Debugger main window. Follow the procedure for loading an S19 file (above). Alternatives: Press the F3 function key or click the Reload Current S19 toolbar button. These are the keyboard equivalents to choosing the File - Reload Last S19 menu option. 6-28 M68ICS05KJOM/D ...

Page 109

... File - Play Macro menu option. Alternatives: Press the Ctrl + M key combination or click the Record Macro toolbar button These are the keyboard equivalents to choosing the File - Record Macro menu option. M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-29 ...

Page 110

... Cancel the Open Logfile command without saving logging information Figure 6-31. Logfile Already Exists Dialog The open log file does not appear in the Debugger window. To enable logging in a currently active logfile, you must execute the LF (Log File) command as well, otherwise no logging occurs in the open log file. 6-30 M68ICS05KJOM/D ...

Page 111

... Exit Choose Exit from the File menu to close the Debugger application. Alternative: Type Ctrl + X to exit the Debugger application and close the subordinate and main windows. This is the keyboard equivalent to choosing the File - Exit menu option. M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-31 ...

Page 112

... Step command executes a single instruction, beginning at the current program counter (PC) address value. The Step command does not execute instructions in real-time, so timer values cannot be tested using this command. Alternative: Press the F5 function key. This is the keyboard equivalent to choosing the Execute - Step menu option. 6-32 NOTE M68ICS05KJOM/D ...

Page 113

... Choose Repeat Command from the Execute menu to repeat the execution of the last command entered in the Status Window command line. Alternative: Press the F9 function key. This is the keyboard equivalent to choosing the Execute - Repeat Command menu option. M68ICS05KJOM/D SIMULATOR USER INTERFACE NOTE 6-33 ...

Page 114

... Press the OK button to save the color changes (or press the Cancel button to close the dialog without saving changes). Some window items allow only the foreground or background to be changed. 6-34 Figure 6-34. Window Menu M68ICS05KJOM/D ...

Page 115

... Save Desktop Choose Save Desktop from the Windows menu to save the current configuration of the desktop, the position and size of the windows in the ICS05KJW simulator. M68ICS05KJOM/D SIMULATOR USER INTERFACE 6-35 ...

Page 116

... SIMULATOR USER INTERFACE 6-36 M68ICS05KJOM/D ...

Page 117

... Detailed descriptions of the commands, with example usage The ICS05KJW simulator command set consists of commands for simulating, debugging, analyzing, and programming microcontroller programs. Use the commands to: Initialize emulation memory Display and store data Debug user code Control the flow of code execution M68ICS05KJOM/D DEBUGGING COMMAND SET CHAPTER 7 7-1 ...

Page 118

... In command syntax descriptions brackets enclose optional items vertical line means or, ... an ellipsis means that you can repeat the preceding item parentheses enclose items only for syntactical purposes Except where otherwise noted, numerical values in debugging command examples are hexadecimal. 7-2 M68ICS05KJOM/D ...

Page 119

... Operator <op> M68ICS05KJOM/D Table 7-1. Argument Types Explanation Hexadecimal values, unless otherwise noted. For decimal values, use the prefix ! or the suffix T. For binary values, use the prefix % or the suffix Q. Example !100 = 100T = %1100100 = 1100100Q. ...

Page 120

... Remove the current MAP file from memory. CLEARSYMBOL Remove all user-defined symbols from memory. COLORS Set simulator colors CY Change the value of the cycles counter. CYCLES Change the value of the cycles counter. DASM Disassemble machine instructions, display addresses and contents as disassembled instructions in the Code Window. 7-4 Description M68ICS05KJOM/D ...

Page 121

... Show the simulated input values to Port A and B. INT View or assign the state value of the MCU IRQ pin. (Identical to the IRQ command.) IRQ View or assign the state value of the MCU IRQ pin. (Identical to the INT command.) M68ICS05KJOM/D DEBUGGING COMMAND SET Description 7-5 ...

Page 122

... CLEARMAP command.) NOSYMBOL Remove all user-defined symbols from memory; symbols defined in a loaded MAP file are not affected by the NOSYMBOL command. PC Assign the specified value to the MCU program counter. 7-6 Description M68ICS05KJOM/D ...

Page 123

... Save the desktop settings for the ICS05KJW program when it is first opened or for use with the LOADDESK command. SCRIPT Execute a macro file containing debug command sequences. (Identical to the MACRO command.) SHOW Display the contents of memory locations in the Memory Window beginning at the specified address. (Identical to the MD command.) M68ICS05KJOM/D DEBUGGING COMMAND SET Description 7-7 ...

Page 124

... Step through instructions starting at current PC address and continue until PC value reaches the specified address, or until keypress, breakpoint, or error occurs. SYMBOL View current or create new symbols. SYSINFO Show the amount of system memory available to the ICS05KJW and the largest memory block available. 7-8 Description M68ICS05KJOM/D ...

Page 125

... Set the X register to the specified value and display in the CPU Window. (Identical to the X command.) Z Toggle the Z bit in the CCR. 7.4 COMMAND DESCRIPTIONS The following sections, which are arranged alphabetically by command name, describe the commands in detail. M68ICS05KJOM/D DEBUGGING COMMAND SET Description 7-9 ...

Page 126

... The ACC command sets the accumulator to a specified value. The value entered with the command is shown in the CPU window. The ACC and A commands are identical. Syntax: ACC <n> where: <n> The value to be loaded into the accumulator. Example 7-10 Set Accumulator Value Set the accumulator to $10. M68ICS05KJOM/D ...

Page 127

... ASM 100 The Assembly Window appears as shown on the left of Figure 7-1; the Assembly Window with the ASM command and no argument is shown on the right). Figure 7-1. Assembly Window with (left), without (right) Argument M68ICS05KJOM/D DEBUGGING COMMAND SET Assemble Instructions ASM Command 7-11 ...

Page 128

... The BELL command sounds the PC bell the specified number of times. If you enter no argument, the bell sounds once. To turn off the bell sounding, press any key. Syntax: BELL [<n>] where: <n> The number of times to sound the bell. Example: BELL 3 7-12 Ring PC bell 3 times. Sound PC Bell M68ICS05KJOM/D ...

Page 129

... If the word variant (.W) is used , then <n> must be a 16-bit value. If the long variant (.L) is used , then <n> must be a 32-bit value. Examples 300 31F 4143 M68ICS05KJOM/D Store FF in bytes at addresses C0-CF. Store word value 4143 at addresses 300-31F. DEBUGGING COMMAND SET Block Fill Memory 7-13 ...

Page 130

... Select Toggle Breakpoint at Cursor option. If there is no current breakpoint set at this line of code, a breakpoint will be set. If there is a current breakpoint set at this line of code, the breakpoint will be removed. To remove all breakpoints: Enter the NOBR command in the Status Window command line. 7-14 Set Instruction Breakpoint NOTE M68ICS05KJOM/D ...

Page 131

... The address for a breakpoint. <n> Break after value: code execution passes through the breakpoint 1 times, then breaks the Examples: BR 300 BR 330 8 M68ICS05KJOM/D th time it arrives at the breakpoint. n Set a breakpoint at address 300 Set a breakpoint at address 330, break on eighth arrival at 330. DEBUGGING COMMAND SET (continued) - ...

Page 132

... Position the cursor on that address in the code window, then press the right mouse button, and select Toggle Breakpoint at Cursor menu item. Syntax: BREAKA [<n> [<address>]] where: <n> Accumulator value that triggers a break in execution. <address> Optional address for the break in execution (provided that the accumulator value equals n). 7-16 Set Accumulator Breakpoint NOTE M68ICS05KJOM/D ...

Page 133

... BREAKA Examples: BREAKA 55 BREAKA BREAKA 55 300 M68ICS05KJOM/D Break execution when the accumulator value equals 55. Cancel the accumulator breakpoint. Break execution at address 300 if accumulator value equals 55. DEBUGGING COMMAND SET (continued) 7-17 ...

Page 134

... If you enter the BREAKSP command with an address value, you may clear the stack pointer breakpoint by one of these methods: Enter the NOBR command Position the cursor on that address in the code window, then press the right mouse button, and select Toggle Breakpoint at Cursor menu item. 7-18 Set Stack Pointer Breakpoint NOTE M68ICS05KJOM/D ...

Page 135

... Optional address for the break in execution (when that the stack pointer value equals Examples: BREAKSP E0 BREAKSP BREAKSP E0 300 M68ICS05KJOM Break execution when the stack pointer (SP) value equals E0. Cancel the SP breakpoint. Break execution at address 300 if SP value equals E0. DEBUGGING COMMAND SET (continued) ...

Page 136

... Toggle Breakpoint at Cursor menu item. Syntax: BREAKX [<n> [<address>]] where: <n> Index register value that triggers a break in execution. <address> Optional address for the break in execution (when that the index register value equals 7-20 Set Index Register Breakpoint NOTE ). n M68ICS05KJOM/D ...

Page 137

... BREAKX Examples: BREAKX A9 BREAKX BREAKX A9 300 M68ICS05KJOM/D Break execution when the index register value equals A9. Cancel the index breakpoint. Break execution at address 300 if index register value equals A9. DEBUGGING COMMAND SET (continued) 7-21 ...

Page 138

... N is negative zero and C is carry). A letter in these designators means that the corresponding bit of the CCR is set; a period means that the corresponding bit is clear. Syntax: C 0|1 Examples 7-22 NOTE Clears the C bit of the CCR. Sets the C bit of the CCR. Set/Clear Carry Bit M68ICS05KJOM/D ...

Page 139

... Location to be monitored for a change in value. Examples: CAPTURE PORTA CAPTURE C0 CAPTURE M68ICS05KJOM/D Capture Changed Data NOTE Monitor location PORTA for any value changes. Monitor RAM location C0 for any value changes. Monitor for any value changes in an array of locations. DEBUGGING COMMAND SET 7-23 ...

Page 140

... The capture file must be closed within a reasonable time, to prevent the file from growing large. Syntax: CAPTUREFILE [<filename> A]] where: <filename> Name of the capture file. Examples: CAPTUREFILE TEST.CAP CF TEST4.CAP A 7-24 Open/Close Capture File NOTES Open capture file TEST.CAP Open capture file TEST4.CAP; append new entries M68ICS05KJOM/D ...

Page 141

... CCR <n> where: <n> The new hexadecimal value for the CCR. Example: CCR E4 M68ICS05KJOM/D Set Condition Code Register NOTE Assign the value E4 to the CCR. This makes the binary pattern 11100100; the N bit set, other bits clear. DEBUGGING COMMAND SET 7-25 ...

Page 142

... The CLEARMAP command removes the current MAP file from memory, forcing the debugger to show disassembled code in the Code Windows instead of source code. Symbols defined using the SYMBOL command are not affected by this command. (The NOMAP command is identical to CLEARMAP.) Syntax: CLEARMAP Example: CLEARMAP 7-26 Clears symbols and their definitions. Clear .MAP File M68ICS05KJOM/D ...

Page 143

... SYMBOL command). Debug information from MAP files, used for source level debugging, is not affected by the CLEARSYMBOL command. List the current user-defined symbols using the SYMBOL command. Syntax: CLEARSYMBOL Example: CLEARSYMBOL M68ICS05KJOM/D Clear User Symbols NOTE Clears user defined symbols. DEBUGGING COMMAND SET 7-27 ...

Page 144

... ICS05KJW simulator. After you set colors options for the windows, save the changes using the SAVEDESK command. For more information about using the Change Window Colors dialog, see paragraph 6.22.2. Syntax: COLORS Example: COLORS 7-28 Set Simulator Colors Open the colors window. M68ICS05KJOM/D ...

Page 145

... The Cycle Window shows the cycle counter. The cycle count can be useful for timing procedures. Syntax: CYCLES <n> where: <n> Integer value for the cycles counter. Examples: CYCLES 0 CY 1000 M68ICS05KJOM/D Set Cycles Counter Reset cycles counter. Set cycle-counter value to 1000. DEBUGGING COMMAND SET 7-29 ...

Page 146

... Starting address for a range of instructions to be disassembled. <endrange> Ending address for a range of instructions to be disassembled. Examples: DASM 300 0300 DASM 200 208 0200 0201 0203 0205 0207 7-30 Disassemble Memory NOTE A6E8 LDA #0E8 5F CLRX A680 LDA #80 B700 STA PORTA A6FE LDA #FE B704 STA DDRA M68ICS05KJOM/D ...

Page 147

... Bits assigned 0 denote input pins; bits assigned 1 denote output pins. Syntax: DDRA <n> where: <n> The byte value to be placed into DDRA. Examples: DDRA FF DDRA 00 M68ICS05KJOM/D Set Port A Direction Register Set all port A pins to be outputs. Set all port A pins to be inputs. DEBUGGING COMMAND SET 7-31 ...

Page 148

... Bits assigned 0 denote input pins; bits assigned 1 denote output pins. Syntax: DDRB <n> where: <n> The byte value to be placed into DDRB. Examples: DDRB 03 DDRB FF 7-32 Set Port B Direction Register Set the lower two bits of port B pins as outputs, set the others to be inputs. Set all port B pins to be outputs. M68ICS05KJOM/D ...

Page 149

... Optional number of bytes, words, or longs to be written on one line. Examples: DUMP C0 CF DUMP .W 300 37S DUMP .B 200 300 M68ICS05KJOM/D Dump Memory to Screen NOTE Dump array of RAM values, in bytes. Dump ROM code in address 300-37S in words. Dump contents of addresses 200-300 in rows of eight bytes. DEBUGGING COMMAND SET 7-33 ...

Page 150

... Alone, the numerical term to be evaluated. Otherwise either numerical term of a simple expression. <op> The arithmetic operator (+, -, *, /, & simple expression to be evaluated. Examples: EVAL 0077H 119T 0001670 0000000001110111Q EVAL 100T 0064H 100T 0001440 0000000001100100Q 7-34 Evaluate Expression NOTE "w" "d" M68ICS05KJOM/D ...

Page 151

... EXIT or QUIT The EXIT command terminates the software and closes all windows. The QUIT command is identical to EXIT. Syntax: EXIT Example: EXIT M68ICS05KJOM/D Exit/Quit Application Finish working with the program. DEBUGGING COMMAND SET 7-35 ...

Page 152

... G 300 371 RUN 300 7-36 Begin Program Execution NOTE Begin code execution at the current PC value. Begin code execution at address 346. Begin code execution at address 300. End code execution just before the instruction at address 371. Begin code execution at address 300. M68ICS05KJOM/D ...

Page 153

... When the asterisk is entered, the command displays a list of appropriate files, from which you can select the required file. Example: GOMACRO AVCALC.MAC M68ICS05KJOM/D Execute Macro after Break Begin code execution at the current PC value; at breakpoint execute macro AVCALC.MAC. DEBUGGING COMMAND SET ...

Page 154

... Execution continues until the program counter contains the specified ending address, or until you press a key or the Stop button on the ICS05KJW toolbar, or until it reaches a breakpoint, or until an error occurs. Syntax: GOTIL <endaddr> where: <endaddr> The address at which execution stops. Example: GOTIL 2F0 7-38 Execute Until Address Executes code up to address 2F0. M68ICS05KJOM/D ...

Page 155

... Stop button on the ICS05KJW toolbar, until it reaches a breakpoint error occurs. Syntax: GOTOCYCLE <n> where: <n> Cycle-counter value at which execution stops. Examples: GOTOCYCLE 100 M68ICS05KJOM/D Execute to Cycle Counter Value Execute the program until the cycle counter equals 100. DEBUGGING COMMAND SET 7-39 ...

Page 156

... N is negative zero and C is carry). A letter in these designators means that the corresponding bit of the CCR is set; a period means that the corresponding bit is clear. Syntax: H 0|1 Examples 7-40 Set/Clear Half-Carry Bit NOTE Sets the H bit in the CCR. Clear the H bit of the CCR. M68ICS05KJOM/D ...

Page 157

... HELP The HELP command opens the Windows help file for the program. An alternative way to open the help system is to press the F1 key. Syntax: HELP Examples: HELP M68ICS05KJOM/D Open the help system DEBUGGING COMMAND SET Open Help 7-41 ...

Page 158

... N is negative zero and C is carry). A letter in these designators means that the corresponding bit of the CCR is set; a period means that the corresponding bit is clear. Syntax: I 0|1 Examples 7-42 Set/Clear Interrupt Mask NOTE Set the I bit in the CCR. Clear the I bit of the CCR. M68ICS05KJOM/D ...

Page 159

... Information displayed includes the name of the file in the window, the line number, the address, the corresponding object code, and the disassembled instruction. Syntax: INFO Example: INFO Filename:PODTEST.ASM Address:$0100 Disassembly:START M68ICS05KJOM/D Display Line Information Display information about the cursor line. Line number:6 5F CLRX DEBUGGING COMMAND SET 7-43 ...

Page 160

... A is set as an input port. If the ICS05KJ circuit board is connected, port A inputs come from the board, so this command has no effect. Syntax: INPUTA <n> where: <n> Eight-bit simulated value for port A. Example: INPUTA AA 7-44 NOTE Simulate the input AA on port A. Set Port A Inputs M68ICS05KJOM/D ...

Page 161

... If the ICS05KJ circuit board is connected, port B inputs come from the board, so this command has no effect. Syntax: INPUTB <n> where: <n> Eight-bit simulated value for port B. Example: INPUTB 01 M68ICS05KJOM/D NOTE Simulate the input 01 on port B. DEBUGGING COMMAND SET Set Port B Inputs 7-45 ...

Page 162

... The INPUTS command shows the simulated input values to port A and B (entered via the INPUTA or INPUTB commands). If the ICS05KJ circuit board is connected, this command shows input values from the board. Syntax: INPUTS Example: INPUTS Port Port 7-46 NOTE Show I/O port input values. Show Port Inputs M68ICS05KJOM/D ...

Page 163

... If the ICS05KJ circuit board is connected, the IRQ pin value come from the board, so this command has no effect. Syntax: IRQ [ Examples: INT 0 IRQ 1 M68ICS05KJOM/D Set IRQ Pin State NOTE Assign 0 to the IRQ pin. Assign 1 to the IRQ pin. DEBUGGING COMMAND SET 7-47 ...

Page 164

... Register values and program instructions do not appear in the status window as code runs. (This display state is the default when the software is first started.) To turn on the display of stepping information, use the LISTON command. Syntax: LISTOFF Example: LISTOFF 7-48 Turn Off Step Listing Do not show step information. M68ICS05KJOM/D ...

Page 165

... The register values and program instructions are displayed in the status window while running code. The values shown are the same values seen by the REG instruction. To turn off this step display, use the LISTOFF command. Syntax: LISTON Example: LISTON M68ICS05KJOM/D Turn On Step Listing Show step information. DEBUGGING COMMAND SET 7-49 ...

Page 166

... Load file PROG2.S19 and its map file into the simulator at the load addresses in the file. Display the names of the .S19 files on the diskette in drive A:, for user selection. Display the names of the .S19 files in the current directory, for user selection. Load S-Records M68ICS05KJOM/D ...

Page 167

... Use the SAVEDESK command to save the debugger window settings to the desktop file. Syntax: LOADDESK Example: LOADDESK M68ICS05KJOM/D Load Desktop Settings Get window settings from desktop file. DEBUGGING COMMAND SET 7-51 ...

Page 168

... LOADMAP A: LOADMAP 7-52 Load map file PROG.MAP into the host computer. Load map file PROG1.MAP into the host computer. Displays the names of the .MAP files on the diskette in drive A: Display the names of the .MAP files in the current directory. Load Map File M68ICS05KJOM/D ...

Page 169

... Examples: >LF TEST.LOG R >LF TEMP.LOG A >LOGFILE M68ICS05KJOM/D Open/Close Log File The filename of the log file (or logging device to which the log is written). Start logging. Overwrite file TEST.LOG (in the current directory) with all lines that appear in the status window. Start logging. Append to file TEMP.LOG (in the current directory) all lines that appear in the status window ...

Page 170

... Execute commands in file INIT.MAC. Display names of all .MAC files (then execute the selected file). Display names of all .MAC files in drive A (then execute the selected file). Display names of all .MAC files in the current directory, then execute the selected file. Execute Batch File M68ICS05KJOM/D ...

Page 171

... MACROSTART command opened the macro file). This stops saving debug commands to the macro file. Syntax: MACROEND Example: MACROEND M68ICS05KJOM/D Stop Saving Commands to Batch File Stop saving debug commands to the macro file, then close the file. DEBUGGING COMMAND SET 7-55 ...

Page 172

... The name of the macro file to save commands. The .MAC extension can be omitted. The filename can be a pathname followed by the asterisk (*) wildcard character; if so, the command displays a list of all files in the specified directory that have the .MAC extension. Save debug commands in macro file TEST.MAC M68ICS05KJOM/D ...

Page 173

... The starting memory address for display in the upper left corner of the memory window. Examples: MD 200 SHOW 100 M68ICS05KJOM/D Display Memory at Address Display the contents of memory beginning at address 200. Display the contents of memory beginning at address 100. DEBUGGING COMMAND SET 7-57 ...

Page 174

... The value( stored (optional). Examples: With only one address 300 00 MM 100 200 123456 7-58 Figure 7-3. Modify Memory Dialog Start memory modify at address $90 ssign value 00 to address $300. A Assign values 00-11 to bytes 100-103. Place long value $123456 at address $200. Modify Memory . M68ICS05KJOM/D ...

Page 175

... N is negative zero and C is carry). A letter in these designators means that the corresponding bit of the CCR is set; a period means that the corresponding bit is clear. Syntax: N 0|1 Example M68ICS05KJOM/D Set/Clear Negative Bit NOTE Set the N bit of the CCR. Clear the N bit of the CCR. DEBUGGING COMMAND SET 7-59 ...

Page 176

... Toggle Breakpoint at Cursor menu item. This removes the breakpoint from the line. Syntax: NOBR [<address>] where: <address> Optional address of a single breakpoint to be removed. Examples: NOBR NOBR 120 7-60 Remove Breakpoints Remove all current instruction breakpoints. Remove the instruction breakpoint at address 120. M68ICS05KJOM/D ...

Page 177

... Code Windows instead of source code. Symbols defined using the SYMBOL command are not affected by this command. The NOMAP command is identical to CLEARMAP. Syntax: NOMAP Example: NOMAP M68ICS05KJOM/D Clears symbols and their definitions. DEBUGGING COMMAND SET Clear .MAP File 7-61 ...

Page 178

... The NOSYMBOL command removes all user defined symbols created using the SYMBOL from memory. Symbols are created using the SYMBOL command. Symbols defined via a loaded MAP file are not affected. Syntax: NOSYMBOL Example: NOSYMBOL 7-62 Clear User Symbols Clears user defined symbols and their definitions. M68ICS05KJOM/D ...

Page 179

... Set PC at Cursor menu item. This assigns the address of that line to the PC. Syntax: PC <address> where: <address> Example: PC 0200 M68ICS05KJOM/D Set Program Counter The new PC value. Sets the PC value to 0200. DEBUGGING COMMAND SET 7-63 ...

Page 180

... If successful, this command responds with the current status of ports, reset, and IRQ pins on the board. The command also shows the version of the board. Syntax: POD <n> where: <n> The number (1... serial port (COM1 through COM8) on the PC. Example: POD 1 Port Port Reset - 1 IRQ - 1 Version - 01 7-64 Connect to serial port COM1. Change Serial Port M68ICS05KJOM/D ...

Page 181

... If the ICS05KJ circuit board is connected, the system sends the n parameter value of this command to the board. Syntax: PORTA <n> where: <n> The new value for the port A output latches. Example: PORTA FF M68ICS05KJOM/D Set Port A Output Latches NOTE Set all port A output latches high. DEBUGGING COMMAND SET 7-65 ...

Page 182

... If the ICS05KJ circuit board is connected, the system sends the n parameter value of this command to the board. Syntax: PORTB <n> where: <n> The new value for the port B output latches. Example: PORTB 03 7-66 Set Port B Output Latches NOTES Set the port B output latches to 03. M68ICS05KJOM/D ...

Page 183

... EPROM, and programming the MOR byte for the desired device. Programming software installed on the host computer can control the M68ICS05KJ pod programming socket. The host computer can send RESET, CLOCK, DATA, and other control signals to the pod through the serial connection. ...

Page 184

... The Location identifier, at the bottom of the window, indicates the bit’s location in the EPROM not memory-mapped, since the personality bits must be programmed by direct access. Figure 7-4. Program EPROM Personality Window 7-68 (continued) M68ICS05KJOM/D ...

Page 185

... Verify to Simulator OR -Verify to Dnld S-Rec File To execute a programming command in the Pick Window, double-click on the command (or select the command and press the OK button). M68ICS05KJOM/D DEBUGGING COMMAND SET Description Checks whether the device has been erased. Programs all of the EPROM space, then the MOR ...

Page 186

... To use another S19 file to program the device, use the SD command to open the dialog and enter or select the new download filename. The Programmer Files window shows the download and upload filenames. When MCU programming completes, the ICS05KJW simulator interface returns. Syntax: PROGRAM Example: PROGRAM 7-70 Starts the programmer. (continued) M68ICS05KJOM/D ...

Page 187

... The user can view any of the registers, modify their values, and store the results back into memory. An alternate way to bring up the register files window is to press the Register Files speed button. Syntax: R Example: R M68ICS05KJOM/D Start interactive system register setup. DEBUGGING COMMAND SET Use Register Files 7-71 ...

Page 188

... DEBUGGING COMMAND SET REG The REG command displays the contents of the CPU registers in the Status window. (The STATUS command is identical to the REG command.) Syntax: REG Example: REG 7-72 Displays the contents of the CPU registers. Show Registers M68ICS05KJOM/D ...

Page 189

... Syntax: REM <text> where: <text> Example: REM Program executing M68ICS05KJOM/D Place Comment in Batch/Macro File A comment to be displayed when a macro file is executing. ; Display the message Program executing during macro file execution. DEBUGGING COMMAND SET 7-73 ...

Page 190

... The RESET command simulates a reset of the MCU and sets the program counter (PC) to the contents of the reset vector. This command does not start execution of user code. (To reset and execute code, use the RESETGO command.) Syntax: RESET Example: RESET 7-74 Simulate Processor Reset Simulate reset of the MCU. M68ICS05KJOM/D ...

Page 191

... The RESETGO command simulates a reset of the MCU, sets the program counter (PC) to the contents of the reset vector, then starts execution from that address. Syntax: RESETGO Example: RESETGO M68ICS05KJOM/D Reset and Restart MCU Simulate reset of the MCU and start execution of code. DEBUGGING COMMAND SET 7-75 ...

Page 192

... DEBUGGING COMMAND SET SAVEDESK The SAVEDESK command saves window position, size, and other desktop settings. Opening the application or entering the LOADDESK command loads the saved settings. Syntax: SAVEDESK Example: SAVEDESK 7-76 Save Desktop Settings Save window settings for the application. M68ICS05KJOM/D ...

Page 193

... SHOWBREAKS The SHOWBREAKS command brings up the Breakpoint Window that displays the breakpoints used in the current debugging session. Breakpoints can be modified through this window Syntax: SHOWBREAKS Example: SHOWBREAKS M68ICS05KJOM/D Display Breakpoint Window Open the breakpoint window. DEBUGGING COMMAND SET 7-77 ...

Page 194

... This command is useful for browsing through various modules in the program. To return to code where the PC is pointing, use the SHOWPC command. Syntax: SHOWCODE <address> where: <address> The address or label where code shown. Example: SHOWCODE 200 7-78 Display Code at Address Show code starting at location $200. M68ICS05KJOM/D ...

Page 195

... All symbols defined in the source code used for debugging will be listed. The debugger defined symbols, defined with the SYMBOL command, will not be shown. The MAP command is identical to the SHOWMAP command. Syntax: SHOWMAP Example: SHOWMAP M68ICS05KJOM/D Show Information in Map File Shows symbols from the loaded map file and their values. DEBUGGING COMMAND SET 7-79 ...

Page 196

... DEBUGGING COMMAND SET SHOWTRACE The SHOWTRACE command displays the trace window, showing the last 1024 instructions that were executed after the TRACE command is used. Syntax: SHOWTRACE Example: SHOWTRACE 7-80 Display Trace Window Open the trace window. M68ICS05KJOM/D ...

Page 197

... The SNAPSHOT command sends textual information about the debugger windows to the open log file log file is open, the command has no effect. Syntax: SNAPSHOT Example: SNAPSHOT M68ICS05KJOM/D Save Window Data to Log File Save window data to the log file. DEBUGGING COMMAND SET 7-81 ...

Page 198

... The SP command assigns the specified value to the stack pointer (SP) used by the CPU. The value entered with the command should be reflected in the CPU Window. Syntax: SP <n> where: <n> The new stack pointer value. Example: SP $E0 7-82 Set the stack pointer value to $E0. Set Stack Pointer M68ICS05KJOM/D ...

Page 199

... Syntax: SS [<n>] where: <n> number of instructions to step through. Examples M68ICS05KJOM/D Execute Source Step(s) Step through the instruction at the PC address value. Step through eight instructions, starting at the current PC address value. DEBUGGING COMMAND SET 7-83 ...

Page 200

... ST and T commands are identical to the STEP command.) Syntax: STEP [<n>] where: <n> The hexadecimal number of instructions to be executed by each command. Examples: STEP ST 2 7-84 Execute Single Step Execute the assembly instruction at the PC address value. Execute two assembly instructions, starting at the PC address value. M68ICS05KJOM/D ...

Related keywords