Home

M68HC705J1A IN-CIRCUIT SIMULATOR USER'S MANUAL

image

Contents

1. GND A n 0 1uF vec 2 MC68HC705C9A 2 c13 GND GND 27pF 4 u4 D5 PDO RDI v osci L3 1091 48 DI SE GE PD2 MISO 20H PD3 MOSI PD4 SCK 5 PD5 SS osc2 42 BE GND 33 20 36 7 3728mHz PD S 18 28 MCU RESET 17 zu BE9 2 pud GND 16 26 pc2 10k 15 25 SS 37 ee c3 Hove y 14 24 boa Ris LED2 GND vec 13 za Ee 35 2 Ne 3 37 Pcs TCMP vec lH 2 pce 470 e TO 11 211 505 yala R11 t 32 A LED1 cis 12 4 2 1 F 13 PBO PA7 5 GER EI ci Vcc 0 1uF PBL PA6 2 ON 14 PAS CS LED ENABLE LED Te PB2 PAS 5 PB3 PAZ GND GND ve vec TE Spa bas HE 17 EBA REES SWITCH ENABLE L loee y Pai 10 J1 s4 19 8 E ii V En SG BIS REY Red PB7 8 PAO 0 O vcc vec 10k 2 2k 52 2k H R10 vcc me R20 10k GND GND R15 R13 100k 100k i SOIC R23 u5 10k i 20 a fa fa i fa Ja fa i 20 ADSL TS E CR 9 18 00 j PB5 PAO is 3 PB4 PAL 00 00 q PB PA2 EMO 16 GE 2 2 2 2 2 2 2 2 15 7J BBI bad 14 Soen pas i3 2 J3 Ja Js Je j7 Ja Jo 13 E c DS RN2A 12 3o BB AST 100k vec VSS PAT MC68HCOSJ1 a a ja ja ja Ja ja ja GND c20 j Tour E E E a3 laa las lag lor lia EMULATION HEADER GND J15 313 211 39 END Tome He eo E E Ji6 J14 312 310 PROGRAMMING SOCKETS 200 gt O 9 9 O O 0 2 2 a 2 UA 2 3 la 5 e 7 RNIA 100k ats ofa Je Je Dr 4 CSIC DEVELOPMENT TOOLS Title GNE M68HCOSJICS
2. Figure 1 1 M68HC705JICS Circuit Board Jumper header J1 is the switch S4 enable a fabricated jumper in header J1 connects switch S4 to the PAO pin of the MCU To disconnect switch S4 remove the jumper from this header Jumper header J2 is the LEDI enable a fabricated jumper in this header connects LED1 to the PA7 pin of the MCU To disconnect LED1 remove the jumper from this header JICSUM D LA MOTOROLA OVERVIEW Jumper headers J3 through J8 are compensating pull downs for the port B pins as the diagram below shows The M68HC705JICS kit uses an MC68HSC705C8A MCU to emulate an 68HC705J1A MCU But unlike the MC68HC705J1A the MC68HSC705C8A does not have programmable pull downs Jumper headers J3 through J8 compensate manually a fabricated jumper in any of these headers connects the corresponding port pin to a pull down resistor pulling the signal low L st OO N e CH m A cn cn cn DL DL CL D BL st O OONO a 3 d d Jumper headers J9 through J16 are compensating pull downs for the port A pins as the diagram below shows Fabricated jumpers in any of these headers have the same function as jumpers in headers J3 through J8 but apply to port A pins instead of port B pins oO LD st D DN O L Ll d d d st d d D D D pn D D D dt Ooo rw O st L0 o 72 T7 rs T rr T rs Er d c i M E JICSUM D 1 5 MOTOROLA OVERVIEW Jumper header J17 sets the baud rate for communication with the host computer The diagram
3. The cycle counter shows the current cycle count which allows timing of routines and procedures for time critical real time applications For example to calculate the time necessary for a portion of code to execute multiply the cycle count by the target system s unit of time per cycle The maximum internal value of the cycles counter is FFFFFFFF You can assign a specific value to the cycles counter via the CY or CYCLES command 2 2 2 Code Window SOURCE blcr 7 ICSR lda S0f write SOf to port Ai sta ddra and read it back on lda 05 i sta porta jlaport asm clra lda porta store results at Ge sta padl JICSUM D 2 3 MOTOROLA OPERATING THE SIMULATOR The code window is at the upper right of the main screen This window shows your actual source code provided that you have loaded a valid source level MAP file The symbol shows where the program counter PC points in the code The symbol lt B gt and red highlighting mark lines at which breakpoints are set The symbol c and cyan highlighting mark lines at which instruction counters are set The grey highlight is the cursor for the code window You may scroll through code in the window by using the arrow Home End Page Up and Page Down keys from within the debug window To set a breakpoint at the cursor line of code press A1t B Press ALt P to set the PC address value to the cursor line of code To set an instruction counter at the cursor line of
4. JICSUM D 3 96 MOTOROLA COMMANDS T Single Step Trace T The T command steps through one or a specified number of assembly instructions beginning at the current program counter PC address value Then this command halts If you enter this command without any parameter value it steps through one instruction If you enter the T command with an n value the command steps through that many instructions The ST STEP and T commands are identical Syntax T n where n The hexadecimal number of instructions to be executed Examples gt T Execute the assembly instruction at the PC address value gt T 2 Execute two assembly instructions starting at the PC address value JICSUM D 3 97 MOTOROLA COMMANDS UPLOAD SREC Upload S Record UPLOAD SREC The UPLOAD SREC command uploads the contents of the specified memory block range in 519 format displaying the contents in the debug window NOTE If you enter the UPLOAD SREC command the memory contents scroll through the debug window too rapidly to view Accordingly you first should enter the LOGFILE command which records the contents in a log Syntax UPLOAD SREC startrange endrange where startrange Beginning address of the memory block range endrange Ending address of the memory block range Example UPLOAD SREC 300 7FF Upload the 300 7FF memory block in S19 format JICSUM D 3 98 MOTOROLA COMMANDS VAR Display Variable VAR The VAR command sp
5. 4 N 5 vec 1 MI Dc YO Kee D2 Y 1in4148 W cs S OA 47uF iur 25v 25v GND GND GND GND D3 c6 7 o3 Ll 2 L 4 2N3904 180 uH 1N5817 I 10 uH VPP ocv H Fad cvv VER R5 m ca wer R1 100 VRI f X 8 Y 1 T o ug 10uF c19 boa SK m DR coL sw cor k 1 Lour c1 GND 7 sens Sw E 2 25v P2 SENSE ou ENTE GND GND GND za of E vec vcc CAP 2 Re GuD 2 c12 5 o 100 Si 8 10uF 7R EQUPRSE END 1 c11 R7 GND als TXD gt 25v O luF 100pFS 15k 5 o y R2 2 RXD 2 2k U3 MC34063 GND o 6 S GND GND GND i DP E E O ej V GENERATOR o2 RA 2N3906 3 3k RS 232 TO HOST Q1 wi EDO RO 2N3904 53 1 3k 10k GND GND 84 CSIC DEVELOPMENT TOOLS Title COMPUTER GENERATED DRAWING DO NOT REVISE MANUALLY MeSHCDSJICS Size bocument Number REV B 63BSE90659W 3 Date March 13 1995 Sheet 1 of 2 NOLLVIANHOHNI LHOddNS Ch penuguoo ure18e q 21307 SOIL T p 310314 BAUD SELECT USE WITH HOST COMMAND LINE INPUT Va 3 1115 2kb Ke m IF A CERAMIC RESONATOR WITH INTERNAL CAPACITORS vec IS USED FOR Yl DELETE C13 AND C17 19 2kb
6. address The starting memory address for display in the memory window Example gt SHOW 300 Display the contents of 32 bytes of memory beginning at address 300 JICSUM D 3 82 MOTOROLA COMMANDS SHOWCHIP Open Chip Window SHOWCHIP The SHOWCHIP command brings up the chip visualization window This window which overlays the variables window depicts the MCU being emulated Arrows indicate whether each pin is an input or output values being simulated on pins appear beside the arrows Use the HIDECHIP command to close the chip visualization window restoring the variables window NOTE The chip visualization window disables zooming Neitherthe ZOOM command nor the Alt Z hotkey combination has any effect while ICSOSJ1A displays the chip visualization window Syntax SHOWCHIP Example SHOWCHIP Open the chip visualization window JICSUM D 3 83 MOTOROLA COMMANDS SHOWCODE Display Code SHOWCODE The SHOWCODE command displays the source code around the specified address without changing the value of the program counter PC The code window shows the preceding line of code the specified line of code and the next nine lines of code Syntax SHOWCODE address where address The memory address for code window display Example gt SHOWCODE 400 Show code around location 400 that is from 3FF through 409 JICSUM D 3 84 MOTOROLA COMMANDS SHOWPC Display Code at PC SHOWPC The SHOWPC command displays source code
7. to25 pin adapter between the port and the cable Note that if you do not connect the circuit board to the computer the ICS05J1A software works as a full standalone simulator Connector P1 is for 9 volt operating power for the board Plug the output connector of the 120Vac to 9V dc transformer into this connector Connector P2 is for communication with the host computer This RS232 connector is for the DB9 cable that runs to the computer To connect to your target system run the factory supplied 20 lead header cable between board socket U5 and the 20 pin DIP socket of the target system The small boxed number 1 in Figure 1 1 identifies pin 1 of socket U5 When you connect the JICS board to your target system and power up the target system provides all inputs to the ICSOSJ1A software and accepts all outputs from the ICSOSJ1A software RESET and IRQ lines also interact with the ICSOSJIA software Note that when you execute a GO command the simulator does not run in real time But the faster your host computer the faster the simulation Switch S1 is the board power switch Switch S2 controls programming VPP power Switch S3 is the reset switch for the microprocessor at board location U4 Switch S4 is for user experimentation with the PAO line NOTE Do not press switch S3 unless the computer displays a message to do so JICSUM D 1 3 MOTOROLA OVERVIEW J3 J8 US m J9 J16 MOTO 1
8. VERSION Example gt VERSION Display ICSOSJ1A version JICSUM D 3 101 MOTOROLA COMMANDS WAIT Wait N Cycles WAIT The WAIT command delays simulator command execution by the specified number of cycles This command works in script files to control when inputs come into the simulator When execution encounters a WAIT command it passes control back to the keyboard That is script file execution waits for you to enter a command such as GO or STEP which starts MCU cycles As soon as the number of cycles equals the n value of the WAIT command the simulator resumes executing commands of the script file NOTES Do not enter the REM or WAIT command in the debug window Unlike other ICS05J1A commands REM and WAIT are valid only inside script files The WAIT command must not be the last command of a script file Syntax WAIT n where n The hexadecimal number of cycles to pause Example gt WAIT A Delay command execution for 10 MCU cycles JICSUM D 3 102 MOTOROLA COMMANDS WHEREIS Display Symbol Value WHEREIS The WHEREIS command displays a symbol or an address If you enter this command with a symbol argument the result is the address of the symbol If you enter this command with an address argument the result is the symbol at that address provided that such a symbol exists Syntax WHEREIS symbol address where symbol A symbol listed in the symbol table address Address for which a symbol is defined Exa
9. below shows the factory configuration the fabricated jumper between pins 1 and 2 selects 115 2 kilobaud BE e 7 1 2 3 For the alternative rate of 19 2 kilobaud e Position the J17 jumper between pins 2 and 3 Reset the JICS circuit board by pressing the S3 switch Include the b19200 parameter value in the ICS05J1A startup command Paragraph 2 1 explains more about this parameter value JICSUM D 1 6 MOTOROLA OVERVIEW 1 4 PROGRAMMING QUICK START Sockets U6 and U7 are for programming MC68HC705J1A MCUs U6 for 20 pin DIP MCUs U7 for 20 pin SOIC MCUs Follow the numbered steps below to program an MCU NOTES This quick start does program a JLA MCU If you follow the steps below you must erase the MCU before using it again Socket U7 accomodates SOIC MCU packages of as many as 28 pins To use this socket for an SOIC JIA MCU which has only 20 pins unlatch and open the lid insert the MCU pins into the 20 socket holes nearest jumper header J17 then close and latch the socket lid 1 Make sure that no MCUs are in either socket U6 or U7 2 Calibrate VPP To do so turn power switch S1 ON then turn VPP switch S2 ON Measure the signal on pin 19 of socket U6 or U7 If necessary adjust potentiometer VR1 until your meter reads 16 5 volts Turn switches S2 and S1 OFF This completes VPP calibration 3 From within ICSOSJ1A type PROGRAM Follow the programming instructions that appear on the scree
10. Close Chip Wim OW ceeds vad tn tens taies 3 39 HISTORY History Capture daag AE EEN as 3 40 HISTORYLOG Log History Capture ee ces edere dr e a ee 3 41 I Set Clear ibi dias 3 42 INFO Display Line Information esas 3 43 INPUTA Set Port A IN puts eec rene RAR EE EEN ANEN 3 44 INPUTB S t Port B Inputs S cu desta ARAS CE ONUS eda 3 45 INPUTS Show Port Inputs ege ENEE ad Nd 3 46 INT Set PIRO Pin ERR eegal Eeer lee be bm ren ln 3 47 IRQ Set IRQ Pix Statene iv A Ad 3 48 LF Open Close Lor Pile ua AS 3 49 LISTOBF Do Not HOW STEPS O exp uie E n a 3 50 LISTON E EE EE 3 51 LOAD IS EE 3 52 LOADMAP Load Map File 22 est Lo lad Ru S ad a aas 3 53 LOGFILE Open Close Log File uoo e epe eSI Ies A ET E 3 54 MACRO Execute Script Peu uu OS 3 55 MACROEND Stop Saving Commandes 3 56 MACROSTART Save Debug Commandes 3 57 MD Display Menmoty EE 3 58 MEM Modify MEN ae EES 3 59 MM Modity Memo Yin is td ade 3 60 JICSUM D iv MOTOROLA CONTENTS 3 2 ICSO5J1A Commands continued N set Clear N Bit uo ede tt 3 61 NOBR Remove Break pontiac rdi 3 62 NOCNT Remove Instruction Counters esses 3 63 PC E EE 3 64 POD Check Serial Portrait a 3 65 PORTA Set Port A Output batches dic 3 66 PORTB Set Port B Output Latches veian erase EN 3 67 PROGRAM Program EPRONL eere da 3 68 PRTA Set Port A Output batches sese esee ee Ih 3 69 PRTB Set Port B Output Dates nerds visit 3 70 QUIET Suspend Window Updates 3 71 QUIT EXE PTOS EE EE 3 72 R set Up System Registe
11. D 2 7 MOTOROLA OPERATING THE SIMULATOR Table 2 1 ICS05J1A Hotkeys Hotkey Function F1 Open HELP system F2 Show STACK window F3 Go to MEMORY window F4 Go to HISTORY window FS Go to BREAKPOINT window F6 Go to COUNT window F7 Show REGISTER FILES window F8 Go to VARIABLES window F9 Repeat the last command entered in the debug window F10 Go to DEBUG window T Scroll up through code in window y Scroll down through code in window c Move cursor left through code in window gt Move cursor right through code in window Page Up Page up through code in window Page Down Page down through code in window Home Go directly to start of code in window End Go directly to end of code in window Alt B Set or delete breakpoint at current line in CODE window Alt C Set or delete counter at current line in CODE window Alt F Search for a string Alt G Execute code from PC address value to highlighted line Alt L Search for subsequent occurrence of a string Alt M Show a different module in CODE window Alt P Set PC address value to current line in CODE window Alt Z Zoom CODE window Shift T or Alt U Duplicate most recently executed command press Enter to execute Shift or Alt D Advance to the next command Esc Back out of current position or return to the DEBUG window JICSUM D 2 8 MOTOR
12. The LOADMAP command loads a map file that contains source level debug information into the host computer Entering this command without a filename value brings up a list of MAP files in the current directory You can select a file to be loaded directly from this list Syntax LOADMAP filename where filename The name of the map file to be loaded The filename value need not include the MAP extension The filename value can be a pathname that includes an asterisk wildcard character if so the software displays a list of possible MAP files for your selection Examples gt LOADMAP PROG1 MAP Load map file PROG1 MAP into the host computer gt LOADMAP PROG2 Load map file PROG2 MAP into the host computer gt LOADMAP A Display the names of the MAP files on the diskette in drive A for user selection of a file gt LOADMAP Display the names of the MAP files in the current directory for user selection of a file JICSUM D 3 53 MOTOROLA COMMANDS LOGFILE Open Close Log File LOGFILE The LOGFILE command opens an external file to receive log entries of commands and copies of responses in the debug window If the specified file does not yet exist this command creates the file The LF command is identical If the file already exists you can use an optional parameter to specify whether to overwrite existing contents R the default or to append the log entries A If you omit this parameter a prompt asks for this overwrit
13. The optional variant specifies whether to fill the block in bytes B the default or in words w Syntax BF B W startrange endrange n where startrange Beginning address of the memory block range endrange Ending address of the memory block range n Byte or word value to be stored in the specified block If n is an 8 bit value each byte of the block receives the value If is a 16 bit value each word of the block receives the value Examples gt BF CO CF FF Store FF in bytes at addresses CO CF BF W 400 41F 4143 Store 4143 in words at addresses 400 41F JICSUM D 3 10 MOTOROLA COMMANDS BR Set Instruction Breakpoint BR The BR command displays or sets instruction breakpoints according to it parameter values With no parameter values the command displays a list of all current breakpoints in the debug window e With an address value the command sets a breakpoint at the specified address e With address and n values the command sets a breakpoint at the specified address but code execution does not break until the nth time it arrives at the breakpoint NOTE The maximum number of breakpoint addresses is 64 Each BR BREAKA BREAKSP or BREAKX command that includes an address value uses an additional breakpoint address unless the address is a duplicate For example if 64 BR commands already have taken up 64 addresses the only way to include an address value in a BREAKA BREAKSP or BREAKX comman
14. already exists you can use an optional parameter to specify whether to overwrite existing contents R the default or to append the log entries A If you omit this parameter a prompt asks for this overwrite append choice While logging remains in effect any line that is appended to the debug window is also written to the log file Logging continues until you enter another LF or LOGFILE command without any parameter values this second command disables logging and closes the log file Syntax LF filename R A where filename The DOS filename of the log file or logging device Examples gt LF TEST LOG Start logging Overwrite file TEST LOG in the current directory with all lines that appear in the debug window gt LF TEMP LOG A Start logging Append to file TEST LOG in the current directory all lines that appear in the debug window gt LF If logging is enabled Disable logging and close the log file JICSUM D 3 49 MOTOROLA COMMANDS LISTOFF Do Not Show Steps LISTOFF The LISTOFF command turns off a screen listing of step by step information for stepping Register values and program instructions do not appear in the debug window as code runs This display state is the default when you run ICSOSJ1A software To turn on the display of stepping information use the LISTON command Syntax LISTOFF Example gt LISTOFF Do not show step information JICSUM D 3 50 MOTOROLA COMMANDS LISTON Show St
15. alternative for code showing in the code window position the cursor on a line of code that has an instruction counter then press the A1t C keys This clears the counter from the line To set create instruction counters use the COUNTER command To reset that is assign the value 0 to instruction counters use the RESET COUNTS command Syntax NOCNT address where address Optional address of a single instruction counter to be removed Examples gt NOCNT Remove all current instruction counters gt NOCNT 420 Remove the instruction counter at address 420 JICSUM D 3 63 MOTOROLA COMMANDS PC Set PC Value PC The PC command assigns the specified value to the program counter PC As the PC always points to the next instruction to be executed assigning a new PC value changes the flow of code execution Note this alternative for code showing in the code window position the cursor on a line of code then press the A1t P keys This assigns the address of that line to the PC Syntax PC address where address The new PC value Example PC 0500 Set the PC value to 0500 JICSUM D 3 64 MOTOROLA COMMANDS POD Check Serial Port POD The POD command checks the specified serial port for the JICS circuit board The command responds with the current status of port A port B reset and IRQ on the board The command also shows the version of the board Syntax POD n where n The number 1 8 of a serial port Exam
16. around the address in the program counter PC The code window shows the preceding line of code the line of code the PC specifies and the next nine lines of code This command often is useful immediately after the SHOWCODE command Syntax SHOWPC Example SHOWPC Show code around the PC address value that is from PC 1 through PC 9 JICSUM D 3 85 MOTOROLA COMMANDS SNAPSHOT Save Screen SNAPSHOT The SNAPSHOT command saves a copy of the main screen to the open log file A log file must be open or this command has no effect NOTE The main screen includes certain extended ASCII characters When you subsequently view a screen snapshot a standard ASCII editor will display a few characters do not match the original screen But all values and other important simulation information will be in the snapshot just as they were on the screen Syntax SNAPSHOT Example gt SNAPSHOT Capture screen save to the log file JICSUM D 3 86 MOTOROLA COMMANDS SOURCE Toggle Code Display SOURCE The SOURCE command toggles the code window display between source code and disassembled code If you enter this command when the code window displays disassembled code when a map file is loaded and when the PC points to a memory area covered by the map file the window display changes to source code The title of the window changes to SOURCE NOTE If you alter code space defined in the source file via the ASM MEM or MM co
17. code press Alt C Pressing Alt G is like entering a GOTIL command executing code from the current PC address value to the cursor line of code To enlarge zoom the code window press Alt Z Always keep in mind that if you change your code via an ASM MEM or MM command the source code in the code window no longer will be correct To make the code correct again you must use RAPID and CASM5JI1A to re assemble the code If no valid map file is loaded or there is no source code at the current PC address value the code window shows disassembled code at the current PC highlighted in the second row Following this line are the next eight instructions The diagram below shows a disassembled code display in the code window 420300 0301 0302 0303 0305 0307 0309 030B 030D 030F Column 1 of this display is the list of addresses or source code labels if you have loaded a MAP file Column 2 lists the corresponding hexadecimal object code The first row shows the most recently executed instruction Any line that is the target of a breakpoint includes a commentabout this fact The software truncates labels if necessary so that all the information fits into the window You may scroll forward through the disassembled code just as you can through source code NOTE If the code window shows disassembled code it is not possible to scroll backwards from the PC JICSUM D 2 4 MOTOROLA OPERATING THE SIMULATOR To toggle between so
18. explanations of each command follow the table 3 1 COMMAND SYNTAX Table 3 1 and the command explanations follow this syntax COMMAND B wl argument argument where COMMAND A command name which you must enter as shown except that you may use lower case letters B or W A specific parameter value which you must enter as shown except that you may use lower case letters argument A representative word for an actual argument in lower case italic letters such as address filename and n For actual commands you must use actual address filename or number values instead of such representative words Brackets indicate optional items A vertical line means or An ellipsis means that you can repeat the preceding item Except where otherwise noted numerical values are hexadecimal The command prompt gt at the bottom of the debug window indicates that the system is ready for another command 32 ICS05J1A COMMANDS Table 3 1 lists the commands individual explanations follow the table JICSUM D 3 1 MOTOROLA Table 3 1 ICS05J1A Commands COMMANDS Syntax Meaning An Set accumulator value ACC n Set accumulator value ASM adaress Assemble instructions BELL n Sound bell BF B W startrange endrange n Block fill BR address n Set instruction breakpoint BREAKA n adaress Set accumulator breakpoint BREAKSP n adaress Set SP break
19. menu press Esc to exit the help system press Esc again Syntax HELP topic where topic An ICS05J1A software command or HCOS instruction Examples gt HELP Open the help system gt HELP GO Open GO command help information JICSUM D 3 38 MOTOROLA COMMANDS HIDECHIP Close Chip Window HIDECHIP The HIDECHIP command closes the chip visualization window restoring the variables window The SHOWCHIP command opens the chip visualization window Syntax HIDECHIP Example gt HIDECHIP Close chip visualization window JICSUM D 3 39 MOTOROLA COMMANDS HISTORY History Capture HISTORY The HISTORY command enables or disables history capture When you enable history capture the simulator records instructions timer values and CPU values in a 1024 element circular buffer While history capture is enabled the word HISTORY appears in the center of the main screen Note that history capture somewhat slows execution The simulator disassembles captured history information when you view buffer contents To view buffer contents press F4 contents appear in the history window If you never have enabled history capture the history window shows the indication NO HISTORY To clear the history buffer toggle 1t OFF and ON To write history buffer contents to a log file use the HISTORYLOG command in conjunction with the HISTORY and LOGFILE or LF commands Syntax HISTORY Example gt HISTORY Enable or disa
20. onc tette cese Ee 3 9 BF Block EE 3 10 BR Set Instruction Breakpoint a uu enr ee Te ER eS 3 11 BREAKA Set Accumulator Breakpoint e eese 3 12 BREAKSP Set Stack Pointer Breakpomnt esses 3 13 BREAKX Set Index Breakpoint eeseees m 3 14 C Deli Clear NEEN 3 15 CAPTURE Capture Changed Data 3 16 CAPT UREFILE Open Capture Pile o ere Sore drid 3 17 JICSUM D ii MOTOROLA CONTENTS 3 2 ICSO5J1A Commands continued CCR Set Condition Code Register ario hs 3 18 CF Open Capture Pile ies Pater m eege ec 3 19 CLEARMAP Clear Map File ssssiirnias ENNER Re RER waaay nies 3 20 CLEARSYMBOL Clear User Symbols ett sit Ore ARENIS TRA 3 21 COLORS Set Screen Colors dx gedd ek NEEN rr ees 3 22 COUNTER Set Instruction Counter ars eler EA Nee bs 3 23 CY Set Cycles Counter oves e e vend wea ER UE ERE Eg 3 24 CYCLES St Cycles LOAN ds 3 25 DASM Disassemble Memory 5 cesses cise ENEE SERIES 3 26 DDRA Set Port A Direction Register E 3 27 DDRB Set Port B Direction Register erem Ere eto 3 28 DUMP Dump Memory to Sereen EE 3 29 EVAL Evaluate Expt essiOnB eter ree repre ERECTA Te 3 30 EXIT EXE Prosta epeen e ES E aR 3 31 G Begin Program Bxecution cee eee eee eee eee e eee 3 32 GO Besin Program Eet ENEE dE 3 33 GOMACRO Execute Macro after Break 3 34 GOTIL Execute til Location bits 3 35 GOTOCYCLE Execute until Cycle Counter Value 3 36 H Bet Clear H EE 3 37 HELP Open Help System eere das 3 38 HIDECHIP
21. stack data You must know whether program execution is in an interrupt or in a subroutine to know which stack data interpretation is valid An alternate way to bring up the stack window is to press the F2 key To make the stack window disappear press the F10 key Syntax STACK Example gt STACK Open the stack window JICSUM D 3 91 MOTOROLA COMMANDS STEP Single Step Trace STEP The STEP command steps through one or a specified number of assembly instructions beginning at the current program counter PC address value Then this command halts If you enter this command without any parameter value it steps through one instruction If you enter the STEP command with an n value the command steps through that many instructions The ST STEP and T commands are identical Syntax STEP n where n The hexadecimal number of instructions to be executed Examples gt STEP Execute the assembly instruction at the PC address value gt STEP 2 Execute two assembly instructions starting at the PC address value JICSUM D 3 92 MOTOROLA COMMANDS STEPFOR Step Forever STEPFOR The STEPFOR command continuously executes instructions beginning at the current program counter PC address value Execution stops when it arrives at a breakpoint when it encounters an error or when you press a key Syntax STEPFOR Example gt STEPFOR Execute instructions continuously until the user presses a key JICSUM D 3 93 MOTORO
22. the RS 232 serial connector location P2 and pin 29 of the C8A MCU location U4 The P2 pin 3 signal should be at RS 232 level 5 to 12 volts the U4 pin 29 signal should be at TTL level 0 to 5 volts If signals appear on P2 pin3 but not on U4 pin 29 check the circuit board components near location Q3 If signals do not appear on P2 pin 3 check the serial cable or the selected communications port A final possible cause of problems is that LED1 is defective To check this possibility remove the C8A MCU from location U4 then short socket pin 4 to ground If LED1 does not light it is defective or installed backwards If you still cannot complete step 7 of the Chapter 1 quick start instructions that is if LED1 still does not flash consult a field application engineer from you Motorola distributor or sales office If you cannot compete step 8 of the Chapter 1 quick start instructions that is if LED 1 continues to flash check that connector pin PAO goes high when you push switch S4 If the pin does not go high ohm out resistor R10 and switch S4 Consult Global Data Specialists 800 451 3464 or 602 437 4331 as appropriate 4 3 MOTOROLA SUPPO RT INFORMATION 4 5 PROGRAMMING TROUBLESHOOTING GUIDE Should you run into problems when programming a 705J1A MCU but you can perform other simulator functions follow these steps Step A Step B Step C Step D Step E Step F Make sure that both programming s
23. 0 B700 STA PORTA AGFE LDA FE B704 STA DDRA JICSUM D 3 26 MOTOROLA COMMANDS DDRA Set Port A Direction Register DDRA The DDRA command assigns the specified byte value to the port A data direction register DDR Syntax DDRA n where n Byte value for the port A DDR Examples gt DDRA FF Set all port A pins to be outputs gt DDRA 00 Set all port A pins to be inputs JICSUM D 3 27 MOTOROLA COMMANDS DDRB Set Port B Direction Register DDRB The DDRB command assigns the specified byte value to the port B data direction register DDR NOTE The DDRB is a 6 bit register The DDRB command ignores the upper two bits of larger values Syntax DDRB n where n Byte value for the port B DDR Examples gt DDRB 3F Set all port B pins to be outputs gt DDRB FF Set all port B pins to be outputs ignoring the upper two bits JICSUM D 3 28 MOTOROLA COMMANDS DUMP Dump Memory to Screen DUMP The DUMP command sends contents of a block of memory to the debug window in bytes or words The optional variant specifies whether to fill the block in bytes B the default or in words W NOTE If you enter the DUMP command the memory contents scroll through the debug window too rapidly to view Accordingly you first should enter the LOGFILE command which records the memory contents in a log Syntax DUMP B W startrange endrange n where startrange Beginning address of the memory block range endrange
24. 05J1A RAPID and CASMS5JIA are P amp E Microcomputer Systems Inc 1994 1995 All Rights Reserved Portions of the software are O Borland International 1987 Portions of the software are O Turbopower Software 1988 P amp E Microcomputer Systems Inc PO Box 2044 Woburn MA 01888 2044 617 944 7585 CONTENTS CONTENTS CHAPTER 1 OVERVIEW D F at res and Specifi ationsS oerte ERAN ire Rd eer tds 1 1 EZ Quick CN rere OTT ato de MIA RM akt MM teint eae e 1 2 Mos Kit Hardware Lue tentat cione TUM HEU BT Cont tue AMT UE Lure EE 1 3 1 4 Programming Quick Start d s pero A 1 7 E Simulation EE 1 8 CHAPTER 2 OPERATING THE SIMULATOR 2 1 Starting ICSOSILA Software sucias da laa 2 1 Dade NAS E ts des a A E 2 2 2 2 1 CPU Wind Mi ta 2 3 2 202 Code WN TINA ON tates eg ee aaah giereg eet 2 3 2 2 3 Variables WindOW ERT cic irie eee asis 2 5 LL Memory NANO AAA IA 2 6 2 2 5 Debug WIDdOW eR A ina 2 6 242 0 Secondary WINDOWS occu ger ria dnt su isis 2 7 2 9 A O 2 7 2 4 SI A A A uim as aac SE ad 2 9 2 9 NUDE SS A A A A A EE rates 2 9 A A be aecls 2 10 2 4 Seript Files espren A A di 2 10 2 8 Log Capture and History Hnforiatlod eoe das 2 10 2 9 Error Messages and Warnings e ices ie EEN aH ER AER RR ie sees 2 11 CHAPTER 3 COMMANDS Se o AAA ch 3 1 32 FCSOSJLA Command Um 3 1 A Set Accumulator Value AS 3 6 ACC Set Acc mu lator V AMES EE 3 7 ASM Assemble Instructions o Dioses ere E RA UE SuSE ag Ra dies 3 8 BELL sound Bell
25. Acc Xreg SP PC org rom 80 00 OOFF 0303 start clrx clear X register fo CCR CYCLES lda 80 111 IN 00000005 gt sta porta turn off LED1 initi lda fe VARIABLES F8 sta ddra make pins PA7 PA1 PORTA 80 10000000 bset 5 tcsr turn on timer overf PORTB 00 00000000 e cn ee DDRA 00 9500000000 jmp timer interrupt wil DDRB 00 9600000000 TSCR 03 9600000011 POD yes MEMORY F3 TIMER 01 9600000001 HC705J1A ISCR 80 9610000000 PDRA 00 9600000000 PDRB 00 9600000000 DEBUG F10 var pdrb gt T gt T gt Fl Help F2 Stack F4 History FS Brkpt F6 Count F7 Reg F9 rpt F10 Debug Figure 2 1 ICS05J1A Main Screen 2 2 MOTOROLA OPERATING THE SIMULATOR 2 2 1 CPU Window CPU Acc xreg SP PC XX XX OOFF 0300 CCR CYCLES 111 1 00000000 The CPU window is at the upper left of the main screen This window shows the current values in the accumulator X index register stack pointer SP program counter PC condition code register CCR and cycle counter The CCR flag pattern is 111HINZC H is half carry I is IRQ interrupt mask N is negative Z is zero and C is carry A letter in the CCR value indicates that the corresponding bit is set a period means that the corresponding bit is clear The top three bits are not implemented they always are set For example the CCR value 111 1 C means that the interrupt mask and carry flags are set have the value 1 but the other flags are clear have the value 0
26. COMMANDS GOMACRO Execute Macro after Break GOMACRO The GOMACRO command starts execution of code in the simulator beginning at the current program counter PC address Execution continues until it encounters a breakpoint when the software begins execution of the specified macro Syntax GOMACRO filename where filename Name of the script file to be executed as a macro The filename value need not include the MAC extension The filename value can be a pathname that includes an asterisk wildcard character if so the software displays a list of possible macro files for your selection Example GOMACRO AVCALC MAC Begin code execution at the current PC value at breakpoint execute macro AVCALC MAC JICSUM D 3 34 MOTOROLA COMMANDS GOTIL Execute until Location GOTIL The GOTIL command executes the program in the emulator beginning at the address in the program counter PC Execution continues until the instruction pointer contains the specified ending address Pressing the A1t G keys is similar code executes from the address in the PC to the highlighted line in the code window Syntax GOTIL endaddr where endaddr Execution stop address Example gt GOTIL 3F0 Execute the program in the emulator up to address 3F0 JICSUM D 3 35 MOTOROLA COMMANDS G OTOCYC LE Execute until Cycle Counter Value G OTOCYC LE The GOTOCYCLE command executes the program in the emulator beginning at the address in the progr
27. Ending address of the memory block range n Optional number of bytes or words to be written on one line Examples DUMP CO CF Dump array of RAM values in bytes DUMP W 400 47F Dump ROM code in addresses 400 47F in words gt DUMP B 300 400 8 Dump contents of addresses 300 400 in rows of eight bytes JICSUM D 3 29 MOTOROLA COMMANDS EVAL Evaluate Expression EVAL The EVAL command evaluates a numerical term or simple expression giving the result in hexadecimal decimal octal binary and ASCII character formats In an expression spaces must separate the operator from the numerical terms Note that octal numbers are not valid as operand values Operand values are 16 bits or less If the value is printable this command also displays the value in ASCII characters The operand can be a number or the sequence number space operator space and number This command supports addition subtraction multiplication and division Syntax EVAL n op n where n Alone the numerical term to be evaluated Otherwise either numerical term of a simple expression op The arithmetic operator or of a simple expression Examples gt EVAL 45 32 0077H 119T 0001670 00000000011101110 w gt EVAL 100T 0064H 100T 0001440 00000000011001000 q JICSUM D 3 30 MOTOROLA COMMANDS EXIT Exit Program EXIT The EXIT command terminates the host session and returns to DOS or RAPID The QUIT comman
28. INPUTB commands NOTE If the JICS circuit board is connected this command shows values from the board Syntax INPUTS Example gt INPUTS Show simulated input values Port A AA Port B 01 JICSUM D 3 46 MOTOROLA COMMANDS INT Set IRQ Pin State INT The INT command assigns the state value of the MCU IRQ pin To see the current simulated value on the pin enter this command without any parameter value The IRQ command is identical NOTE If the JICS circuit board is connected the IRQ pin value comes from the board so this command has no effect Syntax INT 0 1 Examples gt INT 0 Assign 0 to the IRQ pin gt INT 1 Assign 1 to the IRQ pin JICSUM D 3 47 MOTOROLA COMMANDS IRQ Set IRQ Pin State IRQ The IRQ command assigns the state value of the MCU IRQ pin To see the current simulated value on the pin enter this command without any parameter value The INT command is identical NOTE If the JICS circuit board is connected the IRQ pin value comes from the board so this command has no effect Syntax IRQ 0 1 Examples gt IRQ 0 Assign 0 to the IRQ pin gt IRQ 1 Assign 1 to the IRQ pin JICSUM D 3 48 MOTOROLA COMMANDS LF Open Close Log File LF The LF command opens an external file to receive log entries of commands and copies of responses in the debug window If the specified file does not yet exist this command creates the file The LOGFILE command is identical If the file
29. JICSUM D Revision 1 January 1996 M68HC705J1A IN CIRCUIT SIMULATOR USER S MANUAL MOTOROLA Inc 1996 All Rights Reserved Motorola reserves the right to make changes without further notice to any products herein to improve reliability function or design Motorola does not assume any liability arising out of the application or use of any product or circuit described herein neither does it convey any license under its patent rights nor the rights of others Motorola products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other application in which the failure of the Motorola product could create a situation where personal injury or death may occur Should Buyer purchase or use Motorola products for any such unintended or unauthorized application Buyer shall indemnify and hold Motorola and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthorized use even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part Motorola and the Motorola logo are registered trademarks of Motorola Inc Motorola Inc is an Equal Opportunity Affirmative Action Employer IBM is a registered trademark of IBM Corporation ICS
30. LA COMMANDS STEPTIL Step Until Location STEPTIL The STEPTIL command continuously executes instructions from the current program counter PC address value until the PC value reaches the specified address Syntax STEPTIL address where address Execution stop address This must be an instruction address Example gt STEPTIL 0400 Execute instructions continuously until the PC value is 0400 JICSUM D 3 94 MOTOROLA COMMANDS SYMBOL Add Symbol SYMBOL The SYMBOL command creates a new symbol which you can use anywhere in place of the symbol value If you enter this command without any parameter values the software displays the list of current user defined symbols This command has the same effect as an EQU statement in the assembler Syntax SYMBOL label value where label The ASCII character string label of the new symbol value The value of the new symbol Examples gt SYMBOL Show the current user defined symbols gt SYMBOL timer_control 08 Define new symbol timer control with value 08 Subsequently to modify location 08 you could enter the command MM timer control JICSUM D 3 95 MOTOROLA COMMANDS SYSINFO Show System Information SYSINFO The SYSINFO command shows the amount of system memory available to the simulator including the largest memory block available Syntax SYSINFO Example gt SYSINFO Show system information Total memory available 187488 Largest free block 187488
31. OLA OPERATING THE SIMULATOR 2 4 HELP SYSTEM The ICSOS5J1A features a pop up help system To access this system press the F1 key or enter the HELP command the help menu appears Position the cursor on a topic then press Enter to bring up a page of information There are two ways to by pass the help menu Entering the topic as a parameter of the HELP command Typing a topic at the command prompt in the debug window but pressing F1 instead of Enter A symbol at the bottom of help page indicates at least one more page of information To move among multiple pages of help information use the Page Up and Page Down keys To back out of the help system press Esc one or more times You may change the colors of the help screens via the COLORS command 2 5 NUMBERS You may change any values of the main screen from the debug window To change a value in the memory window use the MEM or MM command To change code in the code window use the ASM command To change values in other windows specify the name of the item and the new value The symbol XX indicates an uninitialized value The symbol UU indicates simulation of a memory location unimplemented in the MCU The default number format for ICSOSJIA is hexadecimal To override this default use the appropriate prefix for decimal for octal or for binary You do not have to use the prefix for hexadecimal values but it is not an error to do so The ICSOSJ1A also recogni
32. P amp E register files sold separately Syntax R Example gt R Start interactive system register setup JICSUM D 3 73 MOTOROLA COMMANDS REG Show Registers REG The REG command displays the contents of the CPU registers in the debug window Syntax REG Example gt REG Display the contents of the CPU registers JICSUM D 3 74 MOTOROLA COMMANDS REM Add Comment to Seript File REM The REM command marks a script file display comment When you execute the script file the comment appears in the debug window If you put several REM commands in a script file the different comments appear in the debug window as file execution proceeds NOTE Do not enter the REM or WAIT command in the debug window Unlike other ICS05J1A commands REM and WAIT are valid only inside script files Syntax REM text where text The display comment You need not enclose text in quotes pressing Enter terminates text Example REM Program executing Display message Program executing during script file execution JICSUM D 3 75 MOTOROLA COMMANDS RES ET Simulate Processor Reset RES ET The RESET command resets the emulation MCU and sets the program counter 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 gt RESET Reset the MCU JICSUM D 3 76 MOTOROLA COMMANDS RESET_COUNTS Reset Instruction Co
33. RAPID editor display appears Press the F4 key to assemble the PODTEST program Press the F6 key to go directly to the ICSOSJ1A simulator Should the ICSO5J1A main screen not appear check that file 1ICSO5J1A EXE is in the current directory MOTOROLA OVERVIEW 7 Type GO to start code simulation LED1 begins to flash Should LED1 not flash make sure that the fabricated jumper is inserted correctly in jumper header J2 If it is and LEDI still does not flash consult the quick start troubleshooting guide of Chapter 4 8 Press and hold circuit board switch S4 one or more times Each time you do LEDI stops flashing If LEDI does not stop flashing when you press S4 make sure that the fabricated jumper is inserted correctly in header J1 If the jumper is installed correctly but LEDI continues to flash consult the quick start troubleshooting guide of Chapter 4 Alternatively call Global Data Specialists 800 451 3464 or 602 437 4331 for a replacement 9 To stop program execution press any key 10 To return to the assembler type EXIT 11 To leave RAPID and return to DOS press F5 This completes the quick start 1 3 KIT HARDWARE Figure 1 1 shows the M68HC705JICS kit hardware a single printed circuit board Connect the board to your host computer via the DB9 serial cable run the cable between the computer serial port and board connector P2 If the host computer serial port is a 25 pin connector use the 9
34. S Example gt COLORS Set screen colors JICSUM D 3 22 MOTOROLA COMMANDS COUNTER Set Instruction Counter COUNTER The COUNTER command sets or removes an instruction counter at the specified address If no counter is set at the address already this command sets one If a counter already is set at the address this command removes the counter The maximum number of instruction counters is 32 you may not set an instruction counter at a breakpoint address When you set a new instruction counter it has the initial value 0 Each time code execution passes through the counter the software increments the counter value To clear reassign the value O to all the instruction counters enter the RESET COUNTS command To remove all the instruction counters enter the NOCNT command To see a list of current instruction counters in the debug window enter the COUNTER command without an address value An alternative way to see a list of current instruction counters is to press the F6 key this brings up the instruction counter window Paragraph 2 2 6 gives more information about this window Note this instruction counter alternative for code showing in the code window position the cursor on a line of code then press the A1t C keys This sets a counter at that line of code or removes an existing counter from the line Syntax COUNTER address where address The address for an instruction counter Examples gt COUNTER 300 Set an
35. Set X Register Value or TREE da 3 104 XREG SEC X Reester Valle sedes dari reds adum saei 3 105 Z Set Clear Z Bit ta or ar m MET add 3 106 ZOOM Resize SOUlCE WIHndOW iS rage EE 3 107 CHAPTER 4 SUPPORT INFORMATION dol F pcti nal DescripbEkom A A ae eee AI an 4 1 Set A o O e O Se 4 1 Bel A O 4 2 4 2 Quick 5tart Troubleshooting Guide de A ae es 4 2 4 3 Programming Troubleshooting Guide 4 4 A or AA O EE 4 4 lp IE E index 1 FIGURES Figure Page let MOS HC705JICS Circ it Board ss a a RE 1 4 2 1 ICSOSILA Main Soren as 2 2 4 1 HE Cogie Dias rad do 4 5 TABLES Table Page l t M6SHC705JICS SS PECIPCALIONS io E IEEE EUM AS 1 2 Zeal ESOSI LA HOTKEY o EA B EI OMA EB 2 8 3 1 E Commands essorer SE E EE AM NUS 3 2 JICSUM D vi MOTOROLA OVERVIEW CHAPTER 1 OVERVIEW The M68HC705J1A In Circuit Simulator Kit M68HC705JICS consists of a small printed circuit board ICSOSJ1A simulator software the CASMSJIA assembler and the RAPID integrated development environment The kit works with any PC or clone host computer that has 640 kilobytes of memory either floppy based or hard disk and has a standard serial port The board and the ICS05J1A software together form a full non realtime simulator and I O emulator for the MC68HC705J1A microcontroller unit MCU This simulator lets you debug your code in an easy to use software based environment Furthermore you may connect the board to your target hardware to use actual inputs
36. Size Document Number REV B 63BSE90659W 3 Date March 13 1995 Sheet 2 of V IOHOLOIN NOLLVINHOHNI LHOddNS INDEX A command 3 6 ACC command 3 7 Accumulator breakpoints 3 12 3 62 ASM command 2 4 2 9 3 8 BELL command 3 9 BF command 3 10 BR command 3 11 BREAKA command 3 12 Breakpoint window 2 7 Breakpoints accumulator 3 12 3 62 index 3 14 3 62 instruction 3 11 3 62 stack pointer 3 13 3 62 BREAKSP command 3 13 BREAKX command 3 14 C command 3 15 CAPTURE command 2 10 3 16 Capture files 2 10 CAPTUREFILE command 2 10 3 17 CCR command 3 18 CF command 2 10 3 19 Changing screen colors 2 7 2 10 3 22 Chip visualization window 2 7 CLEARMAP command 3 20 CLEARSYMBOL command 3 21 Code window 2 3 2 5 COLORS command 2 7 2 9 2 10 3 22 Color selection window 2 7 Colors changing 2 10 JICSUM D INDEX 1 INDEX MOTOROLA Commands ICS05J1A 3 1 3 107 COUNTER command 2 7 3 23 CPU window 2 3 CY command 1 8 2 3 3 24 CYCLES command 2 3 3 25 DASM command 3 26 DDRA command 3 27 DDRB command 3 28 DUMP command 3 29 Debug window 2 6 Error messages and warnings 2 11 EVAL command 3 30 EXIT command 1 3 3 31 Features 1 1 1 2 File types 2 1 Funtional description 4 1 4 2 G command 1 8 3 32 GO command 1 3 1 7 3 33 GOMACRO command 3 34 GOTIL command 2 4 3 35 GOTOCYCLE command 3 36 H command 3 37 Hardware 1 3 1 6 circuit board layo
37. TB n Set port B inputs INPUTS Show port inputs INT 0 1 Set IRQ pin state IRQ 0 1 Set IRQ pin state LF filename R A Open close log file LISTOFF Do not show steps LISTON Show steps LOAD filename Load S19 file LOADMAP filename Load map file LOGFILE filename RIA Open close log file MACRO filename Execute script file MACROEND Stop saving commands MACROSTART filename Save debug commands MD address Display memory MEM address n Modify memory MM address n Modify memory N Ou Set clear N bit NOBR address Remove breakpoints JICSUM D 3 3 MOTOROLA Table 3 1 ICS05J1A Commands continued COMMANDS Syntax Meaning NOONT address Remove instruction counters PC address Set PC value POD n Check serial port PORTA n Set port A output latches PORTB n Set port B output latches PROGRAM Program EPROM PRTAn Set port A output latches PRTB n Set port B output latches QUIET Suspend window updates QUIT Exit program R Set up system registers REG Show registers REM text Add comment to script file RESET Simulate processor reset RESET_COUNTS Reset instruction counters RESETGO Reset and restart MCU RUN startaddr endadan Begin program execution SCRIPT file
38. U The C8A MCU sends the data back through the serial port to the host computer This arrangement means that the simulator normally an I O restrictive program can interface to the real world The circuit board 7 38 megahertz crystal provides a clock signal for the C8A MCU the clock runs the MCU at a 3 69 megahertz bus rate Note that simulation speed is less than the bus rate as the host computer is the simulator Note that the C8A MCU unlike the J1A MCU does not have programmable pull downs Accordingly the JICS circuit board has external pull down resistors selectable via jumper headers J3 through J16 Remove the fabricated jumpers from any of these headers to disable the corresponding pull downs JICSUM D 4 1 MOTOROLA SUPPO RT INFORMATION 4 1 2 Programming Programming software in the host computer controls the JICS circuit board programming sockets U6 and U7 The C8A MCU communicates with the computer via its serial interface and handles all programming tasks with its I O pins The circuit board s MC34063 MCU generates the programming voltage 16 5 volts Switch S2 controls this voltage at the programming sockets The software prompts you to turn switches S1 and S2 on and off at the appropriate times 4 2 QUICK START TROUBLESHOOTING GUIDE In case of problems when you quick start your kit follow these steps Step 1 Step 2 Step 3 Step 4 Step 5 JICSUM D If the M68HSC705C8A MCU at circuit board loc
39. URE Capture Changed Data CAPTURE The CAPTURE command specifies locations to be monitored for changes in value If the value of such a location changes and if a capture file is open the file records the change in value Paragraph 2 8 gives more information about capture files To stop monitoring a location specify that same location in another CAPTURE command or close the capture file Closing the capture file undoes the specifications for all monitoring locations NOTE Before you enter the CAPTURE command open a capture file via the CAPTUREFILE or CF command The CAPTURE command has no effect unless a capture file is open Syntax CAPTURE address address where address Location to be monitored for a change in value Examples gt CAPTURE PORTA Monitor location PORTA for any value changes gt CAPTURE CO Monitor RAM location CO for any value changes gt CAPTURE DO D1 D2 Monitor for any value changes in an array of locations JICSUM D 3 16 MOTOROLA COMMANDS CAPTUREFILE Open Capture File CAPTUREFILE The CAPTUREFILE command opens a capture file to record changed values If the specified file does not yet exist this command creates the file Paragraph 2 8 gives more information about capture files If the file already exists you can use an optional parameter to specify whether to overwrite existing contents R the default or to append the log entries A If you omit this parameter a prompt asks for this overwri
40. VERVIEW e 20 lead emulation cable for connection to your target system Ability to program MC68HC705J1A EPROM MCUs e Wall plug power supply for running the MC68HC705JICS from 120 volt line power Table 1 1 lists M68HC705JICS specifications Table 1 1 M68HC705JICS Specifications Characteristic Specifications Temperature Operating Storage Room temperature 10 C 40 to 85 C Relative humidity 0 to 9595 non condensing Power requirements 9 Vdc 0 2 A from transformer that inputs 120 volt ac line power Dimensions 8 6 x 6 1 in 91 x 154 mm 1 2 QUICK START Follow the numbered steps below for a quick start hands on introduction to the M68HC705JICS kit JICSUM D 1 2 Install the JICS programs from the distribution diskette insert the diskette into the appropriate drive then type A install or B install according to the drive letter Follow the instructions that appear on the screen Use the provided DB9 cable to connect the M68HC705JICS circuit board to the COMI serial port of you computer If necessary use the 9 to 25 pin adapter between the cable and the computer serial port Plug the other end of the cable into circuit board connector P2 Plug the transformer into a wall socket plug the power cable into circuit board connector P1 Turn switch S1 ON to apply power to the circuit board At the DOS prompt type RAPID PODTEST then press the Enter key the
41. a map file Syntax CLEARMAP Example gt CLEARMAP Remove current source level map file JICSUM D 3 20 MOTOROLA COMMANDS CLEARSYMBOL Clear User Symbols CLEARSYMBOL The CLEARSYMBOL command removes all user defined symbols This command does not affect MAP file debug information Use the SYMBOL command to define symbols For a list of current user defined symbols enter the SYMBOL command without any parameter values Syntax CLEARSYMBOL Example gt CLEARSYMBOL Clear user defined symbols JICSUM D 3 21 MOTOROLA COMMANDS COLORS Set Screen Colors COLORS The COLORS command sets the screen colors Entering this command brings up the color selection window a matrix of foreground background color combinations and a list of screen elements Each color combination has a two digit hexadecimal number the first screen element is highlighted Work your way down the list of screen elements by entering the hexadecimal number of the color combination you want for the element then pressing Enter To retain the current color combination press Enter without entering a new number As the software accepts your selection for the current screen element it highlights the next element The COLORS command ends when you select a color combination for the last screen element or when you pressESC In the color matrix rows correspond to the eight background colors columns correspond to the 16 foreground colors Syntax COLOR
42. ace these MCUs or call Global Data Specialists 800 451 3464 or 602 437 4331 4 4 LOGIC DIAGRAM Figure 4 1 is the JICS logic diagram JICSUM D 4 4 MOTOROLA 9 y V IOHOLOIN pe 91307 SOIL T p 940814 dU e KU LAST EU M OSOHCUBJIICS EV DESCRIPTION DATE 1 VCC PIN LOCATIONS A 1 INITIAL RELEASE 12 20 94 VCC IS APPLIED TO PIN 8 OF ALL 8 PIN IC s PIN 14 OF ALL 14 PIN IC s PIN 16 OF ALL 2 Revise text R9 from 1 2k to 1 3k 1 17 95 16 PIN IC s PIN 20 OF ALL 20 PIN IC s ETC 3 Added C21 for additional VCC bypassing 2 8 95 2 GROUND PIN LOCATIONS GROUND IS APPLIED TO PIN 4 OF ALL 8 PIN IC s PIN 7 OF ALL 14 PIN IC s PIN 8 OF ALL 16 PIN IC s PIN 10 OF ALL 20 P N IC s ETC 3 DEVICE TYPE PIN NUMBERS AND REFERENCE DESIGNATOR OF GATES ARE SHOWN AS FOLLOWS RS232 UIA D ui INPUT POWER dicate 1 2 s vI vo vcc 7407 3 1 G ore g8 7407 DEVICE TYPE i15 dm c2 E 1 AND 2 PIN NUMBERS GND ATuF A Ex c3 E ER U1A REFERENCE DESIGNATORS J Ze 0 1uF iur 0 1uF 2 o 4 RESISTANCE VALUES ARE IN OHMS GND GND GND GND GND 5 CAPACITANCE VALUES ARE IN MICROFARADS GND u2 6 RESISTORS ARE 1 4 WATT 5 c7 ESCH 47uF Dt 25v 1N4148 E
43. am counter PC Execution continues until the simulator s cycle counter contains the specified value Syntax GOTOCYCLE n where n Cycle counter value at which execution stops Example gt GOTOCYCLE 100 Execute the program until the cycle count equals 100 JICSUM D 3 36 MOTOROLA COMMANDS H Set Clear H Bit H The H command sets or clears that is assigns O or to the H bit of the condition code register CCR NOTE The CCR bit designators are at the lower right of the CPU window The CCR pattern is 111 HINZC H is half carry I is IRQ interrupt mask N is negative Z is 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 gt H 0 Clear the H bit of the CCR gt H 1 Set the H bit of the CCR JICSUM D 3 37 MOTOROLA COMMANDS HELP Open Help System HELP The HELP command opens the ICSOSJ1A pop up help system If you enter this command with an optional command name help information for that command appears on the screen If you enter this command without any parameter value a help menu appears you may select a topic from this menu An alternative way to open the help system is to press the F1 key If you type an ICS05JIA command in the debug window but press F1 instead of Enter you bring up help information about the command immediately by passing the help menu To return to the help
44. and outputs of your target during simulation of your code After debugging is done you can use the same system to program your code into MC68HC705J1A MCUs Chapter 2 explains ICS05JIA operation identifying screen displays and windows Chapter 3 explains ICS05J1A commands Chapter 4 gives support information functional description troubleshooting guide and logic diagram For simulator quick start instructions see paragraph 1 2 Paragraph 1 3 gives M68HC705JICS hardware information Paragraph 1 4 gives quick start instructions for programming blank 705J1A MCUs Paragraph 1 5 gives an exercise for approximating the speed of your simulation The Kit software diskette includes RAPID an integrated development environment from P amp E Microcomputer Systems This version of RAPID is configured for the CASMS5JIA assembler and the ICSOSJ1A simulator The simulator kit includes a RAPID user s manual with separate sheets that explain the enhancements for CASMSJ1A and ICS05J1A 1 1 FEATURES AND SPECIFICATIONS M68HC705JICS kit features include e An economical means of developing and debugging target systems incorporating MC68HC705J1A MCUs RAPID integrated development environment that combines program assembly editing and in circuit simulation Four types of software breakpoints Communication with the host computer via any of eight serial ports e DB serial communication cable and 9 to 25 pin adapter JICSUM D 1 1 MOTOROLA O
45. apture information instructions timer values and CPU values during the time that history capture was enabled To bring up this window press F4 Press F10 or Esc to make the history window disappear Paragraph 2 8 and the Chapter 3 HISTORY command explanation give more information about history capture e Instruction Counter Window a display of instruction counters and values To bring up this window press F6 Press F10 or Esc to make this window disappear Chapter 3 s explanations of the COUNTER NOCNT and RESET_COUNTS commands give more information about instruction counters Entering the COUNTER command without any parameter values shows a list of instruction counters in the debug window but does not bring up the instruction counter window e Register Files Window a display of P amp E register files which list the purposes of MCU peripheral bits Register files are sold separately To bring up this window press F7 or enter the R command Press F10 or Esc to make this window disappear e Stack Window a depiction of the ICSO5JIA stack the interrupt stack and the subroutine stack To bring up this window type F2 Press F10 or Esc to make the stack window disappear 2 3 HOTKEYS ICSOSJ1A includes several hotkeys function keys special purpose keys and Alt key combinations that have specific uses Table 2 1 lists these hotkeys Note that several hotkeys are shortcut alternatives to entering ICSO5J1A commands JICSUM
46. arameter values You may enter parameter values in any order JICSUM D 2 1 MOTOROLA Examples of startup commands are gt ICS05J1A bw Start simulator use black and white display gt ICS05J1A myprog Start simulator by passing the opening screen load files MYPROG S19 and MYPROG MAP then simulate a reset gt ICS05J1A 2 myprog Start simulator as for the previous example but use serial port COM2 gt ICS05J1A b19200 Start simulator communicate at 19200 baud The J17 jumper must be between pins 2 and 3 as paragraph 1 3 explains Immediately upon startup the ICSOSJ1A runs the script file STARTUP OSJ if such a file is in the current directory Paragraph 2 7 explains more about script files The ICSO5J1A main screen appears to begin your simulator session 2 2 Main Screen Figure 2 1 shows the ICSOSJ1A main screen which consists of five primary windows CPU code variables memory and debug Paragraphs 2 2 1 through 2 2 5 explain these windows Centered among the primary windows are two lines of the form POD yes and HC705J1A The first line confirms communication between the JICS circuit board and the host computer the second line identifies the HCOS MCU being simulated ICSOSJ1A also includes several temporary windows which appear superimposed over the main screen when needed Paragraph 2 2 6 explains temporary windows CPU SOURCE podtest asm
47. at the corresponding bit of the CCR is set a period means that the corresponding bit is clear Syntax N O 1 Examples gt N 0 Clear the N bit of the CCR gt N 1 Set the N bit of the CCR JICSUM D 3 61 MOTOROLA COMMANDS NOBR Remove Breakpoints NOBR The NOBR command removes one or all addressed breakpoints If this command has an address value it removes the breakpoint at that address If this command has no parameter values it removes all current addressed breakpoints Note this alternative for code showing in the code window position the cursor on a line of code that has a breakpoint then press the A1t B keys This removes the breakpoint from the line NOTE An addressed breakpoint is one set by a BR BREAKA BREAKSP or BREAKX command that includes an address value Neither the NOBR command nor the Alt B alternative applies to breakpoints set by BREAKA BREAKSP or BREAKX commands that do not include address values Syntax NOBR address where address Optional address of a single breakpoint to be removed Examples gt NOBR Remove all current addressed breakpoints gt NOBR 320 Remove the breakpoint at address 320 JICSUM D 3 62 MOTOROLA COMMANDS NOCNT Remove Instruction Counters NOCNT The NOCNT command removes one or all instruction counters If this command has an address value it removes the counter at that address If this command has no parameter values it removes all current counters Note this
48. ation U4 has a window make sure that a black opaque label covers the window Reboot your computer without loading system startup files This eliminates TSRs mode commands and similar routines that could interfere with kit operation Make sure that you have the correct serial cable Disconnect the circuit board from the wall transformer then measure the transformer output This output should be greater than 9 volts dc but less than 15 volts If voltage is within this range proceed to step 5 If voltage is outside this range call Global Data Specialists 800 451 3464 or 602 437 4331 for a replacement Reconnect the transformer to the circuit board to measure the voltage at pin 3 of the 78T05 regulator location U1 With switch S1 turned ON the voltage at U1 pin 3 should be 5 volts 0 5 volts If the voltage is less than 4 5 volts make sure that your power supply can provide sufficient current if not correct the condition If there is sufficient current but the Ul pin 3 voltage still is less than 4 5 volts remove the CHA MCU If the voltage at U1 pin 3 climbs to the correct range the C8A MCU is defective call Global Data Specialists 800 451 3464 or 602 437 4331 to arrange for a replacement If the voltage remains below 4 5 volts even with the C8A MCU removed the circuit board is defective call Global Data Specialists for a replacement NOTE To replace the C8A MCU you must use a programmed replacement MCU substituting
49. ble history capture JICSUM D 3 40 MOTOROLA COMMANDS HISTORYLOG Log History Capture HISTORYLOG The HISTORYLOG command adds history buffer contents to a log file provided that a log file is open and provided that history capture is enabled The n parameter specifies the number of most recently captured items to log NOTE To open a log file use the LOGFILE or LF command To enable history capture use the HISTORY command The HISTORYLOG command should be the third command of this sequence Syntax HISTORYLOG n where n Number of history buffer instructions to log Example gt HISTORYLOG 10 Log most recent 16 decimal instructions from the history buffer JICSUM D 3 41 MOTOROLA COMMANDS l Set Clear Bit l The I command sets or clears that is assigns O or to the I bit of the condition code register CCR NOTE The CCR bit designators are at the lower right of the CPU window The CCR pattern is 111HINZC H is half carry I is IRQ interrupt mask N is negative Z is 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 gt I 0 Clear the I bit of the CCR gt I 1 Set the I bit of the CCR JICSUM D 3 42 MOTOROLA COMMANDS INFO Display Line Information INFO The INFO command displays information about the cursor line in the source window This information includes the name o
50. cumulator to a specified value The ACC and A commands are identical Syntax ACC n where n The value to be loaded into the accumulator Example gt ACC 20 Set the accumulator to 20 JICSUM D 3 7 MOTOROLA COMMANDS ASM Assemble Instructions ASM The ASM command assembles M68HCO5 Family instruction mnemonics placing the resulting machine code into memory at a specified address The command displays the specified address and contents and prompts for an instruction As you enter each instruction the command assembles the instruction stores and displays the resulting machine code then moves to the next memory location To terminate the command enter a period Syntax ASM address where address Address for the first machine code generated Examples gt ASM 300 0300 9D NOP gt CLRA 0300 4F CLRA 0301 9D NOP gt JICSUM D 3 8 MOTOROLA COMMANDS BELL Sound Bell BELL The BELL command sounds the computer bell the specified hexadecimal number of times The bell sounds once if you do not enter an argument To turn off the bell as it is sounding press any key Syntax BELL n where n The hexadecimal number of times to sound the bell Examples gt BELL Sound the bell once gt BELL C Sound the bell 12 decimal times gt BELL 12 Sound the bell 18 decimal times JICSUM D 3 9 MOTOROLA COMMANDS BF Block Fill BF The BF command fills a block of memory with a specified byte or word value
51. d displays your comment while the scriptfile executes the WAIT command establishes a pause between the execution of the script file commands If you give a script file the filename STARTUP 054 startup routines run the script file each time you start the ICSO5J1A Syntax MACRO filename where filename The name of a script file The filename value need not include the MAC extension The filename value can be a pathname that includes an asterisk wildcard character if so the software displays a list of script files for your selection Examples gt MACRO INIT MAC Execute commands in file INIT MAC gt MACRO Display names of all MAC files then execute the selected file gt MACRO A Display names of all MAC files in drive A then execute the selected file MACRO Display names of all MAC files in the current directory then execute the selected file JICSUM D 3 55 MOTOROLA COMMANDS MAC ROEND Stop Saving Commands MAC ROEND The MACROEND command closes the script file in which the software has saved debug commands The MACROSTART command opened the script file Syntax MACROEND Example gt MACROEND Stop saving debug commands to the script file close the file JICSUM D 3 56 MOTOROLA COMMANDS MAC ROSTA RT Save Debug Commands MAC ROSTA RT The MACROSTART command opens a script file and begins saving subsequent debug commands to that file for later use Before you end the ICSO5JIA session yo
52. d is identical Syntax EXIT Example gt EXIT Return to DOS or RAPID JICSUM D 3 31 MOTOROLA COMMANDS G Begin Program Execution G The G command starts execution of code in the simulator beginning at the current program counter PC address or at an optional startaddr address Execution continues until it encounters a breakpoint until it encounters an error or until you press a key If the G command includes both startaddr and endaddr values code execution begins at the startaddr address and ends at the endaddr address The GO and RUN commands are optional forms of the G command Syntax G startaddr endaddr where startaddr Optional execution starting address If the command does not have a startaddr value execution begins at the current PC value endaddr Optional execution ending address Examples gt G Begin code execution at the current PC value gt G 346 Begin code execution at address 346 gt G 400 471 Begin code execution at address 400 End code execution just before the instruction at address 471 JICSUM D 3 32 MOTOROLA COMMANDS GO Begin Program Execution GO The Go command like the RUN command is an optional form of the G command Syntax GO startaddr endaddr where startaddr Optional execution starting address If the command does not have a startaddr value execution begins at the current PC value endaddr Optional execution ending address JICSUM D 3 33 MOTOROLA
53. d is to duplicate one of those 64 addresses An alternative way to see a list of current breakpoints is to press the F5 key this brings up the breakpoint window Paragraph 2 2 6 gives more information about this window Note this breakpoint alternative for code showing in the code window position the cursor on a line of code then press the A1t B keys This sets a breakpoint at that line of code or removes an existing breakpoint from the line To remove all breakpoints use theNOBR command Syntax BR address n where address The address for a breakpoint n Break after value code execution passes through the breakpoint n 1 times then breaks the nth time it arrives at the breakpoint Examples gt BR 300 Set a breakpoint at address 300 gt BR 330 8 Set a breakpoint at address 330 break on eighth arrival at 330 JICSUM D 3 11 MOTOROLA COMMANDS BREAKA Set Accumulator Breakpoint BREAKA The BREAKA command sets an accumulator breakpoint it breaks code execution when the value of the accumulator equals the specified n value e With an n value the command forces a break in execution as soon at the accumulator value equals n e With n and address values the command forces a break in execution when the accumulator value equals n and execution arrives at the specified address If the accumulator value changes from n by the time execution arrives at the address no break occurs NOTE The maximum number of breakpoin
54. e append choice While logging remains in effect any line that is appended to the debug window is also written to the log file Logging continues until you enter another LF or LOGFILE command without any parameter values this second command disables logging and closes the log file Syntax LOGFILE filename R A where filename The DOS filename of the log file or logging device Examples gt LOGFILE TEST LOG Start logging Overwrite file TEST LOG in the current directory with all lines that appear in the debug window gt LOGFILE TEMP LOG A Start logging Append to file TEST LOG in the current directory all lines that appear in the debug window gt LOGFILE If logging is enabled Disable logging and close the log file JICSUM D 3 54 MOTOROLA COMMANDS MACRO Execute Script File MACRO The MACRO command executes a script file a file that contains a sequence of debug commands Executing the script file has the same effect as executing the individual commands one after another The SCRIPT command is identical Entering this command without a filename value brings up a list of script MAC files in the current directory You can select a file to be executed directly from this list Note that a script file can contain the SCRIPT or MACRO command in this way you can nest script files as many as 16 levels deep Also note that the most common use of the REM and WAIT commands is within script files The REM comman
55. ecified address and asks for a data value Enter the data value and press Enter the software assigns the value to the location then moves to the next address To leave a memory value unchanged press Enter without entering a new value To stop assigning memory values enter a period instead of a valid value Syntax MEM address n where address The address of the first memory location to be modified n Optional data value Examples gt MEM DO 11 22 33 Assign values 11 22 and 33 to successive addresses DO D1 and D2 gt MEM 300 Start memory modify at address 300 300 OF gt 05 Change current OF value to 05 advance to address 301 301 10 Retain current 10 value advance to address 302 302 22 gt 1B Change current 22 value to 1B advance to address 303 303 3D gt End memory modify JICSUM D 3 59 MOTOROLA COMMANDS MM Modify Memory MM The MM command is an alternative form of the MEM command Syntax MM address n where address The address of the first memory location to be modified n Optional data value JICSUM D 3 60 MOTOROLA COMMANDS N Set Clear N Bit N The N command sets or clears that is assigns 0 or to the N bit of the condition code register CCR NOTE The CCR bit designators are at the lower right of the CPU window The CCR pattern is 111 HINZC H is half carry I is IRQ interrupt mask N is negative Z is Zero and C is carry A letter in these designators means th
56. ecifies an address for monitoring adding the address and its current contents to the variables window As the value at the address changes the variables window updates the value The byte word or string variant determines the display format Byte B hexadecimal and binary the default e Word W hexadecimal and decimal String S ASCH characters The optional n parameter specifies the number of string characters to be displayed the default value is 12 The n parameter has no effect for byte or word values Syntax VAR B W S address n where address The address of the memory variable n Optional number of characters for a string variable default value is 12 does not apply to byte or word variables Examples gt VAR CO Show byte value of address CO hexadecimal and binary gt VAR B D4 Show byte value of address D4 hexadecimal and binary gt VAR W EO Show word value of address EO hexadecimal and decimal gt VAR S CO 5 Show the five character ASCII string at address CO JICSUM D 3 99 MOTOROLA COMMANDS VER Display Version VER The VER command displays the version and date of ICSO5J1A VERSION is an alternate form of this command Syntax VER Example gt VER Display ICSOSJ1A version JICSUM D 3 100 MOTOROLA COMMANDS VERSION Display Version VERSION The VERSION command displays the version and date of the ICSOSJ1A VER is an alternate form of this command Syntax
57. eps LISTON The LISTON command shows a screen listing of step by step information during stepping Register values and program instructions appear in the debug window as code runs To turn off this step display use the LISTOFF command Syntax LISTON Example gt LISTON Show step information JICSUM D 3 51 MOTOROLA COMMANDS LOAD Load S19 File LOAD The LOAD command loads the specified S19 format file and any map file with the same name into the simulator Entering this command without a filename value brings up a list of S19 files in the current directory You can select a file to be loaded directly from this list Syntax LOAD filename where filename The name of the S19 file to be loaded The filename value need not include the S19 extension The filename value can be a pathname that includes an asterisk wildcard character if so the software displays a list of possible files for your selection Examples gt LOAD PROG1 S19 Load file PROG1 S19 and its map file into the emulator at the load addresses in the file gt LOAD PROG2 Load file PROG2 S19 and its map file into the emulator at the load addresses in the file gt LOAD A Display the names of the S19 files on the diskette in drive A for user selection of a file gt LOAD Display the names of the S19 files in the current directory for user selection of a file JICSUM D 3 52 MOTOROLA COMMANDS LOADMAP Load Map File LOADMAP
58. ex breakpoint before the break occurs enter the BREAKX command without any parameter values If you enter the BREAKX command without an address value the index breakpoint does not show in the breakpoint window If you enter the BREAKX command with an address value you may remove the index breakpoint by 1 entering the NOBR command or 2 positioning the cursor on that address in the code window then pressing Alt B Syntax BREAKX n address where n Index register value that triggers a break in execution address Optional address for the break in execution provided that the index register value equals n Examples gt BREAKX A9 Break execution when the index register value equals A9 gt BREAKX Cancel index breakpoint gt BREAKX A9 400 Break execution at address 400 if index register value equals A9 JICSUM D 3 14 MOTOROLA COMMANDS C Set Clear C Bit C The C command sets or clears that is assigns 0 or to the C bit of the condition code register CCR NOTE The CCR bit designators are at the lower right of the CPU window The CCR pattern is 111 HINZC H is half carry I is IRQ interrupt mask N is negative Z is 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 gt C 0 Clear the C bit of the CCR gt C 1 Set the C bit of the CCR JICSUM D 3 15 MOTOROLA COMMANDS CAPT
59. f the file being displayed in the window the line number the address the corresponding object code and the disassembled instruction Syntax INFO Example gt INFO Display information about the cursor line Filename S PODTEST ASM Line number A 6 Address 0300 Disassembly START 5F CLRX JICSUM D 3 43 MOTOROLA COMMANDS INPUTA Set Port A Inputs INPUTA The INPUTA command sets the simulated inputs to port A The CPU reads this simulated input for LDA PRTA or a similar instruction NOTE If the JICS 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 gt INPUTA AA Simulate the input AA on port A JICSUM D 3 44 MOTOROLA COMMANDS INPUTB Set Port B Inputs INPUTB The INPUTB command sets the simulated inputs to port B The CPU reads this simulated input for LDA PRTB or a similar instruction NOTES If the JICS circuit board is connected port B inputs come from the board so this command has no effect Port B consists of six bits the INPUTB command ignores the upper two bits of larger values Syntax INPUTB n where n Six bit simulated value for port B Example gt INPUTB 11 Simulate the input on port B JICSUM D 3 45 MOTOROLA COMMANDS INPUTS Show Port Inputs INPUTS The INPUTS command shows the simulated input values to ports A and B entered via the INPUTA and
60. ime for certain instructions than for others preventing a straightforward calculation of simulation speed But you can get a feel for the simulation speed by calculating the actual speed to do so follow the steps below NOTE An actual speed of 10 kilohertz means that the simulator on your computer is running at the same speed as the real JIA MCU with a 20 kilohertz crystal a divide by 2 is attached to the internal oscillator output Typical values for the actual speed are 3 to 50 kilohertz 1 Use the LOAD command to load your code 2 Setthe PC value to the beginning of your routine 3 Clear the cycle counter by typing CY 0 then pressing Enter NOTE Entering the QUIET command at this point will increase execution speed by suspending updates to main screen windows Chapter 3 gives additional information about the QUIET command 4 Get your stopwatch ready Type G Then simultaneously start the stopwatch and press Enter execution begins 6 After 10 seconds simultaneously stop the watch and press the space bar of your keyboard execution stops 7 Type CY Enter the cycle count appears in hexadecimal and decimal formats 8 Divide the decimal cycle count by 10 The result is your actual speed in hertz JICSUM D 1 8 MOTOROLA OPERATING THE SIMULATOR CHAPTER 2 OPERATING THE SIMULATOR This chapter explains how to start and use the ICSOSJ1A simulator and I O emulator ICS05J1A is a full MC68HC705J14A software sim
61. indow 2 5 VER command 3 100 VERSION command 3 101 Warnings and error messages 2 11 WAIT command 3 102 WHEREIS command 3 103 JICSUM D INDEX 6 INDEX MOTOROLA Windows breakpoint 2 7 chip visualization 2 7 code 2 3 2 5 color selection 2 7 CPU 2 3 debug 2 6 history 2 7 instruction counter 2 7 memory 2 6 register files 2 7 stack 2 7 variables 2 5 X command 3 104 XREG command 3 105 Z command 3 106 ZOOM command 3 107 JICSUM D INDEX 7 INDEX MOTOROLA
62. instruction counter at location 300 gt COUNTER Show current instruction counters in debug window JICSUM D 3 23 MOTOROLA COMMANDS CY Set Cycles Counter CY The CY command manages the cycles counter The cycles counter counts the number of MCU cycles the count can be useful for timing or scheduling If you enter the CY command without any parameter value it displays the current cycle count in hexadecimal and decimal formats and relates the count to a 2 megahertz bus speed If you enter the cY command with an n parameter value it assigns that value to the cycles counter The CYCLES command is identical Syntax CY n where n Integer value for the cycles counter Examples gt CY 0 Reset cycles counter gt CY Show cycle count relate to 2 megahertz bus speed gt CY 1000 Set cycle counter value to 1000 JICSUM D 3 24 MOTOROLA COMMANDS CYCLES Set Cycles Counter CYCLES The CYCLES command manages the cycles counter The cycles counter counts the number of MCU cycles the count can be useful for timing or scheduling If you enter the CYCLES command without any parameter value it displays the current cycle count in hexadecimal and decimal formats and relates the count to a 2 megahertz bus speed If you enter the CYCLES command with an n parameter value it assigns that value to the cycles counter The CY command is identical Syntax CYCLES n where n Integer value for the cycles counter Exam
63. is window Hotkey definitions form the bottom of this window s frame To return to this window from the code or memory windows press the F10 key JICSUM D 2 6 MOTOROLA OPERATING THE SIMULATOR 2 2 6 Secondary Windows Each secondary window appears only when needed superimposed over the main screen Making any of these windows disappear returns you to the debug window The secondary windows include Breakpoint Window a display of all current breakpoints To bring up this window press F5 Press F10 or Esc to make the breakpoint window disappear Entering the BR command without any parameter values shows a list of breakpoints in the debug window but does not bring up the breakpoint window Chip Visualization Window a depiction of the MCU itself showing the role of each pin Arrow symbols indicate whether each pin is programmed as an input or an output A value outside an arrow symbol is the value currently being simulated on the pin To bring up this window enter the SHOWCHIP command To make the chip visualization window disappear enter the HIDECHIP command e Color Selection Window a matrix of foreground background color combinations for screen elements you select colors for these elements from this window To bring up this window enter the COLORS command Paragraph 2 6 and the Chapter 3 COLORS command explanation give more information about screen colors History Window a full screen display of history c
64. itored for value changes JICSUM D 2 10 MOTOROLA OPERATING THE SIMULATOR e History buffer a circular buffer that captures instructions timer values and CPU values when you enable history capture via the HISTORY command If you also open a log file and use the HISTORYLOG command ICS05J1A also puts the history information in the log file You may openthe history window via the F4 key to view buffer contents directly 2 9 ERROR MESSAGES AND WARNINGS There are many possible error messages and warnings in ICS05J1A Most of these messages are self explanatory referring to the instruction currently being simulated A common form of error messages is gt Attempt to use uninitialized XX memory In most cases the message specifies an address or a CPU register The probable error that caused the message is an uninitialized variable Another likely cause for such anerror message is trying to place an uninitialized register on the stack during interrupt processing To get around this enter a value into the A or X register It is good practice to always have known values in these registers Remember that loading code into the simulator does not cause a CPU reset Only a CPU reset via the RESET command makes the simulator load the reset vector into the program counter PC JICSUM D 2 11 MOTOROLA COMMANDS CHAPTER 3 COMMANDS Enter ICSO5J1A commands at the bottom of the debug window Table 3 1 is a list of these commands
65. just any C8A MCU isnot satisfactory If a programmed replacement is not available you may be able to program a replacement yourself by downloading file ICSO5J S19 from Motorola s BBS at 512 891 3733 or Motorola s web site at http design net com csic CSIC_home html 4 2 MOTOROLA Step 6 Step 7 Step 8 Step 9 Step 10 Step 11 JICSUM D SUPPO RT INFORMATION If you measure 5 volts at pin 3 ofthe 78TO05 regulator when the C8A MCU is installed measure the voltage between VDD pin 40 and VSS pin 20 of the C8A MCU If the level is not also 5 volts check for a bent pin or other structural problem with the socket or the board trace If you cannot find a structural problem call Global Data Specialists 800 451 3464 or 602 437 4331 to arrange for a board replacement If there are 5 volts between C8A pins 40 and 20 use an oscilloscope to check the output of pin 38 of the MCU Set the oscilloscope to 0 5 microseconds per division You should observe one cycle per division which corresponds to a signal of about 7 3 megahertz If you do not get this result any of these problems could exist e bad crystal location Y 1 e bad resistor location R16 e bad capacitor location C13 or C17 e bad CHA MCU location U4 e bad socket location U4 e broken trace on the circuit board e cold solder joint on the circuit board If you have not yet found the problem measure two signals when you enter the POD command pin 3 of
66. lator 2 1 2 11 Overview 1 1 1 8 PC command 1 7 3 64 POD command 3 65 PORTA command 3 66 PORTB command 3 67 PROGRAM command 1 7 3 68 4 4 JICSUM D INDEX 4 INDEX MOTOROLA Programming quick start 1 7 troubleshooting 4 4 PRTA command 3 69 PRTB command 3 70 Quick start ICS05J1A 1 2 1 3 programming 1 7 troubleshooting 4 2 4 3 QUIET command 1 8 3 71 QUIT command 3 72 R command 3 73 REG command 3 74 Register files window 2 7 REM command 2 10 3 75 RESET command 2 11 3 76 RESET COUNTS command 2 7 3 77 RESETGO command 3 78 RUN command 3 79 Reset switch 1 3 1 4 Schematic diagram 4 5 4 6 Screen main 2 2 2 7 SCRIPT command 3 80 Script files 2 10 Setting jumper headers 1 4 1 6 SHELL command 3 81 SHOW command 2 6 3 82 SHOWCHIP command 2 7 3 83 SHOWCODE command 3 84 SHOWPC command 3 85 Simulation speed 1 8 SNAPSHOT command 3 86 JICSUM D INDEX 5 INDEX MOTOROLA SOURCE command 3 87 SP command 3 88 Specifications 1 2 SS command 3 89 ST command 3 90 STACK command 3 91 Stack pointer breakpoints 3 13 3 62 Stack window 2 7 Starting ICSOSJIA 2 1 2 2 STEP command 3 92 STEPFOR command 3 93 STEPTIL command 3 94 Support information 4 1 4 6 SYMBOL command 3 95 SYSINFO command 3 96 T command 3 97 Troubleshooting programming 4 4 quick start 4 2 4 3 UPLOAD SREC command 3 98 VAR command 3 99 Variables w
67. mmand only the disassembled code display reflects your changes In other words the source code display no longer will be correct To incorporate your changes into the source code display you must use RAPID and CASMOSJ to re assemble the code Syntax SOURCE Example SOURCE Toggle the display in the code window JICSUM D 3 87 MOTOROLA COMMANDS SP Set SP Value SP The SP command assigns the specified value to the stack pointer SP Syntax SP n where n The new SP value CO through FF Example gt SP SEO Set the SP value to SEO JICSUM D 3 88 MOTOROLA COMMANDS SS Source Step SS The SS command steps through one or a specified number of source code instructions beginning at the current program counter PC address value This makes the SS command useful to high level language compilers for stepping through compiler source code instead of the assembly instructions If you enter this command without any parameter value it steps through one source level instruction If you enter the SS command with an n value the command steps through that many source level instructions Syntax SS n where n Optional number of instructions to step through Examples SCH Step through the instruction at the PC address value SS 8 Step through eight instructions starting at the PC address value JICSUM D 3 89 MOTOROLA COMMANDS ST Single Step Trace ST The ST command steps through one or a specified number
68. mples gt WHEREIS START Display the symbol START and its value gt WHEREIS 0300 Display the value 0300 and its symbol if any JICSUM D 3 103 MOTOROLA COMMANDS A Set X Register Value A The X command sets the index register X to the specified value The X command is identical to the XREG command Syntax X value where value The new value for the X register Example gt X 05 Set the index register value to 05 JICSUM D 3 104 MOTOROLA COMMANDS XREG Set X Register Value XREG The XREG command sets the index register X to the specified value The XREG command is identical to the X command Syntax XREG value where value The new value for the X register Example gt XREG FO Set the index register value to FO JICSUM D 3 105 MOTOROLA COMMANDS Z Set Clear Z Bit Z The Z command sets or clears that is assigns O or to the Z bit of the condition code register CCR NOTE The CCR bit designators are at the lower right of the CPU window The CCR pattern is 111 HINZC H is half carry I is IRQ interrupt mask N is negative Z is 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 Z 0 1 Examples gt Z 0 Clear the Z bit of the CCR gt Z 1 Set the Z bit of the CCR JICSUM D 3 106 MOTOROLA COMMANDS ZOOM Resize Source Window ZOOM The ZOOM command toggles the size of the
69. n then select BLANK CHECK 4 Ifthe MCU is blank select PB to program the EPROM and the MOR from the program previously loaded in the simulator Other options include selecting PE to program only the EPROM and PM to program only the MOR register 5 Check the functionality of programming a mh o n5 g h i Select QU to quit the programmer then follow the screen instructions to exit both ICS05J1A and RAPID Make sure that switch S1 VCC is ON make sure that switch S2 VPP is OFF Then restart ICSO5J1A without loading a program Type PROGRAM then follow the screen instructions Select SU to specify a S19 upload file enter filename TEST 819 Select UL to upload the EPROM to the S19 file Select QU to quit the programmer and return to ICSOSJ1A follow the screen instructions Make sure that switch S1 VCC is ON make sure that switch S2 VPP is OFF Type LOAD TEST to load the S19 file into the simulator Type PC 300 to set the program counter value to 300 Type Go to run the program verify that LED1 flashes Should programming not be successful for example if the MCU does not verify consult the programming trouble shooting guide in Chapter 4 JICSUM D 1 7 MOTOROLA OVERVIEW 1 5 SIMULATION SPEED Your host computer simulates execution of instructions this simulation is noticeably slower than an MCU s actual execution of the instructions Furthermore this simulation takes more t
70. name Execute script file SHELL command Shell to DOS SHOW address Display memory SHOWCHIP Open chip window SHOWCODE address Display code SHOWPC Display code at PC SNAPSHOT Save screen SOURCE Toggle code display SP n Set SP value SS n Source step ST n Single step STACK Display stack JICSUM D 3 4 MOTOROLA Table 3 1 ICS05J1A Commands continued COMMANDS Syntax Meaning STEP n Single step STEPFOR Step forever STEPTIL address Step until location SYMBOL abel value Add symbol SYSINFO Show system information T n Single step UPLOAD SREC startrange endrange Upload S record VAR B W S address n Display variable VER Display version VERSION Display version WAIT n Wait n cycles WHEREIS symbol address Display symbol value X value Set X register value XREG value Set X register value Z OI Set clear Z bit ZOOM Resize source window JICSUM D 3 5 MOTOROLA COMMANDS A Set Accumulator Value A The A command sets the accumulator to a specified value The A and ACC commands are identical Syntax A n where n The value to be loaded into the accumulator Example gt A 10 Set the accumulator to 10 JICSUM D 3 6 MOTOROLA COMMANDS ACC Set Accumulator Value ACC The ACC command sets the ac
71. ockets U6 and U7 are empty Verify that the voltage on pin 19 of the programming sockets is 16 5 volts If voltage is less than 16 volts or greater than 17 volts the socket may be bad or there may be a bad circuit board trace To find such a problem go through quick start troubleshooting per paragraph 4 2 If pin 19 of either programming socket does not have 16 5 volts but is in the 16 to 17 volt range calibrate VPP To do so turn switch S1 ON turn switch S2 ON then measure the signal on pin 19 of socket U6 Adjust potentiometer VR1 until your meter reads 16 5 volts Then turn switches S2 and S1 OFF This completes VPP calibration Type PROGRAM and follow the instructions that appear on the programming screen Before you insert the 705J1A MCU into a programming socket make sure that the MCU erase window is covered Choose the BLANK CHECK programming option You should see activity on pin 1 of socket U6 or U7 If there is no activity there is a circuit board or M68HSC705C8A MCU problem call Global Data Specialists 800 451 3464 or 602 437 4331 to arrange for a replacement If the blank check result is PART NOT BLANK erase or replace the 705J1A MCU If there is activity on pin 1 of socket U6 or U7 choose the PROGRAM option Use an oscilloscope to measure VPP as the 705J1A MCU is being programmed VPP should not drop below 16 volts Should VPP drop below 16 volts the 705J1A MCU or the MC34063 MCU is defective repl
72. of assembly instructions beginning at the current program counter PC address value Then this command halts If you enter this command without any parameter value it steps through one instruction If you enter the ST command with an n value the command steps through that many instructions The ST STEP and T commands are identical Syntax ST n where n The hexadecimal number of instructions to be executed Examples gt ST Execute the assembly instruction at the PC address value gt ST 2 Execute two assembly instructions starting at the PC address value JICSUM D 3 90 MOTOROLA COMMANDS STACK Display Stack STACK The STACK command depicts the ICSO5JIA stack Entering this command brings up the stack window which shows the stack pointer SP value and the top 12 raw byte values of the stack During an interrupt the stack window also shows the interrupt stack the top five values of the stack plus the values of the condition code register CCR accumulator A and index X register This information indicates the restored state of the stack upon the return from the interrupt During execution of a subroutine the stack window also shows the subroutine stack which indicates the restored state of the stack upon the return from the subroutine NOTE M68HCO05 MCUs store information in the stack 1 during an interrupt or 2 during execution of a subroutine The stack window shows both these possible interpretations of
73. other bits clear JICSUM D 3 18 MOTOROLA COMMANDS CF Open Capture File CF The CF command opens a capture file to record changed values If the specified file does not yet exist this command creates the file Paragraph 2 8 gives more information about capture files If the file already exists you can use an optional parameter to specify whether to overwrite existing contents R the default or to append the log entries A If you omit this parameter a prompt asks for this overwrite append choice To close the capture file enter this command without any parameter values NOTES The CAPTURE command specifies the locations to be monitored for value changes Closing the capture file deletes the location specification The simulator continues writing to an open capture file You must close the capture file within a reasonable time to prevent the file from growing large The CF and CAPTUREFILE commands are identical If no CAPTURE command has specified locations to be monitored the CF and CAPTUREFILE commands have no effect Syntax CF filename R A where filename Name of the capture file Examples gt CF TEST CAP Open capture file TEST CAP gt CF TEST4 CAP A Open capture file TEST4 CAP append new entries JICSUM D 3 19 MOTOROLA COMMANDS CLEARMAP Clear Map File CLEARMAP The CLEARMAP command removes the current loaded source level map file from the system Use the LOAD or LOADMAP command to load
74. ple gt POD 1 Check serial port COMI Port A 80 Port B 00 Reset 1 Irq 1 Version 1 00 JICSUM D 3 65 MOTOROLA COMMANDS PORTA Set Port A Output Latches PORTA The PORTA command assigns the specified value to the port A output register latches The PRTA command is an alternate form of the PORTA command NOTE If the JICS 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 register latches Example gt PORTA FF Set all port A output latches high JICSUM D 3 66 MOTOROLA COMMANDS PORTB Set Port B Output Latches PORTB The PORTB command assigns the specified value to the port B output register latches The PRTB command is an alternate form of the PORTB command NOTES If the JICS circuit board is connected the system sends the n parameter value of this command to the board Port B consists of six bits the PORTB command ignores the uppertwo bits of larger values Syntax PORTB n where n The new value for the port B output register latches Example gt PORTB 33 Set the port B output latches to 33 JICSUM D 3 67 MOTOROLA COMMANDS PROGRAM Program EPROM PROGRAM The PROGRAM command starts the EPROM programmer software which also can program the MOR byte Entering this command brings up the programming screen which consists of three windows Log window which contains in
75. ples gt CYCLES 0 Reset cycles counter CYCLES Show cycle count relate to 2 megahertz bus speed gt CYCLES 1000 Set cycle counter value to 1000 JICSUM D 3 25 MOTOROLA COMMANDS DASM Disassemble Memory DASM The DASM command disassembles machine instructions displaying the addresses and the contents as disassembled instructions in the debug window If the command includes an address value ICSOSJIA shows three disassembled instructions beginning at that address If you enter the DASM command without any parameter values the software finds the most recently disassembled instruction then shows the next three instructions disassembled If the command includes startrange and endrange values the software shows disassembled instructions for the range NOTE If you enter the DASM command for a range the disassembled instructions scroll through the debug window too rapidly to view Accordingly you first should enter the LOGFILE command which records the disassembled instructions in a log Syntax DASM address startrange endrange where address First address of three instruction opcodes to be disassembled startrange Starting address for a range of instructions to be disassembled endrange Ending address for a range of instructions to be disassembled Examples gt DASM 300 0300 AGES LDA 0E8 0302 B702 STA 0002 0304 4F CLRA gt DASM 400 408 0400 0401 0403 0405 0407 5F CLRX A680 LDA 8
76. point BREAKX n address Set index breakpoint coji Set clear C bit CAPTURE adaress address Capture changed data CAPTUREFILE filename R A Open capture file CCR n Set condition code register CF filename R A Open capture file CLEARMAP Clear map file CLEARSYMBOL Clear user symbols COLORS Set screen colors COUNTER adaress Set instruction counter CY ni Set cycles counter CYCLES n Set cycles counter DASM address startrange endrange Disassemble memory DDRA n Set port A direction register DDRB n Set port B direction register DUMPT B W startrange endrange n Dump memory to screen EVAL n op n Evaluate expression EXIT Exit program G startaddr endadar Begin program execution GO startadar endadan Begin program execution JICSUM D 3 2 MOTOROLA Table 3 1 ICS05J1A Commands continued COMMANDS Syntax Meaning GOMACRO filename Execute macro after break GOTIL endadar Execute until location GOTOCYCLE n Execute until cycle counter value H 0 1 Set clear H bit HELP topic Open help system HIDECHIP Close chip window HISTORY History capture HISTORYLOG n Log history capture 1011 Set clear bit INFO Display line information INPUTA n Set port A inputs INPU
77. point it breaks code execution when the value of the stack pointer equals a specified value e With an n value the command forces a break in execution as soon at the stack pointer value equals n e With n and address values the command forces a break in execution when the stack pointer value equals n and execution arrives at the specified address If the stack pointer value changes from n by the time execution arrives at the address no break occurs NOTE The maximum number of breakpoint addresses is 64 Each BR BREAKA BREAKSP or BREAKX command that includes an address value uses an additional breakpoint address unless the address is a duplicate For example if 64 BR commands already have taken up 64 addresses the only way to include an address value in a BREAKA BREAKSP or BREAKX command is to duplicate one of those 64 addresses For a BREAKSP command without an address value the break in code execution removes the stack pointer breakpoint To cancel the stack pointer breakpoint before the break occurs enter the BREAKSP command without any parameter values If you enter the BREAKSP command without an address value the stack pointer breakpoint does not show in the breakpoint window If you enter the BREAKSP command with an address value you may remove the stack pointer breakpoint by 1 entering the NOBR command or 2 positioning the cursor on that address in the code window then pressing Alt B Syntax BREAKSP n add
78. rent PC value gt RUN 346 Begin code execution at address 346 gt RUN 400 471 Begin code execution at address 400 End code execution just before the instruction at address 471 JICSUM D 3 79 MOTOROLA COMMANDS SCRIPT Execute Script File SCRIPT The SCRIPT command executes a script file a file that contains a sequence of debug commands Executing the script file has the same effect as executing the individual commands one after another The MACRO command is identical Entering this command without a filename value brings up a list of script MAC files in the current directory You can select a file to be executed directly from this list Note that a script file can contain the SCRIPT or MACRO command in this way you can nest script files as many as 16 levels deep Also note that the most common use of the REM and WAIT commands is within script files The REM command displays your comment while the scriptfile executes the WAIT command establishes a pause between the execution of the script file commands If you give a script file the filename STARTUP 054 startup routines run the script file each time you start the ICSOSJ1A Syntax SCRIPT filename where filename The name of a script file The filename value need not include the MAC extension The filename value can be a pathname that includes an asterisk wildcard character if so the software displays a list of script files for your selection Examples g
79. ress where n Stack pointer value that triggers a break in execution CO FF address Optional address for the break in execution provided that the stack pointer value equals n Examples gt BREAKSP EO Break execution when the SP value equals EO gt BREAKSP Cancel SP breakpoint gt BREAKA EO 400 Break execution at address 400 if SP value equals EO JICSUM D 3 13 MOTOROLA COMMANDS BREAKX Set Index Breakpoint BREAKX The BREAKX command sets an index breakpoint 1t breaks code execution when the value of the index register equals a specified value e With an n value the command forces a break in execution as soon at the index register value equals n e With n and address values the command forces a break in execution when the index register value equals n and execution arrives at the specified address If the index register value changes from n by the time execution arrives at the address no break occurs NOTE The maximum number of breakpoint addresses is 64 Each BR BREAKA BREAKSP or BREAKX command that includes an address value uses an additional breakpoint address unless the address is a duplicate For example if 64 BR commands already have taken up 64 addresses the only way to include an address value in a BREAKA BREAKSP or BREAKX command is to duplicate one of those 64 addresses For a BREAKX command without an address value the break in code execution removes the index breakpoint To cancel the ind
80. rol register TIMER timer counter register ISCR interrupt status and control register PDRA port A pull down register PDRB port B pull down register JICSUM D 2 5 MOTOROLA OPERATING THE SIMULATOR 2 2 4 Memory Window MEMORY F3 XX XX XX XX XX XX XX XX o XX XX XX XX XX XX XX XX o XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX o The memory window is below the code window at the right edge of the main screen This window shows current values of 32 consecutive memory locations in hexadecimal and printable ASCII formats To enter this window press the F3 key use arrow Page Up and Page Down keys for scrolling When you are in the debug window you may use the MD or SHOW command to set the window anywhere in memory You can edit values directly when you are in the memory window To do so press the F3 key the grey highlight cursor appears at the first value When you type a new value the cursor automatically advances to the next value To advance to the next value without changing the current value press the gt key 2 2 5 Debug Window DEBUG F10 var iscr var pdra var pdrb F1 Help F2 Stack F4 History F5 Brkpt F6 Count F7 Reg F9 rpt F10 Debug The debug window extends along the bottom of the main screen This is the default window you are in this window automatically when the simulator starts Enter all your commands in this window error messages appear in th
81. rs eere rep eg 3 73 REG SHOW RePISLELS ateliers erg 3 74 REM Add Comment to Script File essere 3 75 RESET Simulate Processor Reset st d cascos tortas eon eos setis diet 3 76 RESET COUNTS Reset Instruction Counterg 3 77 RESETGO Reset and Restart MCU criados 3 78 RUN Begin Program Ex cution obe rabia 3 79 SCRIPT BExeoute Script Pl et Coe sk anas QURE A SUEDE AUR 3 80 SHELL Shell to DOS ii esp e t ete rer Rr E UE EN I RS 3 81 SHOW Display Memoty ie Conte Nee ndo 3 82 SHOWCHIP Open Chip Wmdow cnn rar 3 83 SHOWCODE Display Codes 3 84 SHOWPC Display Code at Plinio RE eg 3 85 SNAPSHOT Save SC GIL ont b edu degen deer 3 86 SOURCE Toggle Code Display rere rese eere EY Rees 3 87 SP Set SP si N 3 88 SS SOUrICe SUCD dd AA was es 3 89 ST Single Step Trac can 3 90 STACK Display Stack mi REENEN EE ES ER 3 9 STEP Simple Step CT ACS oo modas uus ioquit dA RU TED Ia 3 92 STEPFOR Step POTOWB I Oed CENE Lp n otis ig qute x URP qaas ips esp e E aai 3 93 STEPTIE Step Until Location 1 poa S 3 94 SYMBOL Add SIMON 3 95 SYSINFO Show System Information 3 96 T Sime le Step E EE 3 97 UPLOAD SREC Upload S Record nn 3 98 VAR Display Variables TEE 3 99 VER Display Versio lect cuece road dorar cel acia ed cota y or ua 3 100 VERSION Display Vers 100 2 te Ee ert rp EE cea 3 101 WAIT Wait Segel Dd 3 102 WHEREIS Display Symbol Value eorr rr rr EEN 3 103 JICSUM D V MOTOROLA CONTENTS 3 2 ICSO5J1A Commands continued X
82. source window between normal and enlarged An alternative way to toggle the window size is to press the Alt Z keys NOTE The chip visualization window disables zooming Neither the ZOOM command nor the A1t Z hotkey combination has any effect while ICSOSJ1A displays the chip visualization window Syntax ZOOM Example ZOOM Resize the source window JICSUM D 3 107 MOTOROLA SUPPO RT INFORMATION CHAPTER 4 SUPPORT INFORMATION This chapter consists of support information for the M68HC705J1A In Circuit Simulator Kit Paragraph 4 1 is a functional description of the kit Paragraph 4 2 is a quick start troubleshooting guide paragraph 4 3 is a programming troubleshooting guide Paragraph 4 4 contains the kit logic diagram Figure 4 1 4 1 FUNCTIONAL DESCRIPTION The M68HC7OSJICS circuit board contains two separate sections one for JLA emulation and the other for 705J1A programming including VPP generation 4 1 1 Emulation At the heart of the emulation section is an M68HSC705C8A MCU This MCU provides all necessary I O information so that the host computer can carry out emulation That is the computer performs all simulation functions except maintaining port values The C8A MCU runs a program from its internal EPROM to generate appropriate port values and communicate with the host computer When the computer acting as the simulator needs port data the computer sends a data request through the serial port to the CHA MC
83. structions for programming Follow these instructions for installing an MCU into a programming socket selecting programming actions from the pick window and removing the programmed MCU Pick window which lists programming actions To carry out an action you select it from this list Status window which identifies download and upload files When you finish programming MCUs the main screen reappears Syntax PROGRAM Example gt PROGRAM Start the EPROM programmer JICSUM D 3 68 MOTOROLA COMMANDS PRTA Set Port A Output Latches PRTA The PRTA command is an alternative form of the PORTA command NOTE If the JICS circuit board is connected the system sends the n parameter value of this command to the board Syntax PRTA n where n The new value for the port A output register latches JICSUM D 3 69 MOTOROLA COMMANDS PRTB Set Port B Output Latches PRTB The PRTB command is an alternative form of the PORTB command NOTES If the JICS circuit board is connected the system sends the n parameter value of this command to the board Port B consists of six bits the PRTB command ignores the upper two bits of larger values Syntax PRTB n where n The new value for the port B output register latches JICSUM D 3 70 MOTOROLA COMMANDS QUIET Suspend Window Updates QUIET The QUIET command stops updates of values in the memory variable chip visualization and CPU windows during code e
84. t SCRIPT INIT MAC Execute commands in file INIT MAC gt SCRIPT Display names of all MAC files then execute the selected file gt SCRIPT A Display names of all MAC files in drive A then execute the selected file gt SCRIPT Display names of all MAC files in the current directory then execute the selected file JICSUM D 3 80 MOTOROLA COMMANDS SHELL Shell to DOS SHELL The SHELL command shells to DOS in the host computer If the command includes an optional DOS command that DOS command executes immediately To return to the ICSOSJ1A from DOS enter EXIT at the DOS prompt NOTE Be aware of memory limitations when shelling to DOS Entering the SHELL command leaves ICSOSJ1A running This means that shelling to DOS and executing a DOS command could require more memory than you have To check the amount of available memory enter the ICS05J1 A SYSINFO command or the DOS MEM command Syntax SHELL command where command Optional DOS command to be executed immediately Example gt SHELL Access the DOS shell To return to the emulator session type EXIT at the DOS prompt JICSUM D 3 81 MOTOROLA COMMANDS SHOW Display Memory SHOW The SHOW command displays in the memory window the contents of 32 controller memory locations beginning at the specified address If a log file is open this command also writes the first 16 values to the log file The MD command is identical Syntax SHOW address where
85. t addresses is 64 Each BR BREAKA BREAKSP or BREAKX command that includes an address value uses an additional breakpoint address unless the address is a duplicate For example if 64 BR commands already have taken up 64 addresses the only way to include an address value in a BREAKA BREAKSP or BREAKX command is to duplicate one of those 64 addresses For a BREAKA command without an address value the break in code execution removes the accumulator breakpoint To cancel the accumulator breakpoint before the break occurs enter the BREAKA command without any parameter values If you enter the BREAKA command without an address value the accumulator breakpoint does not show in the breakpoint window If you enter the BREAKA command with an address value you may remove the accumulator breakpoint by 1 entering the NOBR command or 2 positioning the cursor on that address in the code window then pressing Alt B 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 Examples gt BREAKA 55 Break execution when the accumulator value equals 55 gt BREAKA Cancel the accumulator breakpoint gt BREAKA 55 400 Break execution at address 400 if accumulator value equals 55 JICSUM D 3 12 MOTOROLA COMMANDS BREAKSP Set Stack Pointer Breakpoint BREAKSP The BREAKSP command sets a stack pointer break
86. te append choice To close the capture file enter this command without any parameter values NOTES The CAPTURE command specifies the locations to be monitored for value changes Closing the capture file deletes the location specification The simulator continues writing to an open capture file You must close the capture file within a reasonable time to prevent the file from growing large The CF and CAPTUREFILE commands are identical If no CAPTURE command has specified locations to be monitored the CF and CAPTUREFILE commands have no effect Syntax CAPTUREFILE filename R A where filename Name of the capture file Examples gt CAPTUREFILE TEST CAP Open capture file TEST CAP gt CAPTUREFILE TEST4 CAP A Open capture file TEST4 CAP append new entries JICSUM D 3 17 MOTOROLA COMMANDS CCR Set Condition Code Register CCR The CCR command sets the condition code register CCR to the specified hexadecimal value NOTE The CCR bit designators are at the lower right of the CPU window The CCR binary pattern is 111HINZC H is half carry I is IRQ interrupt mask N is negative Z is 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 CCR n where n The new hexadecimal value for the CCR Example gt CCR El Assign the value E4 to the CCR This makes the binary pattern 11100100 the N bit set
87. ts current directory If it finds the file the ICSO5J1A uses the color choices of the file otherwise it uses default colors 2 7 SCRIPT FILES A script file is an ASCII text file of simulator commands Although you can use most text editors to create script files it is particularly easy to use RAPID for this purpose In a script file each command must be on its own line Script files can include any of the ICS05J1A commands NOTE Two ICS05J1A commands REM and WAIT are valid only in script files The REM command tells the system to display a comment during source file execution The WAIT command delays execution of a subsequent script file command Chapter 3 includes more information about these two commands If a file named STARTUP OSJ is in the same directory as ICSOSJ1A the simulator treats this file as a script file automatically running the file at startup 2 8 LOG CAPTURE AND HISTORY INFORMATION The ICS05J1A includes three ways to record simulation information for later reference Log files simple ASCII text scratch pad files that the simulator creates if you use the LOGFILE or LF command A log file records entries of commands and copies of debug window responses You may view log files from within RAPID e Capture files files the simulator creates via the CAPTUREFILE or CF command to record state or value changes at memory addresses you specify Use the CAPTURE command to specify addresses to be mon
88. u must use the MACROEND command to close the script file Syntax MACROSTART filename where filename The name of the script file to save commands The filename value need not include the MAC extension The filename value can be a pathname that includes an asterisk wildcard character 1f so the software displays a list of MAC files for your selection Example gt MACROSTART TEST MAC Save debug commands in script file TEST MAC JICSUM D 3 57 MOTOROLA COMMANDS MD Display Memory MD The MD command displays in the memory window the contents of 32 controller memory locations beginning at the specified address If a log file is open this command also writes the first 16 values to the log file The SHOW command is identical Syntax MD address where address The starting memory address for display in the memory window Example gt MD 300 Display the contents of 32 bytes of memory beginning at address 300 JICSUM D 3 58 MOTOROLA COMMANDS MEM Modify Memory MEM The MEM command modifies contents of memory locations beginning at the specified address value The MM command is an alternate form of this command If the MEM command includes optional data values the software assigns those values to successive addresses beginning at the specified address Then the command ends If you do not include any data values the MEM command assigns values interactively A prompt shows the current value at the sp
89. ulator which uses these types of files e Object files files in S19 format produced by CASMS5JIA and other assemblers These files contain the actual code that is simulated You may specify such a file on the command line or load it via the LOAD command e Map files files in map file format which allow symbolic and source level debugging You may specify such a file on the command line or load it via the LOADMAP command e Script files plain ASCII files containing ICSO5J1A commands Paragraph 2 8 gives more information about script files 2 1 STARTING ICS05J1A SOFTWARE To get into the simulator directly follow the instructions of this paragraph To get into the simulator indirectly through the RAPID integrated development environment follow the instructions in the RAPID user s manual At the DOS prompt gt type ICSO5J1A bw filename n b19200 b115200 where bw Optional parameter value for a black and white display filename Optional name of S19 and map files the simulator is to load n Optional serial port number 1 is the default b19200 Optional parameter value for communications at 19200 baud For this parameter value you also must reconfigure jumper header J17 and reset the JICS board per paragraph 1 3 b115200 Optional parameter value for communications at 115200 baud the default Optional parameter value for by passing the opening screen Spaces must separate p
90. unters RESET_COUNTS The RESET COUNTS command resets that is assigns the value 0 to all the instruction counters To set an instruction counter use the COUNTER command To remove an instruction counter use the NOCNT command Syntax RESET_COUNTS Example gt RESET_COUNTS Assign value 0 to all instruction counters JICSUM D 3 77 MOTOROLA COMMANDS R ES ETGO Reset and Restart MCU R ES ETGO The RESETGO command resets the emulation MCU sets the program counter PC to the contents of the reset vector then starts execution from that address Syntax RESETGO Example gt RESETGO Reset the MCU and go JICSUM D 3 78 MOTOROLA COMMANDS RUN Begin Program Execution RUN The RUN command starts execution of code in the simulator beginning at the current program counter PC address or at an optional startaddr address Execution continues until it encounters a breakpoint until it encounters an error or until you press a key If the RUN command includes both startaddr and endaddr values code execution begins at the startaddr address and ends at the endaddr address Like the Go command the RUN command is an optional forms of the G command Syntax RUN startaddr endaddr where startaddr Optional execution starting address If the command does not have a startaddr value execution begins at the current PC value endaddr Optional execution ending address Examples gt RUN Begin code execution at the cur
91. urce code and symbolic disassembly of the memory use the SOURCE command A valid MAP file must be loaded for the SOURCE command to work The code window can display code in another module created via a CASM5JIA INCLUDE directive To see such code press Alt M and choose the appropriate module Note that when ICS05J1A is simulating instructions the code window always shows the module that contains code for the current program counter PC address value You may press Alt B to set a breakpoint in any module not just the module that contains the current PC address value To search for a string in the current module press A1t F enter the target string at the prompt then press Enter To find the next occurrence of the same target string press Alt L 2 2 3 Variables Window VARIABLES F8 PORTA SXX GXXXXXXXX PORTB SXX GXXXXXXXX DDRA 00 00000000 DDRB 00 00000000 TSCR 03 00000011 TIMER 00 00000000 ISCR 80 10000000 00 00000000 00 00000000 The variables window is below the CPU window at the left edge of the main screen This window shows current values in hexadecimal and binary formats for specified byte word or string variables Use the VAR command to add a variable to the variables window At ICSOSJ1A startup the variables window shows values for these register variables PORTA port A data PORTB port B data DDRA port A direction register DDRB port B direction register TSCR timer station cont
92. ut 1 3 1 4 confinguring jumper headers 1 4 1 6 HELP command 2 9 3 38 Help system 2 9 HIDECHIP command 2 7 3 39 History buffer 2 11 capture 2 11 window 2 7 JICSUM D INDEX 2 INDEX MOTOROLA HISTORY command 2 7 2 11 3 40 HISTORYLOG command 2 11 3 41 Hotkeys ICSOSJ1A 2 7 2 8 I command 3 42 ICS05J1A hotkeys 2 7 2 8 starting 2 1 2 2 commands 3 1 3 107 Index breakpoints 3 14 3 62 INFO command 3 43 INPUTA command 3 44 INPUTB command 3 45 INPUTS command 3 46 Instruction breakpoints 3 11 3 62 Instruction counter window 2 7 INT command 3 47 IRQ command 3 48 Jumper headers setting 1 4 1 5 LF command 2 10 3 49 LISTOFF command 3 50 LISTON command 3 51 LOAD command 1 7 1 8 2 1 3 52 LOADMAP command 2 1 3 53 Log files 2 10 LOGFILE command 2 10 3 54 Logic diagram 4 5 4 6 JICSUM D INDEX 3 INDEX MOTOROLA Main screen 2 2 2 7 code window 2 3 2 5 CPU window 2 3 debug window 2 6 memory window 2 6 secondary windows breakpoint 2 7 chip visualization 2 7 color selection 2 7 history 2 7 instruction counter 2 7 register files 2 7 stack 2 7 variables window 2 5 MACRO command 3 55 MACROEND command 3 56 MACROSTART command 3 57 MD command 2 6 3 58 MEM command 2 4 2 9 3 59 Memory window 2 5 2 6 MM command 2 4 2 9 3 60 N command 3 61 NOBR command 3 62 NOCNT command 2 7 3 63 Numbers 2 9 Operating the simu
93. xecution that is while aGO or GOTIL command is under way The default ICSOSJ1A arrangement is for values in these windows to update as code executes But entering the QUIET command before entering a GO or GOTIL command directs the system to replace window values with dashes during code execution significantly increasing code execution speed When code execution ends the final values reappear in the windows Each successive time you execute code dashes again replace the window values Entering the QUIET command a second time restores window value updates as code executes Syntax QUIET Example gt QUIET Suspend window updates during code execution JICSUM D 3 71 MOTOROLA COMMANDS QUIT Exit Program QUIT The QUIT command terminates the host session and returns to DOS or RAPID The EXIT command is identical Syntax QUIT Example gt QUIT Return to DOS or RAPID JICSUM D 3 72 MOTOROLA COMMANDS R Set Up System Registers R The R command starts interactive setup of such system registers as the I O timer and COP Entering this command opens the register files window which initially shows a list of HC05JX register files which are sold separately Selecting a file brings up a display of values and significance for each bit of the register An alternate way to bring up the register files window is to press the F7 key To make this window disappear press F10 or Esc NOTE The R command pertains to
94. zes optional format suffixes H for hexadecimal T for decimal O for octal and Q for binary But you must not use both a prefix and a suffix for a value SOFF 255T OFFH 255 111111110 11111111 Examples gt PC 100 Change PC address value to 100 gt N 1 Assign value 1 to CCR N bit gt BR 205 Set breakpoint at address 205 gt BR END Set breakpoint at address of symbol END JICSUM D 2 9 MOTOROLA OPERATING THE SIMULATOR 2 6 COLORS You may select colors for all elements of ICSOSJIA displays To do so enter the COLORS command This command brings up the color selection window amatrix of foreground background color combinations and a list of screen elements Matrix rows correspond to background colors matrix columns correspond to foreground colors each color combination has a two digit hexadecimal code When the window appears the first screen element is highlighted Work your way down the list of screen elements by entering the code for the color combination you want for the element then pressing Enter To retain the current color combination press Enter without entering a new code As the software accepts your entry it highlights the next screen element To leave the color selection window without saving any new color combinations pressEsc When you press Enter for the final screen element the ICSOSJ1A saves the new set of colors in file ICS05J CFG As part of startup the simulator looks for this file in i

Download Pdf Manuals

image

Related Search

Related Contents

vorgehensweise  Eclipse HX EHX Software User Guide - Clear-Com  Servicio de búsqueda PATENTSCOPE Guía del usuario      Manuel d`utilisation de VMX Studio 2  WASCHEN UND TROCKNEN 2015  USB 2.0 TO HDMI VIDEO ADAPTER Quick Installation Guide  取扱説明書ダウンロード(PDF)  

Copyright © All rights reserved.
Failed to retrieve file