Home

M68ICS08GP

image

Contents

1. VDD NN 1 25V REFERENCE FOR 8 5V VIST SPGMRO8 CONNECTORS 9 o 1 U5 ES a 37 al 11552 E 5 E amp E E Es E SPGMRO8 NA gt C 4 V V HCO4A o d o 4 i m E E 1 a GND VCC 14 GND 7 s s E s o s S S GND 2 SP 08 E a E 4 a E E Oscl 3 8T VPP STF e F RESET 4 SP_RST GND 2 COMPARE COMPARE NZ Ne 8 PTA lt 0 gt VDD PAO 9 VSW OUT GND VSW_OUT 10 D vcc_s 4 7 J8 sl E SPGMROS adre a ls oes 1 GND BT ome A SS OSC s v VIS 9 5 e osc1 ERI C pe _SP_OSC 4c4a lt V 256 CYCLE DELAY FOR RISING EDGE OF RST_OUT E ex qee m 4 SP RST 4 9152 MHZ GND RESET 5 tex OUT EN GND k DEL_RST COMSARE 6 COMPARE 1 AUD DEG 8 PTA 0 S Rd SW VV VSW_OUT is SERCO 8 5V GND Vcc S e e 0sc1 4c4 gt 1 1 d SP RST Y d al e E PTC lt O 6 gt lt p 3D4 lt gt 4D4 lt gt n a VOR e pao gt 3D4 lt gt 4D4 lt gt oO E UA IRQ VDD b E TUM J gt MAX39 v Pas V dd o Md 1 D g2 39 GND rL BS170 IRQ LOCKOUT O 3 DEL_RST 1 m bud IN4 20 o TGT_PTA lt 7 gt 2 No1 i Noa 19 a U6 gt PTA lt T gt 3 comi li v coma 18 y HC02A 4 Nel a weal 17 VDD VDD Tis VDD 71 14 eq 3 i 8 13 PTC lt 3 gt LE gt 9 12
2. EAST UNUSED USED C9 CR1 J8 Q2 R7 U7 D W3 XU3 C ra o 3 Qo Tace n E N H H N Co ai A UNIT CROSS REFERENCE SIZE GEDTTL SCH 1 IBESWINS NO REV A GEDABV SCH 1 63ASE2 1 123W C LAST_MODIFIED Fri Sep 18 11 11 26 1998 SHEET 6 OF 6 2 1 Technical Reference and Troubleshooting Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 376 Technical Reference and Troubleshooting MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator Glossary 8 bit MCU A microcontroller whose data is communicated over a data bus made up of eight separate data conductors Members of the M68HC08 Family of microcontrollers are 8 bit MCUs A Abbreviation for the accumulator of the M68HC08 MCU accumulator An 8 bit register of the M68HCO08 CPU The contents of this register may be used as an operand of an arithmetic or logical instruction assembler Software program that translates source code mnemonics into opcodes that can then be loaded into the memory of a microcontroller assembly language Instruction mnemonics and assembler directives that are meaningful to programmers and can be translated into an object code program that a microcontroller understands The CPU uses opcodes and binary numbers to specify the operations that make up a computer program Humans use assembly language mnemo
3. es 66 is cos eceskeies AE ER RARE ER RASA EERTE RAER EO AES 117 YPES bete ded pod RPRERRIMM RET EA e eS ee see Seeesee eee 74 conditional assembly iss ox ees rh YR RE ERAT EE EE ds 102 configuration JUMPERS usse tarea eb E tice dese a beh due so dis dou dos td e 36 configuring external programs in WinIDE 0000005 74 Confirm command line lee TT 79 COP tea ida TET 65 counting coli IPR O on 132 CPU o o A 130 SUIS SSA 132 Create BackUp inc vos pie e a 724 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 386 Index MOTOROLA Index creating new file NV AUD rm 60 SCHIP TIES o surse goa e a seeds haad dd s eee tees CR eio 117 BOUNCES A R E nE RENTE AA N EE EATE oA 63 Currently edited filename ceremonia 70 customizing BDVIFODITIeNES 4 2 occ es kG esrReRRARRELEE RANG RERTRSER DEA A cycles cnni F P ru a 100 e dl A TL o 105 cen MCN Un In 132 C vele Add r a ea hee ex alae ee ud ee aca M en 100 Cycle Cnt ie ieckribee ka epa a Ub eR PET RA ERE RR bia 105 CYCLES command 42 22 cies bude RC ORE NO dn p e ea 223 field in listing flle cuco rr E RE RR eRe Gee ERG 96 including information in list file llle esses 22 CYCLES command eee n 221 223 D DASM command AS 224 DDRA command o uoc esta a m a tp eae qua ere nS tg d 225 DDRB COMA Reed E ed aves RO aUe 226 229 DDRC Command 2 oam pu dp e e p cb E
4. 172 Operator s Manual MOTOROLA Table of Contents 11 Table of Contents 9 4 95 9 3 1 9 5 1 1 9 3 1 2 95 2 9 5 2 1 95 442 y 95 24 9 5 32 9 5 4 9 5 4 1 9 5 4 2 y de Be 9 5 6 9 5 6 1 9 5 6 2 9 6 9 6 1 9 6 2 9 6 3 10 1 10 2 Operator s Manual Startup and Parameters User Interface Status Window Pop Up Menu Keystrokes Code Window Pop Up Menu Keystrokes Variables Window Pop Up Menu Keystrokes Memory Window Pop Up Memi PPP Keystrokes Colors Window CPU08 Window Pop Up Menu Keystrokes Debugging Commands Syntax and Nomenclature 22244224 2454443 EA ERR YA Command Recall Command Set Summary Section 10 Debugging Command Set A WEN CES RPTAEERAEREPEE A RE E WERE PESE Command Descrip sestao riese raro SER A or ACC Set Accumulator Valle 2 6 44 42442404405 ADCLR Clear A D Input Buffer 2 22222 asee ede nays ADDI Input Data to A D Conyerter 1 esses ASCIIF3 and ASCIIF6 Toggle ASCII Display ASM Assemble Instructions 2 soos ehe cna BELL 000 A BF or FILL Block Fill Memory Lansesscsiaseveseuaves BR Set Instruction Breakpoint BREAKA Set Accumulator Breakpoint M68ICSO8GP In Circuit Simulator Rev 1 0 12 Table of Contents MOTOROLA Table of Contents BREAKHX Set HX Register Breakpoint 208 BREAKSP oet Stack Pointer Breakpoint i i oce ees 210 C SeUt lear Carry Bit 1u2
5. 4 119 6 2 ICSO8GPW Windows Default Positions 120 6 3 Code Window 2 in Disassembly Mode with Breakpoint TOSSlul cada zer RE E EE EHE AERE EP ER 121 64 Code Window Shortcut Menu icssao eR RR RRESERE ARES 121 6 5 Window Base Address Dialog Window 4 122 6 6 Variables Window with Shortcut Menu 124 6 7 Add Variable Dialog Window elles 125 6 8 Memory Window with Shortcut Menu 000 127 GO Staus Window AMA 128 6 10 Results of Entering the LF Command in the Status Window 129 6 11 Specify Output LOG File Dialog Window 129 6 12 Logfile Already Exists Window 22 4 404444 24e5i4604 04 ed 130 6 13 CPUOS Window with Shortcut Menu ies ce eco e E RR R9 131 6 14 Change CCR Dialog Window Lead chase heed dy sew seen CARA 131 6 15 Cycles WOW sci pice dee odessa i Gen AAA RAR ERO od 132 AA 133 Bl Te WI sr A 134 6 18 Breakpoint Window with Shortcut Menu o oo ooo oomoo o 135 6 19 Edit Breakpoint Dialog Window o oo ooocoorcoocoomoo 136 6 20 Register Block Window cases es ria 138 6 21 Register Files Window lt coscinircricnraidr ida AAA 139 6217 Register WINDOW 262i aae ie oee dine dens bes SEE Rd E ede 139 63 ILSUSGPW Toolbar accord AAA 140 M68ICSO8GP In Circuit Simulator Rev 1 0 20 List of Figures MOTOROLA List of Figures Figure Title Page 6 24 ICSOSGPW File Menu 26 442sskicw d
6. 0 0 ccc eee 213 CAPTUREFILE command 0 0 0 214 CASMOSW assembler comments 0 0 0 0 ccc cee eee eee nes 99 assembler directives 0 0 0 0 ccc ee eens 99 assembler options 0 0 0 0 0 eee eee eee 98 324 assembler Daranmelers iau sa epe xS ERA RR Hee RARE RA EP 94 conditional assembly 5 5 sodes reg erkae ar RRRSER TREE TE 102 aveo 55 6 caked A OEE EE A 100 OSSCHIDUDILes 5 9 edet v x vore Gabe quic edi M d a ep CR deo 42 92 115 enVIrohiDent oce bv lied FY doe ee A ae s ee ae 324 Oresa NCS o d ipd acque dopo oed ded ee eae d n eae ds aa 109 TIS 533 E UEM ES O RE 44 uil AA eea Ge a eaa r Etnia 53 INCLUDE directive 0 000 eens 102 Installing oe oie oie cuenca ERE Rie RE RERO RR PS b e REA RR d 44 MACRO directive 0 0 0 e ee 103 TOA CEOS eese iio rd ae 104 shed A o IS 116 sns surta ii Es eee eee 42 95 PSEUDO DDSrallOllss cars A A 107 QUICK Sais boro terrano re pts does 33 Sample project s inaru ka ikaesReRe mech ERRARE ERR EE E RC ERR 323 SU DSU uuu Sa eq RR RN RP eos AUR Pu 42 97 111 toolbar buttons ooooooooorr Ies 23 USEF interfaCe oos Pod RP ERO ARG C PSI RP T AOI PTS de 93 Window MT 93 327 CC value cet bee e eub toe eh a ES 105 CCR commanders ou ooslues op Ere a Bh P Ed dapibu 215 AN 214 CGMXCLK command 0 0 0 n 216 changes hri PPP POETE 125 CPU information llle RR es 130 ICSIOHHS pereue aE M a Sale ea ole pod Mu Gone UR elt i ees 64 LE
7. Command Description SPFREQ Set input clock for SPI slave SS Step through a specified number of source code instructions starting at the current PC address value then halt Step through a specified number of assembly instructions ST starting at the current PC address value then halt identical to the STEP and T commands Open the HC08 Stack window showing the stack pointer value STACK data stored on the stack and the results of RTS or RTI instruction STATUS Display the contents of the CPU registers in the Status window identical to the REG commana Step through a specified number of assembly instructions STEP starting at the current program counter address value then halt identical to the ST and T commands Execute instructions continuously one at a time starting at the STEPFOR current PC address and continuing until an error condition breakpoint or keypress occurs SOURCEPATH Determine the path for source code that is not in the current working directory Step through instructions starting at current PC address and STEPTIL continue until PC value reaches the specified address or until keypress breakpoint or error occurs SYMBOL View current symbols or create new symbols Step through a specified number of assembly instructions T starting at the current PC address then halt identical to the ST and STEP commands TRACE Toggle tracing UPLOAD SREC Upload the content of the specified memory block
8. 266 Display Memory at Address 267 Display Memory Window 2 at Address 268 Modify Memory liess eesss eas E ER RAYS 269 Remove Breakpomts 2026 640eeaseccus 272 tear MAP Pido cares eS PES PLE EORR 273 Clear User Symbols ia2ocdasa 49e 4m es 274 Set Program Counter sc nos Gees pha E sams 275 Change Sarl PGW A A 276 Set Port A Output Latches 211 Set Port B Output Latches 278 Set Port C Output Latches iiis oesteus s ses 279 Set Port D Output Latches 2 2 2222 280 Set Port E Output Lane cocino 281 Toggle Window Refresh socio rh 282 Use Register Piles 22224422924 Ara 283 Show Reise 252564 cedecocenedabocces 284 Place Comment in Batch Macro File 285 Simulate Processor Reset 4 460sseea04 286 Reset and Restart MCU rtorras 287 Clear SCL DLEBHUOIS a bt ca veketeesetendis 288 M68ICSO8GP In Circuit Simulator Rev 1 0 14 Table of Contents MOTOROLA Table of Contents SCDI Input SOL Dalits 6i604c0020e0d ERE RO I deis 289 SCDO View SCI DUIDUIS uso iesusex ARA ws 290 SAVEDESK Save Desktop Settings i e azsesas eis 291 SHOWBREAKS Display Breakpoint Window 292 SHOWCODE Display Code at Address 2 2 2 cese 293 SHOWMAP Show Information in Map File 294 SHOWPC Display Code at PC Address 295 SHOWTRACE Display Trace Window 296 SIMOS Switch Simulation Mode 297 SNAPSHOT Save Window Data to Logfil
9. MOTOROLA Software Installation and Initialization 43 Software Installation and Initialization 3 4 Installing the ICS08GP Software The ICSO8GP software is supplied on three 3 5 inch diskettes Diskette 1 contains a setup program that automatically installs the software into the host PC s hard drive 3 4 1 Installation Steps To install the software on the host computer s hard drive follow these steps 1 Insert diskette 1 into the 3 5 inch disk drive For Windows 95 From the Start menu select the Run option 2 Inthe Run dialog enter Setup or click the BROWSE button to select a different drive and or directory and press OK 3 In the ICSO8GP setup wizard follow the instructions appearing on the screen Table 3 1 lists the files and directories required to control the ICSO8GP program modules Table 3 1 ICS08GP Software Files Directory Filename Description CASMO08W EXE Windows cross assembler for 68HC08 sd CASMO08W HLP Help for CASMO8W ICDO8SW EXE Windows in circuit debugger d ICDO8SW HLP Help for ICDO8SW ICSO8GPW EXE Windows in circuit simulator dopo ICSO8GPW HLP Help for ICS08GPW PROGO8SW EXE Windows FLASH programmer PROG08SW BROGOsSWHLP Help for PROGO8SW WINIDE EXE Windows integrated development WINIDE environment WinIDE WINIDE HLP Help for WinIDE Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 44 Software Installation and Initialization MOTOROLA Software Ins
10. 0 0 e eee III 67 direct addressing moles coon Se seen Sees b REERRRA PEE REP 108 WOON s oe dx Ex A suh airs atu aee tii s ae 82 distribution medid 2icszena sek era a 44 GOVE SPACE A Pe 27 DUMP command osuere ice poe y dr to owe eine e S pos 230 E editing breakpoints 15 2 faze tin Soret idi hex bad A eek I37 optiuns WINIDEB oes ux RORIS ER REN REO eee x rax 63 71 SQUESS THES uod dep acri PEOR UA SPECIAL de ORG dr cota LU bn 63 WOM neko bee akesidbasadadukpRmraqqe ido am que A qepxe dd 42 editor sicca FR PTT P 42 files E pA Bere PED PUETTTEIT 70 ster PRETI 71 options WIDE 2i uat RR RR IRR a RES RAEdd RE Reads 63 environment GU A iia aa M GUSEOTU ATIS usu ex Geers este eater ndeewee estes see E Dee ERE 32 Environment Menu 0 0 0 32 67 sop CP IET 66 Path eomer a a A A E S 74 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 388 Index MOTOROLA Index pr unu hoe Ri eu eres deca her beer nes ponerse chosen es 66 67 it s osse osa ape RR RAS ERPRORREENT EE RA een ee one gees 66 EQU nmm 108 eg t UICC VB oL oa pa OO e ds FRAME E dap E Rad ER 108 errors Mes cutee CRT ae oo hee Oval a hee ee wate Ova See ee os 78 97 FOMA MER TT messages assembler cic xus bee px E RR UR ERA E RE EY du 109 OUI PUL batch Be ouo eoe opa sm ee ced oes Sung Proto db 78 EVAL command i22 eM ru RR HER RR ES REDE AUR SE OSES 231 examples changing number format es
11. Labels within macros must not exceed 10 characters in length Examples abel ThisIsALabel espa This_label_is_much_too_long The assembler would truncate the last example to 16 characters 5 9 Pseudo Operations The CASMOSW assembler also allows pseudo operations in place of opcode mnemonics which are summarized in Table 5 5 Table 5 5 Pseudo Operations Allowed by the CASMO8W Pseudo Op Code Action equ Associates a binary value with a label Iob Defines byte storage where m label number or string Strings Se generate ASCII code for multiple bytes number and label dim parameters receive single bytes Separate multiple parameters with commas fdb n Defines word storage where n label number or string Two or bytes are generated for each number or label dwn Separate multiple parameters with commas oran Sets the origin to the value of the number or label n No forward 9 references of n are allowed rmb n ar Defines storage reserving n bytes where n number or label den No forward references of n are allowed M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO8W Assembler Interface 107 CASMO8W Assembler Interface 5 9 1 Equate EQU The equate directive associates a binary value with a label The value may be either an 8 bit value or a 16 bit address value This directive does not generate any object code During the assembly process the a
12. No connection 36 NC No connection 37 No connection 38 GND GND Flex cable shield ground 39 NC No connection 40 GND Flex cable shield ground M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 361 Technical Reference and Troubleshooting Table B 4 SPGMR Connectors J7 and J8 Pin No Schematic NET Direction Signal Description 1 GND System ground 2 SP OSC In Output of SPGMRO8 4 9152 MHz oscillator 3 VTST Switched variable voltage power supply output from SPGMROS 8 5 Vdc 4 SP RST In Reset signal from SPGMRO08 5 GND System ground 6 COMPARE Analog Input to SPGMROS variable switching power supply regulation circuit 7 NC No connection 8 PTA lt 0 gt Bidirectional SPGMRO08 host communication line to from MCU sockets MONDOS connector No connection to target cable connectors 9 VSW_OUT Analog Un switched variable voltage power supply output from SPGMRO08 10 VDD Switched 5 Vdc system power from SPGMRO08 Table B 5 Auxiliary Port C Logic Analyzer Connector J1 Table B 6 Auxiliary Port D Logic Analyzer Connector J5 Pin No MCU Mnemonic Schematic NET Dir Signal Description 1 PTD6 T2CHO PTD lt 6 gt Bidirectional Port D I O bit 6 timer1 2 channel 0 2 PTD7 T2CH1 PTD lt 7 gt Bidirectional Port D I O bit 7 timer 2 channel 1 O
13. Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 255 Debugging Command Set LOADDESK Load Desktop Settings The LOADDESK command loads the debugger window desktop settings for window position size and visibility allowing a choice of how to set up the windows for the project This command executes automatically whenever the debugger is started Use the SAVEDESK command to save the debugger window settings to the desktop file Syntax LOADDESK Use with ICS08GPW and ICDOSSW Example LOADDESK Get window settings from desktop file Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 256 Debugging Command Set MOTOROLA Load Map File Debugging Command Set Command Descriptions LOADMAP The LOADMAP command loads into the debugger a map file that contains source level debug information Entering this command without a filename parameter brings up a list of MAP files in the current directory From this a file can be selected directly for loading map file information This command does not load an object file It is useful in ICDO8SW when the object file has been previously programmed into FLASH memory Syntax LOA DMAP filename Where Use with ICS08GPW and ICDOSSW Examples LOAI LOAI LOAI LOAI lt filename gt DMAP PROG MAP DMAP PROG1 DMAP A DMAP M68ICS08GP In Circuit Simulator Rev 1 0 The name of a map fil
14. ICSO8GPW In Circuit Simulator User Interface Breakpoint Window 6 14 2 Editing a Breakpoint To edit a breakpoint or view address information double click on any empty breakpoint slot in the Breakpoint window listbox The Edit Breakpoint dialog window Figure 6 19 displays address information for the empty breakpoint slot Enter the appropriate address and other conditional qualifiers and press the OK button to exit In the Breakpoint window select the breakpoint to edit Then use one of the following methods to open the Breakpoint Shortcut menu and edit the breakpoint e Click the right mouse button to open the Breakpoint Shortcut menu and select the Edit Breakpoint menu option e Press the INSERT key e Double click on the breakpoint in the listbox In the Edit Breakpoint dialog window enter the new breakpoint address and conditional qualifiers Press the OK button to close the dialog and store the new settings or press the CANCEL button to close the dialog without saving new settings 6 14 3 Deleting a Breakpoint In the Breakpoint window choose the breakpoint to delete and use one of these methods to delete the breakpoint e Click the right mouse button to open the Breakpoint Shortcut menu and select the Delete Breakpoint menu option Press the DELETE key to remove the selected breakpoint from the breakpoint list Press the OK button to close the Breakpoint window and store the changes or press CANCEL to close the w
15. Reversible actions are local to each source window Commands that are not reversible do not contribute to the undo stack The user cannot for example undo the command to open a new window using the UNDO command Alternatives Type CTRL Z This is the keyboard equivalent to selecting the Edit Undo menu option M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 63 WinIDE User Interface 4 11 2 Redo 4 11 3 Cut NOTE NOTE Operator s Manual Choose Redo to restore the most recently undone action in the active window The Redo option restores actions undone or reversed by the Undo option in ascending order that is last action first Reversible changes to the window s contents accumulate in the window s undo stack Once a change has been reversed using the Undo option the change can be reversed using the Redo option When no more changes remain that is the top of the redo stack is reached the Redo option is disabled Some commands are not reversible They do not contribute to the undo stack and therefore cannot be redone For instance since reversible actions are local to each source window opening a new window is an action that cannot be undone using the UNDO command or redone using the REDO command The Redo option is active only if the Undo option has been used to modify the contents of the active source window Alternative Type SHIFT CTRL Z This is the key
16. A A eee ess eee E EE 143 EL A A A 144 MIL Relacion ir 144 GS O AM A III 145 A Record o rrr 145 Ou SE opo oo rU 146 GU APELADA ER ERI SERA 146 0197 o E AA 148 A o III 148 6 20 ICSUSGPM Execute Options ss 6 025405 RES RARE TRES 148 OUl e O so kk chek ado v ih i edid dee de esee qu bp rid 149 E A 149 620 3 Wipe Step ss 00 ER CST REEEATETYEREPCEC TERRE RETE RES 149 err so cm 149 E A 150 6406 Repo Comba 566216625 escaewesGes sees eu rinra 150 6 21 ICSO8GPW Window Oplions 220 02sec eere 150 6 21 1 AE foo PP 151 6714 Change Colors 244466045 EREREAG HERR ARA A 151 62135 Relaad Desktop 26216020644 065t565 ras 187 A Sme i oh OR HERI RIEN HEC SEDICA PR EGRE FROM 152 M68ICSO8GP In Circuit Simulator Rev 1 0 114 ICSO8GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Introduction 6 2 Introduction This section describes the in circuit simulator user interface toolbar buttons windows subwindows messages and menu options 6 3 ICS08GPW Description The ICSO8GPW in circuit simulator software is the debugging component of a complete development environment when used in conjunction with the WinIDE editing environment the CASMOS8W command line assembler the PROGO8SW FLASH memory programmer and the ICDO8SW in circuit debugger With this package designers can create source code assemble the code debug the code and program 68HC908GP20 devices The
17. Example PORTB 03 Set the port B output latches to 03 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 278 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Port C Output Latches PORTC or PRTC NOTE Ifthe M68ICSOSGP20 hardware pod is connected the system sends the n parameter value of this command to the board Syntax PORTC lt n gt Where n The new value for the port C output latches Use with ICSO8GPW only Example PORTC 03 Set the port C output latches to 03 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual The PORTC command assigns the specified value to the port C output register latches The PRTC command is an alternate form of the PORTC command MOTOROLA Debugging Command Set 279 Debugging Command Set PORTD or PRTD Set Port D Output Latches The PORTD command assigns the specified value to the port D output register latches The PRTD command is an alternate form of the PORTD command NOTE Ifthe M68ICSOSGP20 hardware pod is connected the system sends the n parameter value of this command to the board Syntax PORTD n Where n The new value for the port D output latches Use with CSO8GPW only Example PORTD 03 Set the port D output latches to 03 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 280 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Port E Output
18. Figure 1 5 MC68HC908GP Security Dialog Window Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 34 Introduction MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator 2 1 Contents 2 2 Overview ESD CAUTION Section 2 Hardware Installation 2d doro oa oss 5 4 E eS cn 35 2 3 Configuring the In Circuit Simulator Board 36 24 Assembling the Hardware Pod ccoo oo o o s Es 23 Connecting toa TESSA RARA 38 This chapter explains how to e Configure the ICSOSGP20 in circuit simulator board e Assemble the ICSO8GP20 board and the M68HC08 serial programmer SPGMR to form the hardware pod and connect the pod to a host PC Connect the pod to a target system In interactive mode the pod is connected to the serial port of a host PC The actual inputs and outputs of a target system can be used during simulation of source code In stand alone mode the pod is not connected to the PC The ICSOSGPW software can be used as a stand alone simulator Ordinary amounts of static electricity from clothing or the work environment can damage or degrade electronic devices and equipment For example the electronic components installed on printed circuit boards are extremely sensitive to electrostatic discharge ESD Wear a grounding wrist strap whenever handling any printed circuit board This strap provides a conductive path for safely discharging static electricity t
19. PTA7 must be held low for at least 24 bus cycles after RST goes high The counter circuit comprised of U5 U6 and U7 keeps the PTA7 pin near 0 V for 256 OSCI clock cycles This corresponds to 64 bus cycles Using a dual trace oscilloscope trigger channel 1 on the rising edge of RST XUI pin 6 or XU3 pin 1 and read PTA7 XUI pin 40 or XU3 pin 39 with channel 2 Verify that PTA7 is held low for at least 256 OSCI clock cycles about 52 us at 4 9152 MHz PTA7 is reconnected to the target connector pins when this delay expires d Either RST or IRQ must remain at 8 5 Vdc to hold the MCU in monitor mode The ICSOSGP20 board has an interrupt lockout feature to keep IRQ at 8 5 Vdc when the RST or RST IN signal is asserted low and keep it at 8 5 Vdc for at least 256 OSCI clock cycles after RST goes high The TGT_IRQ signal is allowed to control the signal when RST is not asserted and the delay has expired M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 349 Technical Reference and Troubleshooting 8 Make sure that external circuitry does not interfere with the monitor mode communications When connecting external circuitry to the ICSO8GP20 board use only the target system connectors J2 J3 and J4 This ensures that the target system will not interfere with the communications and setup of the MCU s monitor mode by allowing the pod to disconnect some target system compo
20. PTE lt 1 gt 16 PTE1 RXD PTB AD 7 35 PTB 7 PTB AD lt 6 gt 34 PTB lt 6 gt tal PTD 0 18 prpo ss PTB AD lt 5 gt 33 PTB lt 5 gt ex PTD 1 PTD1 MISO PTB AD lt 4 gt 32 PTB lt 4 gt re PTD lt 2 gt 20 prp2 Mos PTB AD lt 3 gt 31 PTB 3 OZ PTD lt 3 gt 21 ptp3 sp PTB AD lt 2 gt 30 PTB lt 2 gt ES PTB AD lt 1 gt 29 PTB lt 1 gt E PTC lt 6 gt 14 prc lt 6 gt PTB AD lt 0 gt 28 PTB lt 0 gt Co m PTC lt 5 gt 13 prc lt s gt 6 PTC 4 12 KBpe7 1 PTA lt T gt D PTC 3 11 kBpeg 44 PTA lt 6 gt T PTC lt 2 gt 10 kBpe5 43 PTA 5 Ca PTC lt 1 gt 9 kBD 4 42 PTA 4 PTC lt 0 gt 8 kBD 3 41 PTA lt 3 gt E KBp 2 40 PTA lt 2 gt 37 PTA KB 39 PTA 1 N 3 TA KBD lt 0 gt 38 PTA lt 0 gt PTA KBD lt 0 pa QFP AND PLCC ONLY rn V N GND VDD E w ul 40 PIN DIP 68HC908_SOCKET b 20 VDDAD V pTEO txp 12 PTE lt 0 gt IRQ 14 A IRQ vPP OSC2 41 osc2 PID5 Ticu1 22 PTD lt 5 gt OSCI 5 osci prp4 ticuo 31 PTD lt 4 gt CGMXFC CGMXFC RST 6 nsr PTB AD lt 7 gt 30 PTB 7 M PTB AD lt 6 gt 29 PTB lt 6 gt PTE lt 1 gt 13 PTE1 RXD P AD lt 5 gt 28 PTB lt 5 gt PTB AD 4 27 PTB lt 4 gt 0 7 PTD 0 15 prpo ss PTB AD lt 3 gt PTB lt 3 gt z PTD lt 1 gt 16 PTD1 MISO PTB AD lt 2 gt PTB lt 2 gt As PTD lt 2 gt 17 prp2 Most PTRB AD lt 1 gt 24 PTB lt 1 gt PTD lt 3 gt 18 prp3 spscx PrB Ap 0 23 PTB lt 0 gt PTC lt 4 gt 11 pre lt a gt KBD lt 7
21. SIM08 Switch from in circuit simulation to stand alone simulation M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 297 Debugging Command Set SNAPSHOT Save Window Data to Logfile The SNAPSHOT command sends textual information about the debugger windows to the open logfile If no logfile is open the command has no effect This command is useful for documentation and testing Syntax SNAPSHOT Use with ICS08GPW and ICDOSSW Example LOGFILE SNAPSHOT Opens a logfile named SNAPSHOT LOG and stores all information that appears in the Status window SNAPSHOT Takes a snapshot of all open windows and stores it in the file SNAPSHOT LOG LF Close the SNAPSHOT LOG file The SNAPSHOT LOG file can now be opened with any text editor Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 298 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Path for Source Code SOURCEPATH The SOURCEPATH command sets the default path for source code that is not in the current directory Syntax SOURCEPATH lt pathname gt Where lt pathname gt The full path and filename of the source file Use with CDO8SW only Example SOURCEPATH d mysource myfile asm M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 299 Debugging Command Set SP Set Stack Pointer The SP command assigns the
22. Value is inconsistent with current default base binary octal decimal or hexadecimal The opcode on the highlighted line is wrong A label in the macro has 11 or more characters The macro did not receive sufficient parameter values The assembler ran out of system memory Operand field of the highlighted line has an invalid number representation Or the parameter value evaluates to a number too large for memory space allocated to the command Corrective Action Declare the variable using the SET or SETNOT directive Change the label to one not used already Make sure there is sufficient disk space Make sure that the CONFIG SYS file lets multiple files be open at the same time see DOS or Windows manual for commands Make sure there is sufficient disk space Make sure the CONFIG SYS file allows multiple files be open at the same time see DOS or Windows manual for commands Nest includes no more than 10 levels deep Make sure that quotes enclose the file name to be included if necessary specify the full path name as well Use a qualifier prefix or suffix for the value or change the default base Correct the opcode Change the label to have no more than 10 characters Send sufficient parameter values to the macro Create a file that consists only of an INCLUDE directive which specifies the primary file Assembling this file leaves the maximum memory available to the assembler
23. optional Start memory modify at address 90 Assign value 00 to address 300 Assign values 00 11 to bytes 100 103 Place long value 123456 at address 200 M68ICSO8GP In Circuit Simulator Rev 1 0 270 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Clear Negative Bit N The N command sets or clears the N bit of the condition code register CCR NOTE The CCR bit designators are in the lower portion of the CPU window The CCR pattern is VI IHINZC V is overflow 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 N 0 1 Use with ICS08GPW and ICDOSSW Example WN 1 Set the N bit of the CCR N 0 Clear the N bit of the CCR M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 271 Debugging Command Set NOBR Remove Breakpoints The NOBR command removes one or all active breakpoints If this command is entered with an address value it removes the breakpoint at that address Without the address parameter it removes all current breakpoints To set breakpoints use the BR command An alternative way for clearing a breakpoint in the Code window is to position the cursor on a line of code click the left mouse button to select the line then press the right mous
24. range in 19 file format display the contents in the Status window and enter information into the current logfile V Set or clear the V bit in the condition code register CCR VAR Display specified address and contents in the Variables window for viewing during code execution VERIFY Compare the contents of program memory with an S record file VERSION Display program version and date VER WAIT Delay simulator command execution by a specified number of cycles M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual Debugging with ICS08GPW 161 Debugging with ICSO8GPW Table 7 2 ICS08GPW Command Overview Sheet 7 of 7 Operator s Manual Command Description WHEREIS Display value of the specified symbol X Set the X register to the specified value and display in the CPU XREG window Z Toggle the Z bit in the CCR M68ICSO8GP In Circuit Simulator Rev 1 0 162 Debugging with ICS08GPW MOTOROLA User s Manual M681CS08GP In Circuit Simulator 8 1 Contents 8 2 oco ol oiii NP A 164 8 3 Star amd PARIS 1433 Ax AA AA bos e 165 8 4 Programming Comitem 0019 vk er E itet r adir 166 8 4 1 BM Blank Check Module 0 0000 eee 166 8 4 2 CM Choose Module NP au p OPERA VR VERA S3 YVREVN 166 8 4 3 EM Prase Module Laus ous hat ead q Eque ik eod pue d 167 8 4 4 FB Program Bless corra AERA de ERE da den 167 8 4 5 PM P
25. 0 Operator s Manual MOTOROLA Debugging Command Set 309 Debugging Command Set STEPTIL Step Until Address The STEPTIL command continuously steps through instructions beginning at the current program counter PC address until the PC value reaches the specified address Execution continues to the specified address or until a key or the STOP button on the debugger s toolbar is pressed or it reaches a breakpoint or until an error occurs Syntax STEPTIL address Where address Execution stop address This must be an instruction address Use with ICS08GPW and ICDOSSW Example STEPTIL 0200 Execute instructions continuously until PC value is 0200 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 310 Debugging Command Set MOTOROLA Add Symbol Syntax Use with Examples Debugging Command Set Command Descriptions SYMBOL The SYMBOL command creates a new symbol which can be used anywhere in the debugger in place of the symbol value If this command is entered with no parameters it will list the current user defined symbols If parameters are specified the SYMBOL command will create a new symbol The symbol label is case insensitive and has a maximum length of 16T It can be used with the ASM and MM commands and replaces all addresses in the Code when displaying disassembly and Variables windows SYMBOL lt label gt lt value gt Where lt label gt
26. 178 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger User Interface e Set Base Address This option allows the Code window to look at different locations in the user s code or anywhere in the memory map The user will be prompted to enter an address or label to set the Code window s base address This address will be shown as the top line in the Code window This option is equivalent to the SHOWCODE command Set Base Address to PC This option points the Code window to look at the address where the program counter PC is This address will be shown as the top line in the Code window Select Source Module This option is enabled if a source level map file is currently loaded and the windows mode is set to source disassembly Selecting this option pops up a list of all the map file s source filenames and allows the user to select one This file is then loaded into the Code window for the user to view Show Disassembly or Show Source Disassembly This option controls how the Code window displays code to the user The show disassembly mode always shows disassembled code regardless of whether a source file is loaded The show source disassembly mode shows source code if source code is loaded and the current PC points to a valid line within the source code Otherwise disassembly is shown Help Displays help for this topic 9 5 2 2 Keystrokes These keystrokes are valid while the Code window is the
27. 3 From the command line by using the Windows 95 or later version Program Item Property dialog Refer to the Windows documentation for information on this procedure The following optional parameters may be entered in any order To specify multiple parameters separate them with spaces com n Chooses the serial port where n is a value between 1 and 8 running Starts the ICD with the CPU running Sometimes it is desirable to leave the CPU running and exit the ICD debug software To do this use the GOEXIT command To re enter the ICD debug software use the option RUNNING as a parameter on the startup command line This option causes the debugger NOT to do a RESET at startup and to ignore any STARTUP ICD macro file To use this option the CPU must have been previously left exe cuting by the debugger quiet Starts the ICD without filling the memory windows and the dis assembly window Can be used for speed reasons or to avoid DSACK errors on startup until windows are positioned or chip selects enabled path A DOS path to the directory containing the source code for source level debug or a DOS path to a source file to be loaded at startup the path part is also saved Example ICD08SW com2 running Chooses com2 and starts the ICD with the CPU running M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 175 ICDO8SW In Circuit Debugger 9 5 User Interface
28. 3 Regardless of how the windows are arranged the title bars of all windows are visible To move between the WinIDE editor and the external ICSO8GP programs use the toolbar buttons or hotkeys shown in Table 4 1 To switch back to the editor from a program click the program s BACK TO EDITOR toolbar button For a complete description of all the WinIDE toolbar buttons see Table 4 3 Table 4 1 Navigating Between External Programs Switch To Toolbar Button EXE Tab Hotkey CASMO08W assembler F4 ICS08GPW simulator F6 PROGO8SW programmer EN F7 ICDO8SW debugger EN F8 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 53 WinIDE User Interface 4 6 1 Using Markers Operator s Manual Markers provide a convenient way to mark multiple points in a file for navigating among frequently visited locations while editing As many as 10 markers can be set in source files in the WinIDE editor A marker appears in the file as a small button labeled with the marker number When the project is saved the WinIDE editor saves the markers for all open edit files as well so that when the project is opened again the markers are still set To set a marker anywhere in the file 1 Place the cursor on the line where the marker should be 2 Press CNTL SHIFT N where N is a value from 0 to 9 indicating the marker number A marker appears at the far left of the line To move to a mark
29. 328 Example Project MOTOROLA User s Manual M681CS08GP In Circuit Simulator Section 12 Using the MONO8 Interface 12 1 Contents 152 STON ou qoe bon ori Qoi do edad ii eb eee d ples 329 123 Header Placement and Lave cr ERRORS GRE 329 124 Connecting to the In Circuit Simulator 331 12 5 Disabling the Target 5ystem Interface 242 o se nr s 332 12 2 Introduction The MONOS debugging interface may be used to debug and program a target system s MCU directly The target must be connected to the ICSO8GP20 board s MONOS interface connector This chapter explains how to connect to the MONOS interface on the target board 12 3 Header Placement and Layout Two headers must be placed on the target board e Pj I pin header such as Berg Electronics part number 68001 601 e P2 16 pin header such as Berg Electronics part number 67997 616 Table 12 1 and Table 12 2 show the target system interconnections for P1 and P2 Figure 12 1 shows the pin layouts for P1 and P2 Additional information about the connections on the ICS08GP20 board can be found in Appendix B Technical Reference and Troubleshooting M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Using the MONOS Interface 329 Using the MONO8 Interface Table 12 1 MONO8 Target System Connector P1 Pin No ICS08GP20 Direction Target System Connection Connect to MCU RST pin and P2 pin 4 No other target system logic sh
30. 49 115 172 Ies der ee eee nae Pa REIR IE RRO REE Ae Ue Psa rabies 44 hnic M OPEP 53 installing iie zihirkihee Rer caricia a 44 Memory WIOdOW AMA 181 MONOS lcg n Cd EET VER 172 ANION AA 172 ee eee Se ee eee rc A a a a ee ere re eee 173 D rdmelets coop re o RPER ER AUPPRKA RR PP XXE 175 Sta ego oy e ane n E Gea Es 33 78 175 Status WINDOW Lise sped oko a eI rar ence eee 176 toolbar buttons oves eux EX E e A E RF EM 53 USEC Interface os A AAA CR RO Ra C UR dn 176 Variables Window 4 24024 0g sc er erc o og waders 180 ICSO8GP software See SODDWOUTE A tee NI COP RRS QA Sq a OE isan 25 ICSO8GP20 board 26 31 35 37 38 43 174 329 331 342 355 parts Nes telcos sede REN SG RE REDE RE RA E RIEN dus 367 ICSO8GPW Breakpoint Window c e exscioros ies Ax E REN Te ERE ds 135 CODE WIndDWS serra a AAA cane 121 CPU NIB uat wqaacesepxy vede ee sas oe Vase Rx adeps 130 Cycles WINDOW siepe bee RAO REA a n eu 132 debugging commands derrocar diras AR epa 155 desc po e sismos lee ee aub pies ba oes dap aia s 27 43 Execute ODUONS 11e emeskkw seni ve E EQ eek EG eR E EE Dex E 148 DH Men s ss oso rae areae wi cada s aree S gor Te a ee RN 143 file Options oasis bre Rer a abb E d eas bera xx dca 143 A Ba a cape are ee od ees Bhp ce 44 146 hotkeys caera AA AAA A dq Ede RS qus 33 installe PP Mn no IA 44 Memory Window esc dossier bones 126 menu options Close LoBIHIB osas en rin ar ad ieS 148 iq TUM 1
31. 6 18 6 19 6 19 1 6 19 7 6 19 3 6 19 4 6 19 5 6 19 6 6 19 7 6 19 8 6 20 6 20 1 6 20 2 6 20 3 6 20 4 6 20 5 6 20 6 6 21 6 21 1 6 21 2 6 21 3 6 21 4 Operator s Manual Breakpoint Window liesukebceReRrhR reverb anes 135 Pn BSR 2 A 136 Editing a Breakpoint 2544 4b AR A 137 Deleting Breakpoint iocissseusssnceher E SR RA RAM E Ed Na 137 Removing All Breaks csosocascesenkussreerdenrtes 138 Register Block Window coc co ord qas SOR OA E Qd rd dads ces 138 Entering Debugging Commands 6 s2isiavceiunsi eevee tien 140 RO TOOG ok ches queo Ce ra Ge NE ME e pa 140 e E MA Le EDP eels bene ERSTE 142 ripas PC M 143 Lon SIY AA 144 oh GR el EEUU 144 lig o s PP CL 145 Rocard Nie ede ke aha DET PvE dC EE EE i bbb sd X d aba 145 o PT TD P 146 QU Rm c a ia rcr 146 Close LOGS ocasionar Dri irsini 148 ee ee eee ee ee eee ee ee ere ee ee ee ee 148 ICSOSGPW Execute OptionS co cicodctscudseaeedeindsedens 148 Di dgio c cs a She hay E E RA AR 149 ol M 149 WIIG SID CC ciar crias 149 ro ee eee ee ee eee See eee eee ee eee Ss ee ree ETS 149 A 150 Repeat omms LooosenceR eR RSEURSE ERAT RR NS dE 150 ICSO8GPW Window Options 0 eee eee eee 150 o A 151 Change Colors PT 151 Reload Desktop e4seesc cbesqut C eeevs senses CAE P Ws Le DUIS DOSEIBB ass dos Var Cbs Re ws elato qud o wipe qa S 265 132 M68ICSO8G
32. AC power outlet using one of the country specific adapters provided The system power LED on the SPGMR should light 3 Start the WinIDE editor and open a project file Start the editor either from the Windows Start menu or by double clicking its icon From the WinIDE Environment menu choose the Open Project option and choose a project file from the Specify project file to open dialog Note that the environment is pre configured If no project file exists choose the New option from the File menu to create a new project file The desktop and environment settings made in the Environment Settings dialog are stored in the WINIDE INI file and read each time the WinIDE editor is started The project specific desktop and environment settings can also be saved in a project file PPF which is read when the project is opened allowing it to be saved and used as a general environment as well as custom environments for individual projects To create the project file a Specify the project specific desktop and environment settings in the WinIDE editor b Choose the Save Project As option from the WinIDE Environment menu to name and save the project to a directory folder For more information about setting up a new project refer to Section 11 Example Project Run the ICSO8GPW simulator If communications are not established with the pod it may be necessary to select the proper port COM1 or COM2 and baud rate 9600 When communic
33. Board Label Adapter Pin Number Pin Number NC GND B4 J4 38 NC GND B2 J4 40 NC NC B38 J3 22 NC NC B29 J3 25 NC NC A2 J4 2 NC NC A5 J4 3 NC NC A6 J4 4 NC NC A9 J4 5 NC NC A10 J4 6 NC NC A14 J4 8 NC NC B39 J4 21 NC NC B40 J4 22 NC NC B35 J4 23 NC NC B36 J4 24 NC NC B31 J4 25 NC NC B32 J4 26 NC NC B28 J4 28 NC NC B23 J4 29 NC NC B24 J4 30 NC NC B19 J4 31 NC NC B15 J4 33 NC NC B16 J4 34 NC NC B11 J4 35 NC NC B12 J4 36 NC NC B7 J4 37 NC NC B3 J4 39 Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 366 Technical Reference and Troubleshooting MOTOROLA ICS08GP20 and Target Pin No Technical Reference and Troubleshooting Parts List Table B 9 Target MONO8 Cable ICSO8GP20 Board Label RST_OUT GND RST_IN R T TGT IRQ IRQ TGT PTAO CO N OD oO A wy MP PTAO B 8 Parts List ICS08GP20 ICS08GP20 and Target Pin No Board Label 9 TGT PTA7 10 PTA7 11 TGT PTCO 12 PTCO 13 TGT_PTC1 14 PTC1 15 TGT_PTC3 16 PTC3 The parts list for the ICSOSGP20 board is given in Table B 10 Table B 10 ICSO8GP20 BOard Parts List Reference Part Number Description Manufacturer Designator 84 RE21123W01 Rev C Printed wiring board bare Multek Inc C410C104M5U5CA Capacitor 1 uF 20 50 V KEMET Electronics Corporation ae T351E106M025AS Capaci
34. Corporation in the U S and other countries Intel is a registered trademark of Intel Corporation Motorola Inc is an Equal Opportunity Affirmative Action Employer Motorola Inc 1999 All Rights Reserved Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 2 MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator List of Sections Section 1 Introduction eeeeeese 25 Section 2 Hardware Installation 35 Section 3 Software Installation and Initialization 41 Section 4 WinIDE User Interface 47 Section 5 CASMO8W Assembler Interface 91 Section 6 IC SOBGPW In Circuit Simulator User Interface leere 113 Section 7 Debugging with ICSOBGPW 153 Section 8 PROG08SW FLASH Programmer 163 Section 9 IC DOSSW In Circuit Debugger 171 Section 10 Debugging Command Set 193 Section 11 Example Project 323 Section 12 Using the MONOS Interface 329 Appendix A S Record Information 333 Appendix B Technical Reference and Troubleshooting 341 os ee 377 A re ee ret ee ee 383 M68ICSO8GP In Circuit Simulator Rev 1 0 Operators Manual MOTOROLA List of Sections 3 List of Sections Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 4 List of Sections MOTOROLA Operator s Manual M68ICSO8GP
35. Correct the representation or change the parameter value M68ICSO8GP In Circuit Simulator Rev 1 0 110 CASMO8W Assembler Interface MOTOROLA CASMO08W Assembler Interface Using Files from Other Assemblers Table 5 6 Assembler Error Messages Continued Message Probable Cause Corrective Action Too many conditional assembly variables There are 26 or more conditional variables Limit conditional variables to 25 or fewer Too many labels The assembler ran out of system memory Create a file that consists only of an INCLUDE directive which specifies the primary file Assembling this file leaves the maximum memory available to the assembler Undefined label The label parameter in the highlighted line has not been declared Declare the label Unrecognized operation The highlighted opcode is unknown or is inconsistent with the number and type of parameters Correct the opcode or make it consistent with parameters y not found A mathematical expression is missing its closing brace Insert the closing brace 5 11 Using Files from Other Assemblers To prepare a source file made by another assembler with CASMO8W follow these steps l Divide large files into smaller files Typically use one file for system variables and EQUates another file for I O input output routines The main file should be the one called Remember that include fil
36. E og aap a 64 REG command AAA O 284 AAA PEPT e S19 144 REM Command i 2e RR bade ee E Rae o Sow REOR Re a 285 removing breakpoints lt a doo rar d AREE 137 requirements TA c HEB 22 gncs X daa we ce an oe eee ebd p Doe END Bake eos 27 NOS ecean O 116 h st GORIDUIEE o Devir ire ra EPOR a 27 SU UD cox Sage aS E ae SE 27 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 399 Operator s Manual Reserve Memory Byte 25 0 ccecee Rieti ket b ER IYa ER ED 109 reset microcontroller deze seda RE ar RUD RE Rp eR Re cr ak d ded 148 RESET command riada dae 286 RESETGO command sr a aad ee a 287 Igyersmmg CHANGES eec e PER PA eee ches Gee sedan Seer eee OSs 63 RMB Mire A xag esp paced ace cw Ave eae ene eas 109 ROM usi ndr ba deRE dd E SERE REP KERN ad RP bExA da Edw adus 173 RS 232 serial connector orinar aT RIT Poo E EE ER EE E E Scie ie ae ears tte E th 132 RIS cc he oriai O EE AR 132 RUN commands sisas Sa ES 223 S SIOTICS veprincarin citar ria sds stadheshbieeasrdeareias 43 116 tun P 81 Sample PIOfECk a iue edis o ox e eds Rx da o pP iE S datae rh tg apodo 323 Save all files before running 2 202552 cee eu bee rye 80 Save files before Assembling 2 2 44 000020 dara 76 77 SAVEDESK command 422 c a by e ad 291 saving changing OBS eoe 6n ecu ges re nah erent SE en cae er ends 69 MGS re 61
37. External program 3 hotkey F8 llo Call the external program 4 specified in the Environment Settings dialog s EXE 4 tab This could be a third party assembler debugger or compiler External program 4 hotkey F9 lo Assemble compile file 3 Assemble or compile the active source window using CASMO8W hotkey F4 Cut Cut the selected text from the active source window This button is E a shortcut for the Edit Cut menu option Copy the selected text in the active source window to the Windows Ex Copy clipboard This button is a shortcut for the Edit Copy menu option Paste the contents of the Windows clipboard at the insertion point Paste location in the active source window This button is a shortcut for the Edit Paste menu option Close the active source window This button is a shortcut for the File Open menu option Open file Save the file in the active source window This button is a shortcut for the File Save menu option EE Ti Save file Save the active project SAVE projec This button is a shortcut for the Environment Save Project As all files and setup E menu option Close the active source window This button is a shortcut for the Close file File Close menu option ak View register files Set up peripheral registers interactively M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 57 WinIDE User Inter
38. 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 lt 0 or 1 gt Use with ICS08GPW and ICDO8SW Examples I 1 Set the I bit in the CCR I 0 Clear the I bit of the CCR Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 242 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Display Line Information INFO The INFO command displays information about the line highlighted in the source window Information displayed includes the name of the file in the window the line number the address the corresponding object code and the disassembled instruction Before executing this command select a line of code in the Code window by clicking on it with the left mouse button Syntax INFO Use with ICS08GPW and ICD08SW Example INFO Display information about the cursor line Filename PODTEST ASM Line number 6 Address 0100 Disassembly START 5F CLRX M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 243 Debugging Command Set INPUTA Set Port A Inputs The INPUTA command sets the simulated inputs to port A The CPU reads this input value when port A is set as an input port NOTE Ifthe ICSO8GP circuit board is connected port A inputs come from
39. ICSO8GPW GP20TMIC ASM ioj xj This software will feature the 68HCO8XL36 Timer Interfac 4 input capture example A specified channel will receive periods and interrupt the CPU on a specified edge Assembled with IASMB8 Uer 3 63 Register Equates AAA TSC equ 28 Timer Status amp Control Register TOMA equ 21 Timer DMA Select Register 21 BAUD Equ 00 Baud rate set to default TCNTH equ 22 Timer Counter Register Hi 22 scet EQU 13 SCI Control Register 1 TCNTL equ 23 Timer Counter Register Lo 23 LOOPS Ew 7 Bit 7 Loop Mode Select THODH equ 24 Timer Counter Modulo Register Hi ENSCI EQ 6 i Bit 6 Enable SCI Bit THODL equ 25 Timer Counter Modulo Register Lo TXINU Ew 5 Bit 5 Transmit Inversio Tsce equ 26 Timer Channel 0 Status amp Control M EQ a i Bit 4 Mode Character L TCHOH equ 27 Timer Channel 0 Register Hi 27 WAKE EQ 3 Bit 3 Wake up Condition TCHOL equ 28 Timer Channel 0 Register Lo 28 ILTV Ew 2 Bit 2 Idle Line Type Bi Tsc1 equ 29 Timer Channel 1 Status amp Control PEN Ew 4 Bit 1 Parity Enable Bit ej tenin equ 2A Timer Channel 1 Register Hi 2a Y ITI rf 7 31 1 PAE gt PETT SL This software will feature the 68HCO8XL36 Timer Interfac E output compare example A signal with 56 duty cycle an a org ram address period will be generated on a specified channel 1996969 9269699969290 IE IE II II IIE Assembled with IASMOS Ue
40. Inc we straight retentive leg 613 7400316 Socket 40 pin DIP WELLS CTI XU1 IC120 0444 206 Socket 44 pin PLCC Yamaichi Electronics USA Inc XU2 1C51 467 KS 11247 or Socket 44 pin PQFP Yamaichi Electronics USA Inc XU3 1C51 0444 467 MCU 44 pin QFP MC68HC908GP32CFB 68HC908GP20 U3 or or Motorola MC68HC908GP32CP MCU 40 pin DIP U1 68HC908GP20 Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 368 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Board Layout and Schematic Diagram B 9 Board Layout and Schematic Diagram Figure B 1 shows the ICSO8GP20 board layout and component locations The ICSO8GP20 schematic diagram occupies the six un numbered pages that follow w W2 BOW XU1 XU3 J3 J4 JCTr W3 NNNM deir 1C508GP20 KR SaN 84 RE21123W REV Figure B 1 ICS08GP20 Board Layout UT AC8Lr ec a JC9r c a tor R4 R5 E o M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 369 TABL OF CONTENTS E TITLE PAGE REVISI
41. JUMPER DESIGNATORS SPLIT PAGE 3 REPLACED LIVE BUG PLCC SOCKET WITH DEAD BUG 0 98 20 3 98 SM 4B2 TO 4D4 2A2 TO 2D4 CHANGED REF DES J1 gt 32 32 gt 33 W2 gt J1 J3 gt J4 W3 gt W2 W4 gt J5 W5 gt W3 J4 gt J6 U4 gt U7 J5 gt J7 J6 gt J8 Ul gt U4 U2 gt U5 U3 gt U6 0 9 0 8 98 SM 4A2 4B2 MIRRORED J2 HEADER TO MATCH 01 RE91138W01 CABLE 09 18 98 SM TITLE PAG T THIS DOCUMENT CONTAINS INFORMATION PROPRIETARY TO MOTOROLA AND SHALL NOT BE USED FOR ENGINEERING DESIGN PROCUREMENT OR MANUFACTURE IN WHOLE OR IN PART WITHOUT CONSENT OF MOTOROLA DESIGNED BY DATE 6501 WILLIAM CANNON DRIVE WEST M OTOROL A SEMICONDUCTOR PRODUCTS S AUSTIN ECTOR TEXAS 78735 8598 USA meztizasuco Oma ON HATA STEVE MULANAX 971871998 DRAWN BY DATE TITLE STEVE MULANAX 9 18 1998 PROGRAMMI CHECKED BY DATE ICS08GP20 NG ADAPTER CS MGR CHECKED BY DATE SIZE DRAWING NO A GEDTTL SCH_1 GEDABV SCH_1 63ASE21123W REV LAST_MODIFIED Fri Sep 18 11 11 48 1998 SHEET 1 OF 6 2 1
42. M68ICSO8GP In Circuit Simulator Rev 1 0 96 CASMO8W Assembler Interface MOTOROLA CASMO8W Assembler Interface Assembler Outputs the binary numbers that the CPU needs alongside the assembly language statements from the source code For more information about using the assembler listing directives see the summary of assembler directives in Table 5 2 5 5 4 Error Files Error files contain assembly error information The CASMOSW highlights any errors that it encounters during the assembly and displays the error message in the CASMOSW window Depending on the environment settings the assembler may also open the file in which the error was encountered and create an error file with the assembly filename and the ERR extension 5 5 5 Files from Other Assemblers It is possible to use files produced by another assembler with the CASMOSW assembler providing they are properly prepared before using To prepare a source file from a third party assembler for use with the CASMOSW follow these steps Precede all comments by a semicolon 2 Using the WinIDE or other editor global search and replace command change any assembler specific directives listing directives pseudo operations etc as required to create a file which is compatible with the CASMO8W Remember that assembler directives must begin with the characters or and must begin in column 1 3 Ifnecessary use the BASE directive to change the default ba
43. MONO8 Mode This section describes the troubleshooting steps for the instances where the MCU is installed on a target system and the pod is used to interact with the target system through the MONOS cable These instances include in circuit simulation emulation and FLASH memory programming through the MONOS cable 1 Disconnect the target system and make sure that the pod operates correctly when configured as described in the quick start instructions 1 8 Quick Start Instructions Refer to B 4 Troubleshooting the Quick Start 2 Ifthe quick start works the pod should be functioning well enough to place the MCU on the target system into monitor mode 3 Prepare the pod for use with the MONOS cable Turn off the power to the target system Exit the ICS08GP software Remove the power plug from the SPGMR Remove any MCU from sockets XU1 and XU3 Install a jumper on W1 so that the ICSO8GP20 s delay circuit has an oscillator input Jumper selections on W2 and W3 have no effect when using the MONOS cable 4 Connect the 16 pin cable from J6 on the pod to the target system s MONOS connector Details on designing a MONOS connector for the target system are given in Section 12 Using the MONOS Interface If cutable jumpers were used on the target board the jumpers must be cut before using the MONOS cable 5 The target system including the MCU must be externally powered The target system s MCU Vpp must be 5 Vdc to communicate with the pod D
44. Marker Toagle Marker Toagle Marker Toggle Marker Toggle Marker Toggle Marker 9 Ico my do dcn I dco Ina I 1 Figure 4 4 Marker Submenu Many WinIDE menu options can be executed using either keyboard commands or toolbar buttons For example to move to a marker press the CTRL SHIFT N key combination where N is the marker number 4 7 Command Line Parameters The WinIDE editor lets the user specify command line options to pass to each executable program The name of the currently edited file or some derivative thereof can be passed within these options To pass the current filename specify a parameter F ILES The WinIDE editor substitutes this string with the current filename at execution time The extension of the passed filename can also be changed by specifying it within the SF ILES parameter For example to specify an S19 extension on the current filename the user would specify a SFILE S19 parameter As an example Table 4 2 shows the parameters if the current filename being edited is MYPDA ASM M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 55 WinIDE User Interface Table 4 2 WinIDE Editor Substitution Parameters Parameters Passed ES MYPDA ASM SFILE S19 1 2 MYPDA S19 1 Although it is by default the currently edited filename that is used in the SFILES parameter substitution the environment can be configured always to pass t
45. Open the Font dialog to specify font options for text in the current file Search Find Open the Find dialog to enter a search string Replace Open the Replace dialog to enter a search and replacement string Find next Go to the next occurrence of the search string Go to line Open the Go to Line Number dialog and enter a line number to go to in the current file Operator s Manual M68ICS08GP In Circuit Simulator Rev 1 0 58 WinlDE User Interface MOTOROLA WinIDE User Interface WinlDE File Options Table 4 4 WinIDE Menus and Options Summary Continued Menu Title Option Description Window Cascade Cascade open windows with active window on top Tile Tile open windows with active window on top Arrange icons Arrange minimized window icons along the bottom edge of the main window Minimize all Minimize all open windows Split Toggle a split window in the active file Windows by name Itemize the open and minimized windows by name in order of opening Help Contents Opens the WinIDE Help Contents Page of the Help File About Displays the WinIDE About Window 4 10 WinIDE File Options This section describes the WinIDE File menu options for managing and printing source files or exiting the WinIDE editor To select a File option click once on the File menu title to open the File menu Figure 4 6 Click on an option to perform the operation Use accelerator or shortcut keystrokes
46. Operator s Manual MOTOROLA Introduction 33 Figure 1 4 WinIDE Real Time Debugger Toolbar Button 1 9 MC68HC908GP Security Feature The MC68HC908GP20 and MC68HC908GP32 MCUs contain a security feature based on information that the user programs into the part Security bytes are specified in addresses FFF6 FFFD The PROGO8SW software continually records any changes to these security bytes and stores them in the file SECURITY INI The information in this file is also shared with the ICSO8GPW in circuit simulator and the ICDO8SW in circuit debugger software This allows the user to reset the device and still have access to the monitor mode The ICSO8GPW software automatically attempts to access the part by trying the default nothing written and up to the last 10 sequences of bytes that have been written to the part If after trying each of the sequences of bytes stored in the SECURITY INI file the ICSO8GPW software is unable to access the part a security dialog box is displayed Figure 1 5 This dialog allows the user to enter the security bytes manually or to read the information from the S19 file from which the MCU was last programmed Decuntp Information ai Enber Ermar can t pass HOO security check The eight bale security code is the same data as was programmed into the sector addresses SFFFE SFFFD Please enter the security code er speciby the 519 file which contains il Enter Code Cir Load from Srec File
47. PPF without prompting The editor saves all currently open files with the current project If this option is not selected the editor prompts to save the open project when exiting This setting only has an effect 1f a project is open when exiting Auto Save All Files Select this option to save all open editor files automatically without prompting when exiting If this option is not selected the editor will prompt to save open files when exiting Ask user Exit Application Select this option to display an Exit Application confirmation message when exiting If this option is not selected the editor will close without asking for confirmation when the user chooses the Exit option from the File menu Saving the Project Also save all open editor files Select this option to save all open editor files whenever saving the project file If this option is not selected project environment information is written to the project files but editor files are not saved when the Save Project option is chosen from the Environment menu FILE Parameter passed to executable programs is The SFILES parameter specifies what is passed on the command line in place of the SFILES string The FILES string can be specified as a command line parameter for executable programs launched from within the WinIDE editor Currently edited filename Select this option to use the name of the current active file the window with focus as the FI
48. Pin Assignments csccsey sco ee Rude ue yr es 364 Bs Pus Lalo citados REA d oU ei ib dis 367 B 9 Board Layout and Schematic Diagram 4 369 Glossary il A ER A E R S 377 Index o rrr 383 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Table of Contents 17 Table of Contents Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 18 Table of Contents MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator List of Figures Figure Title Page l 1 MIDE Debugger Toolbar Button 2 esorer m RR Rs 33 1 2 WinIDE Assemble Compile File Toolbar Button 33 1 3 WIDE Program Toolbar Button 44222229 er ys 33 1 4 WinIDE Real Time Debugger Toolbar Button 34 1 5 MC68HC908GP Security Dialog Window 34 3 1 Pick Device Dialog Window 10 lt 0i4s4ssndsidscsgedeens anes 45 3 2 Can t Contact Board Dialog Window 045 46 4 WinIDE Window Components 0s eee eee eee 49 E MAA 51 4 5 WmnIDE Edit Shortcut Menu ccssevscassacersceeaceseaes 54 a Marker SUDMEM TIPP 55 H2 E TODO ek pEREQURGO ERO ODER IE RO REO AO 56 B0 Will Pile MAE c6sieeecdecievereeese sek euceeyss ous 59 B OpenFile Dialog Window oeus sestxwebertthbbeitete sees eee 60 4s Po ole Window s ones eae ens beetle RES bes 62 BH Will Edit M 2 60sseens arar eu shee sees 63 4 10 WinlDE Environment Menu 2
49. Re GO REOR Ry qus 310 Stop Macio o22 edu eased EP esed Reda d Jod peewee 146 storing desktop information Laco cada eect Gud ria T E dS 67 environment SOIINGS i 6b suet he Ser ereo NEUE RR Rae fe 66 executable options 4 529 e ipe EG eed eens d REG REX a 66 iui WERT 81 S broutine SACK sce en acerca abt ears er RA S an pear ace AC Rd aded 133 switches COMPLIES ASSCINBIED aspas is RR E gir edita ps 76 SYMBOL c omma d cesses 124 311 symbol table ly a ala ara Os 96 system pss O PPP TOQUITEIMEUES 52 p AAA eee 116 BIS argues Roe Dae a eka aberrare pda neri ixi e anes 3l System power LEDs cesa v eR REPE EAR CER TRE Seek eee teens 38 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 403 Operator s Manual T Tcommande E rrr 306 Tab Sues 22er 3 eR EE RARE rip Ta CE urb i a os Ea a a E S e ee 71 TaD SiE PRIM NC a E E E nee E Pe EE EEA E E S 73 target system CADIBS do4e ep tee A ue pa pue 342 343 364 connecting t0 e us 26 35 38 39 43 329 331 343 344 CODIDBCLIOIS Lodo conve shen bbweseecrvdreheosadue X RA KR Ed ea 329 cycle UMING Pre 132 debus dihi eresie tpt rarere peraan e 172 173 329 description i 2 ond OO RA 23 I E E EE E 115 MCUs cv Retasseaeuh E RI a E E E S E 342 343 344 MONOS interface stress ea 329 344 351 A A Seren eae sO geet e HIE Mn Rd be ead 36 nu A In 37 programming lt sptirs pila AA A es 164 A ee ne ee ee oe t f target head adapter 2
50. Reference and Troubleshooting for troubleshooting instructions 1 Install the ICSOSGP software package To start the software installation run the SETUP EXE program on diskette 1 During installation follow the instructions in the installation wizard 2 Assemble and connect the hardware pod see Electrostatic Discharge Caution in 2 2 Overview a Install the MCU into the ICSOSGP20 board Locate socket XU3 on the board Install the MCU provided with the M68ICSO8GP package into this socket observing the pin 1 orientation with the socket s notch The top label side of the MCU package must be visible when looking at the component side of the ICSO8GP20 board b Install the ICSO8GP20 board onto the SPGMR base unit Make certain that power is off before performing this step Fit the two 10 pin SIP single in line package headers on back of the board into the sockets on the SPGMR The Motorola logo on both the board and the SPGMR must be visible and aligned in the same direction The two LEDs on the SPGMR must be visible c Connect the SPGMR to the host PC Locate the 9 pin connector labeled HOST on the SPGMR Using the cable provided connect it to a serial COM port on the host PC M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Introduction 31 Introduction Operator s Manual d Apply power to the pod Connect the 5 volt power supply to the round connector on the SPGMR Plug the power supply into an
51. Section 5 CASMO8W Assembler Interface odas rU 9 Tir GU UOTE s ear d o PG CER II Cd 92 CASMOS8W Assembler User Interface oooooo o 93 Assembler Parameters como a eRe HE 94 EE eR or TIT 95 Object FURS P M 95 WA Piles A 95 Fi Ra TN 96 ROO PGS Licores E bd E E E d bdo piis e RC CA 97 Files from Other Assemblers scc s e ER REA 97 Assembler PUDOR Lo 42508254406 4on69 2040256546 LATA ES TEMA 98 Operands And Constants 13 3 qaas oe dace d GR PO FC C C 98 COMME cria dr oO E AG Odd CREE Pb 99 Assembler DIBOlVES pcb cei lad ERR EX RE PEREd Gd E bes harii 99 II E A E E E E S T 99 A nada E o eoe E EET 100 Conditional Assembly 226444 bdsesuseesasbancbasivgesus 102 A on ch6 enh be ed Pau T peuG bese eeceee tees 102 AS qua 4ai aao YE Ree SE RE Owe 103 Ling DOUE no oo ho ode ERE Rr AAA 104 Linne aol EA AAA AR 105 rrr 107 Prem OPENUONS 6442564 cceet eee A ERES YR ees 107 Fouslg EQU i eua quad Eo ao OC IEE I R ERR EERO 108 Form Constant Byte PCB 1 soaaonsso saa tr RR RE 108 Form Double Byte PDB 52csssz scescchu uou ta e ye s 109 Lira li or MA 109 Reserve Memory Byte RNB cscscs ceases as bh hn 109 M68ICSO8GP In Circuit Simulator Rev 1 0 8 Table of Contents MOTOROLA Table of Contents 510 Assembler Error Messages lios c4205644dc4dhoGededorined ER 109 5 11 Using Files from Other Assemblers osorrocirs ies 111 Section 6 ICSO8GPW In Circuit Simulator U
52. Simulator Rev 1 0 Operator s Manual MOTOROLA Introduction 29 Introduction e For usage in this manual filenames are not case sensitive But for consistency they will always appear in all capital letters in Times SETUP EXE MAP file e Buttons icons functions and keyboard keys are indicated in Times small caps Press the ENTER key Type CTRL N or click on the NEW toolbar button The RESET function is an input and output Commands are not case sensitive But for consistency they will always appear in all capital letters in Times unless they contain some peculiarity INPUTx UNDO LOADMAP Menu names options and tabs and dialog edit text and lists boxes are indicated in Times bold Do this by checking the Main File option in the Environment Settings dialog s General Options tab Open the Open File dialog Select the filename in the File Name list and use the filename in the Main filename edit box Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 30 Introduction MOTOROLA Introduction Quick Start Instructions 1 8 Quick Start Instructions For users experienced in installing Motorola or other development tools the following steps provide a quick start installation procedure for the M68ICSO8GP hardware and software For more complete instructions refer to Section 2 Hardware Installation If problems occur with the quick start procedures refer to Appendix B Technical
53. Table 7 1 lists the argument types used for commands Table 7 2 lists the commands alphabetically and summarizes their functions For detailed descriptions of the individual commands refer to Section 10 Debugging Command Set Table 7 1 Argument Types Syntax Type indicators Explanation Mw salas Hexadecimal values unless otherwise noted lt data gt lt signal gt rane For decimal values use the prefix l or the suffix T Numeric f For binary values use the prefix or the suffix Q lt frequency gt Example clips lt count gt 64 1100 100T 1100100 11001000 lt value gt Four or fewer hexadecimal digits with leading zeros Address leaddresss when appropriate lf an address is decimal or binary use a prefix or suffix per the explanation of numeric arguments A range of addresses or numbers Specify the low Range lt range gt value then the high value separated by a space Use leading zeros if appropriate lt symbol gt Symbols of ASCII characters usually symbols from Symbol lt label gt source code The name of a file in DOS format eight or fewer ASCII characters Include an optional extension three Filename filename or fewer characters after a period If the file is not in the current directory precede the name with one or more directory names Operator op add subtract multiply or divide M681CS08GP In Circuit Simulator Rev 1 0 O
54. WinIDE environment operates as a standard ASCII file such as an assembly file editor for Windows and includes some speed buttons for calling upon customized assemblers compilers and debuggers In conjunction with the CASMO8W assembler and the ICD08SW in circuit debugger this environment can allow assembled files to be downloaded and tested while the original source code is modified and assembled The ICSO8GPW gets input and output for the device from the external hardware pod attached to the host computer I O from a custom target system can be used by attaching the pod to the target board with the appropriate cables 68HC908GP20 devices can be programmed through the M68HCO8PGMR board using the PROGOSSW software ICSO8GPW is a non real time debugger MCU code runs only as fast as it can be simulated by the host PC For real time execution use the ICD08SW real time in circuit debugger ICSO8GPW accepts any standard Motorola S19 S record files as input for simulation These object files can be created by any HC08 assembler such as CASMOSW However to perform source level debugging through these files in the code window P amp E compatible source level map files must be loaded These map files can be generated through CASMOSW Ifa third party compiler assembly or C is being used the compiler must be able to produce P amp E compatible source level map files M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA
55. a a eNA E E E S S 27 power CONNECTOR PERMET 37 EED aae aree ot se m E E E 32 344 345 346 348 351 352 TOQUES serres bere 29 supply connecting is dar a tado ne 32 38 power Connector scissa exa RA RR E ed ria 37 lg R 67 nin T 59 62 processor cycles viewing MUI a ei ou y oh A CARRIE eae DRESS ES 132 PROGO8SW command usage and syntax 5 ood eye pend aves ERSUDEEE RC E E 166 commands BM Blank check Module 00 0c eee eee eee 166 CM Choose MOdUIC ve soporta ne PE REA ad oes 166 EM Erase Module 5 2i2ss sr px Ra Rx REPARARE ERES dos 167 HE Help ose grktiaceeD XR 9 oo REO Urra rr ab 169 PB Programi AA 167 PM Program Module 0 0 0 cece eee ee eee 167 CD OIT 0 ore 4 4 A 169 RE Reset C PLI s cosa educere Sh REN a Ea RO P a ae den 169 SM Show Module 2242 RE SRen dedicas 167 SO DDBOILY S EOCORd sinapsis did wis edo 168 UM Upload Module 522p Ey ERR ERE RR RR 168 UR Upload Range u2eccpec rer hare E aa RA RET raed esd cand 168 VM Verily Module crono id tad 168 VR Verify Range cierre 168 ato 119 1 sescat a yg vx E sk Seda E E 26 28 43 69 115 164 UGS Srta A E dapes 44 Hotkeys sense csbee ends neten ekr RE EE e aE Ea 33 CSG E es suba ee BE a A E EAEE ope 44 parameters codex r renie es See ssw eade stew Rad ei E a xd a 165 programming example pu ase eens beter b REPE RAE PER 169 SECUTI P aa a ea E R a E ERAR ER S 34 dra PPM 33 165 iGOlDar DOODS eiie o sep ye ea e ee i a ea i t
56. asserted low Port A I O keyboard interrupt bit 0 Unavailable MCU connection Port A I O keyboard interrupt bit O Host I O present on this pin Port A I O keyboard interrupt bit 7 Port A I O keyboard interrupt bit 7 Grounded during reset and for 256 cycles after reset Port C I O bit 0 Port C I O bit 0 Held at 5 Vdc during reset Port C I O bit 1 Port C I O bit 1 Grounded during reset Port C I O bit 3 Port C I O bit 3 Grounded during reset Operator s Manual MOTOROLA Technical Reference and Troubleshooting 363 Technical Reference and Troubleshooting B 7 Target Cable Pin Assignments The tables in this section describe the pin assignments for these cables Flex target cable for use with the QFP target head adapter MONOS target cable Table B 8 Flex Target Cable M68CBLO5C and QFP Target Head Adapater MCTCO8GP20FB44 Sheet 1 of 3 Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 QFP Package ICS08GP20 Target Head ICS08GP20 Pin Number Board Label Adapter Pin Number Pin Number 1 RST A12 J3 6 2 PTCO A15 J3 7 3 PTC1 A16 J3 8 4 PTC2 A19 J3 9 5 PTC3 A20 J3 10 6 PTC4 A23 J3 11 7 PTC5 A24 J3 12 8 PTC6 A27 J3 13 9 PTEO A28 J3 14 10 PTE1 A31 J3 15 11 IRQ A32 J3 16 12 PTDO A35 J3 17 13 PTD1 A36 J3 18 14 PTD2 A40 J3 20 15 PTD3 B37 J3 21 16 Vss B33 J3 23 17 Vpp B30 J3 26 1
57. at the current cursor location When PC gets to that point execution stops This option is enabled only if the user has clicked on a line of code to select it Set Base Address Choose this option to open the Window Base Address dialog Figure 6 5 and set the new address for the first code line in the Code window Window Base Address x New Address Po Y 0K X Cancel Figure 6 5 Window Base Address Dialog Window Set Base Address to PC Choose this option to set the PC to the address of the first line in the Code window Select Source Module Choose this option to select a source module if a MAP file has been loaded into memory Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 122 ICSO8GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Code Windows Show Disassembly Choose this option to display the Code window contents in disassembly mode Show Source Disassembly Choose this option to display the Code window contents in both disassembly and source modes 6 6 3 Code Window Keyboard Commands Use these keys to navigate in the Code windows Press the up arrow T key to scroll the Code window contents up one line Press the down arrow J key to scroll the Code window contents down one line Press the HOME key to scroll to the Code window s base address Press the END key to scroll to the Code window s last address Press the PA
58. available for the QFP quad flat pack PLCC plastic leaded chip carrier and DIP dual in line package footprints on the target board M68ICSO8GP In Circuit Simulator Rev 1 0 38 Hardware Installation MOTOROLA Hardware Installation Connecting to a Target System Use the MONOS debug interface for communication with the target system s MCU This method allows in circuit FLASH programming and debugging of the target system s MCU Either an MC68HC908GP20 or MC68HC908GP32 MCU must be installed in the target system The ICSO8GP20 s MCU must be removed Connect the ICSOSGP20 s MONOS connector with a compatible MONOS connector on the target system Complete instructions for constructing this interface on the target board are found in Section 12 Using the MONOS Interface M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Hardware Installation 39 Hardware Installation Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 40 Hardware Installation MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator Section 3 Software Installation and Initialization 3 1 Contents 3 2 3 3 3 8 1 iaa Ia 3 3 4 ded 3 4 3 4 1 3 4 2 3 4 3 3 2 Overview 4 1 1 A e Rs 41 ICSO3SGP Son wate LOMDOBHIS de a A AA 41 WInlDE PAR ARI AAA 42 CASMOSW Assemble seme dx eK RP ERERTE ARA 42 IC SUBGPW In Circuit Sun lator ck eae e RR RR 43 ICDO8SW In Circuit Debu
59. bad 333 SO header record 0 RI 337 A 22 6 5s ede ERG CREE CEN ene Se MEER bee ea a E EN 337 DL TEC drid BESS OSES RO GOS 338 SO ECOL 4 2 s osos haaa paene qc ddp rst str eee 339 termination record 1 0 e 339 YPES ee ee eee ee ee ee ee ee ree eee eee eee ee 335 DO COMMIANG a EE Siang Eie eM Boa Paneth cee Ps aes 305 ST COMMANG 1 5 6 sere sd bed Gea oa PRO Re Vanda nd ob de eI T 306 STACK comme 307 Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 402 Index MOTOROLA Index stack data imterpretatlons 2546 iderandse daveu her Lex he tex 3 RE ts 133 stack pointer value Ls iris doce Fre oc dia Vg ex a Fei 132 136 stack values VISUS Sooo ot due teh SESE eee ete eda sue bai ee i d inops 132 stand alone mode lseeeeeeee e 35 118 stand alone mode ICSO8GPW o 43 Start Menu 4 be pedet gene RU ede A eni 44 45 starting CASINOS W picor dE E PERI d ceeds dde eique nd p dde 94 ICDOSSW sarro tala PA SEA 175 IC SUSCIE SUEDE zara AAA AAA 45 PROGOSS Weiss den taa 165 WIDE ini AA ceeded eee sae eens 32 startup les oa au ete 239 exp E E EE E PEDE E O E E RN PES 119 STFARTUR OS Lus cies hA d don hae Rint MORE ale antes She Sate ducc aie 119 status bar AAA ona So e ERWARTEN oneness sl STATUS command ii sa khe based E A X PER RED ER REA dU 308 STEP Command Locis trata riera HI D RE dS 306 STEPFOR Cormiialid uses eaae mu t de ee Cx dco d act ires 309 STEPTI command 2221 kde EXER EX ORE
60. base use either the appropriate prefix or suffix Table 5 1 but not both M68ICSO8GP In Circuit Simulator Rev 1 0 98 CASMO8W Assembler Interface MOTOROLA CASMO8W Assembler Interface Assembler Directives The assembler also accepts ASCII constants Specify an ASCII constant by enclosing it in single or double quotes A character ASCII constant has an equivalent value A is the same as 41H An example of a string constant is do this is a string Table 5 1 Change Base Prefixes Suffixes 5 6 2 Comments Use semicolons to delineate comments A comment may start in any column and run until the end of its line Additionally if any line has an asterisk or semicolon in column 1 the entire line is a comment 5 7 Assembler Directives Assembler directives are keywords that control the progress and the modes of the CASMOSW assembler To invoke an assembler directive enter a or as the first character of a line Enter the directive immediately after this initial character along with the appropriate parameters values Directives supported by the assembler vary according to manufacturer Table 5 2 summarizes the CASMOSW assembler directives A caret indicates that a parameter value must follow the directive Note also that a space must separate a directive and its parameter value 5 7 1 BASE The BASE assembler directive changes the default base of the current file The parameter specifie
61. byte of data Each byte specified by the FCB directive generates a byte of machine code in the object code file Use FCB directives to define constants in a program M68ICSO8GP In Circuit Simulator Rev 1 0 108 CASMO8W Assembler Interface MOTOROLA CASMO8W Assembler Interface Assembler Error Messages 5 9 3 Form Double Byte FDB 5 9 4 Originate ORG The arguments for this assembler directive are labels or numbers separated by commas that the assembler can convert into 16 bit data values Each argument specified in an FDB directive generates two bytes of machine code in the object code file The originate directive sets the location counter for the assembler The location counter keeps track of the address where the next byte of machine code will be stored in memory As the assembler translates program statements into machine code commands and data it advances the location counter to point to the next available memory location Every program has at least one ORG directive to establish the program s starting place Most complete programs will also have a second ORG directive near the end of the program to set the location counter to the address where the reset and interrupt vectors are located The reset vector must always be specified It is good practice to also specify interrupt vectors even if the user does not expect to use interrupts 5 9 5 Reserve Memory Byte RMB Use this assembler directive to set aside sp
62. cable B 3 2 SPGMROS Serial Programmer Base Unit The SPGMROS provides 5 Vdc power 8 5 Vdc power for the Vrsr voltage required to enter monitor mode a 4 9152 MHz clock signal and host PC RS 232 level translation for the ICS08GP20 board This is the same SPGMROS base unit that is used with numerous programming adapters for other Motorola HC08 MCUs The socket power LED on some older SPGMROSs lights dimly when used with the ICSO8GP20 This is normal and does not affect the functionality of the assembled pod B 4 Troubleshooting the Quick Start Operator s Manual The quick start installation procedure in 1 8 Quick Start Instructions describes how to prepare the pod for use in the modes where the MCU is installed on the ICSO8GP20 board These modes include e Using the pod as an in circuit simulator emulator with a target cable e Using the pod as a programmer e Using the pod as a stand alone system without a target board If difficulties are experienced when quick starting the kit using the procedure outlined in 1 8 Quick Start Instructions follow these steps 1 Do not use the MONOS cable to a target system in these modes The MONOS cable connection is to be used only when the MCU is on the target system Troubleshooting information for the MONOS modes may be found in B 5 Troubleshooting MON08 Mode M68ICSO8GP In Circuit Simulator Rev 1 0 344 Technical Reference and Troubleshooting MOTOROLA Technical Reference an
63. choose a filename drive directory and network path of an object file or source file to load in the Debugger main window Also use this option to load SLD map files Specify 19 File to Load 2 xi File name Folders d ics05bw ics05bw Cancel c3 d 3 ics bbw E ics bbw Network di List files of type Drives Motorola 19 Object amp d godel d Figure 6 25 Specify S19 File to Load Dialog Window To load an S19 or MAP file choose the Load S19 File option from the File menu to open the Specify S19 File to Load dialog Choose the path and filename and press OK to open the selected file in the ICS08GPW or press CANCEL to close the dialog without making a selection Alternatives Press the F2 function key click the LOAD S19 FILE toolbar button or enter the LOAD command and filename and other arguments in the Status window command line 6 19 2 Reload Last S19 Operator s Manual Select the Reload Last S19 option from the File menu to open the Specify S19 File to Load dialog Figure 6 25 and select the most recently opened S19 or MAP file to open in the Debugger main window Follow the procedure for loading an S19 file 6 19 1 Load S19 File Alternatives Press the F3 function key or click the RELOAD CURRENT s19 toolbar button These are the keyboard equivalents to choosing the File Reload Last S19 menu option M68ICSO8GP In Circuit Simulator Rev 1 0 144 ICS08GPW In Ci
64. command eeeeeee RR RR RR RR ae 244 INPUTB command a Pee te a vetus 245 INPUTC command 0 00 00 0c ccc RR RR 246 INPUTD command 0 0 000000 ccc cee 247 INPUTE comme a a 248 INPWTS command ced EET cee Saree oe be LA ERE Oh be cee 249 installing hardware pOd Cm 3 SOM Wal vera ad o dedo A 41 44 INT command bre br p UR e RI dus 250 integrated development environment o ooocococoo AT interactive mode 1 ha 35 M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 393 internal TeBISLOfS c1 Seca nde dees her bbeawndcsuegeneehducsnd sade 130 Intertupt Mack ose eea Poe dr px Te PET RUE RETE E Ead eee 133 IRQ COMMANG sisse Cees Bade beeen E R E AEA R OE Aa 250 J jumpers configuration inscia bRr km ERI ERR trabar 36 L NS 104 105 107 124 LED socket POWE riera ra 32 344 346 348 352 syst m DOWEL Lave ar 32 38 345 346 351 LPcommarnd 2 R9 Sek v y ERI 117 INE COUN ceca aeara as See Se enu 105 feldin list Tile ia eer ii didas 96 line numbets ovvio Re E RES Hae ea T ee ss qve e 51 lines totalis cs Sea eoe s AES RES ih duis I Hoi better 51 listine direellvBS yuri pepa eee S de E ede 104 SUING TUES TERT 52 75 96 105 327 Listing Opuons acetadi shen eecesneci Serene tries Fare PS ne thes 22 isting VADIG C 106 LISTOEE command ada 252 LISTON command lseeee RR RR 253 LO
65. command displays the output circular buffer from the SCI A window is opened that shows all the data that the SCI has shifted out An arrow 1s used to point to the last output value transmitted The maximum number of output values that the buffer holds is 256 bytes If the ICSOS circuit board is connected SCT inputs and outputs are directed from the board so this command has no effect Syntax SCDO Use with ICSOS8GPW only Example SCDO View data from the output buffer for SCI simulation Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 290 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Save Desktop Settings SAVEDESK The SAVEDESK command saves the window size position and desktop settings for the application when it is first opened or for use with the LOADDESK command Opening the application or entering the LOADDESK command loads the saved settings Syntax SAVEDESK Use with ICS08GPW and ICDOSSW Example SAVEDESK Save window settings for the application M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 291 Debugging Command Set SHOWBREAKS Display Breakpoint Window The SHOWBREAKS command brings up the Breakpoint window that displays the breakpoints used in the current debugging session Breakpoints can be modified through this window Syntax SHOWBREAKS Use with ICSO8GPW only Examp
66. ct poe deo oie vue eq bd id eo o Sa qaid E 54 4 7 Command Line Parameters scnas4 e455 coke ex bn EE RR REA 55 4 8 Ne DO MTM C p em 56 Ac WalDE MEUS cs Gt age ER db ERIKIRE Ea HER RR ER IERWE RR ees 58 2 10 WDE Fils ODIOS Lud auo q Ero tese rode qued ed la 59 4 10 1 B I O 60 S102 Sipe Pie rm 60 OVI OVP PRIME ELT 61 GIIA DRETS Acc rd 61 4 10 5 o 21 AA TET 61 SIDA POM Ps A Dessau E eux o ipa E See a peas 62 AIT Pun HDaaiieasstto ES RATARRARPDEUXR ESSA de euceens 62 20r ESO A otun iere drasa err rarena NES 62 M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinIDE User Interface 47 WinIDE User Interface 211 Walle Edit DOUGH conoricodrrsiarrriierrrds rr 63 BLECE WU AR P RSERA GREATER ES E 63 Ale QUEEN ai 44EECA AAA SH hen Cds 64 215 Ee rrr 64 BILLS COD uu esi oS A ee S IE M uL eee 65 9 o A iiike idea e a 65 231 ES rcr 65 PLECE GOMOD eine pet RR ieee D Era uE LLEVE RES RE 65 A412 anIDE Environment ones iaciciri esso vec edo 66 4 12 1 Open PON criada Ada eR es 67 HLL Save Peet o io os 6 6555652 66654 eos 6595605255644 0 Hs ORS 67 AE ee PRS ass2454adbeqedecsd en d icp aie qd d quede ide 68 4124 Close New Praojebl sscirascrinsariatrsrrihd RESET RA d 68 amp 1215 Soup UOI eisrors EE CARY UFEE SE UPERWESTA TP TEE 68 4 12 5 1 General Environment Tab ouecses Pez ectawtetdt eens eae 69 4 12 5 2 General Editor Lab ciosircrrnntrr TAREAS ERES A RES 71 4 12 5 3 Assem
67. directive ramos rara dm pes ia 108 FDB dit amp 6liV8 acicarribira ricardo 109 cnc MRRRPET O 28 fields listing TUBS sn dat 2 xen vee essen doe EP ICA rodri 96 file options WILDE circa REATO RR RR DG REIR EE RESO 59 filename storing as parameter cou odes Dar eee ee E Res ipi ro 69 filename paramielet ii lecazidc he RR al di 55 o P LO files ACI secs 117 CASMOSW sos puces ir EE E E GAE 44 ICDOSSW 2 5654 6R ERE meridie eda E RERO REIS bed ld 44 ICSOSGEW said AA is 44 listing A CPP 327 Dr E 43 objectcode 32 54 UG ade sua ese duh petu AR e sed du dn 43 PONUDE us ese o INI I VE DERE Ed di 62 PROGOSSW MP 44 JD ctu pba bhbebitebiasie asad achsmescaribawdhaeicas 43 116 A PP 61 70 A a EE E EG E E E ANE E RAE a e a a 117 ng MM 119 WIDE sso us eva ads aos od 44 file types MODE uae sa ietnye Poe dU Reged aedis Ped Dic Rd EDS 52 FILE COMMA PP 203 Find Next DUO 21e re EERQu ED ER ERI ePEG ae 82 Find what AMA ea naa a A A S 83 Fixed Tabs otcicaied peectdane d Rn i ean bh ERN R dde Ta FLASH memory 26 27 28 43 164 165 173 257 343 344 351 352 f nt setings du eer ee oido Gee S E ice E i E Ea 66 Form Constant Byte sess RR RES IER EROR RE ES 108 Form Double Byte sirenas rex E Ze dde new dare sedes 109 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 390 Index MOTOROLA G command ss oderat cose EXE SERES Genera
68. erat OE ae ool ok ome ee a eae ge ae oe a 92 OPUS E E E E E EE EE E EEE 66 cicius PPP 94 preferentes iszelachkar esed uper ERES RIGG d ear TRATARSE RT sees 76 progress WINDOW aso ecb eu conde tee ede E Xp ee i 76 QUIE statt Loss edi nre Ede eet redu e RM NE eU endis reds 33 du ccc A Oe Pane hoe M DNE USE e de ad edad usd dde 73 ds AS 4 Auto Save All PIS 4 sepa e ERE ea 70 Auto Save Current Project 2 22s pea aa bu edad ap AR s ede 70 B Back to Editor toolbar button 53 base address p R S 122 batch files error OULU s cu op e EE RO oe O 78 EXE DD dra eee kde RU REPE A AAA a pus 14 BELL COMMANA su oi ot oy dr PO CORPORE NET HUI CNRC Mq EET REM 202 BE GOES 2953 em duce Sr eiae ae ead ee oe eee RU Fe dace i ee don 203 BR command i221 RGEERENXARG A Y e ds 204 lnc nena E 105 BREAKHX command x esu exaeu un e e XEax eX ERR ARR EA ERE E 208 Breakpoint Window i22 4Bereceze 9eB9bezszsberese qaBeriQe 9 eraca 136 Rea POMS Tm 43 adding Loss tete e Eia iea bade et p REP ER dr 136 oq p C ante on O E EE EEEN 137 culmo d rt 137 IOIUDVIUB ci de y exe PESCE obese te END EHE IHRE Ce xd PR HE 137 SENE eai a redeo ade d dre Fade ee cad eon eae owe hee aud eos 122 BREAKSP command 2 sake RR anke ex ek ERRARE RR Ranks 210 A aiie ia ia a aa a e a o a 44 buttons toolbar seeeeeeeeeee RR RRRRRRIRRIRRIRRRII 56 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 384 Index MOTOROLA Index C CAMA ce eer 212 CAPTURE command
69. index register to a user defined value Upon selecting this option the user is prompted for a value Set Stack Pointer This option is disabled and is only shown for convention Set PC Sets the program counter PC to a user defined value Upon selecting this option the user is prompted for a value Set Condition Codes Allows the user to toggle bits within the CCR Upon selecting this option the CCR modification window is displayed as shown in Figure 9 7 M68ICSO8GP In Circuit Simulator Rev 1 0 184 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger Debugging Commands COR 17 120 ej of ef of wow xX cone 7 s Figure 9 7 ICDO8SW Set CCR Window 9 5 6 2 Keystrokes These keystrokes are valid while the CPU window is the active window F1 Displays help for this topic ESC Make the Status window the active window 9 6 Debugging Commands Debugging commands for use with the ICD08SW in circuit debugger are described in the following sections The individual commands are defined in detail in Section 10 Debugging Command Set 9 6 1 Syntax and Nomenclature A command is a line of ASCII text that was entered from the computer keyboard For ICD08SW debugging commands enter the command and its arguments in the Status window command line Press ENTER to terminate each line and activate the command The typical command syntax is command lt argument gt W
70. interrupt 6 12 2 Subroutine Stack During execution of a subroutine the stack window displays the subroutine stack that indicates the restored state of the CPU upon return from a subroutine NOTE M68HCO8 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 stack data It is important to know whether program execution is in an interrupt or in a subroutine to know which stack data interpretation is valid M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 133 ICS08GPW In Circuit Simulator User Interface 6 13 Trace Window Use the Trace window Figure 6 17 to view instructions captured while tracing is enabled 1E88 BSET 7 PORTA 12 6119 BE18 LDX TCNTH 11 611B B619 LDA TCNTL 18 611D AB32 ADD 32 9 611F B788 STR TEHP 8 8121 9F 7 6122 A966 ADC 6 6 6124 B716 STA OCRH 5 6126 B613 LDA TSR 4 0128 B680 LDA TEMP 3 612A B717 STA OCRL 2 812 88 RTI 1 IRQ INT 1E88 BSET 7 PORTA B 8119 BE18 LDX TCNTH wv OK Figure 6 17 Trace Window To display the Trace window enter the SHOWTRACE command in the command line of the ICSO8GPW Status window To enable or disable tracing enter the TRACE command If tracing is off the command will toggle tracing on if tracing is on the command toggles tracing off The trace buffer is a 1024 instructio
71. is open The WinIDE editor disables the option if no window is open Choose the Print Setup option from the File menu to open the Print Setup dialog for the operating system and printer Use this dialog to choose the printer page orientation paper size and other printer options Choose the Exit option from the File menu to close the editor If a project or source window is open the editor closes the files and exits Alternatives Type ALT F4 This is the keyboard equivalent to choosing the File Exit menu option M68ICSO8GP In Circuit Simulator Rev 1 0 62 WinlDE User Interface MOTOROLA WinIDE User Interface WinIDE Edit Options 4 11 WinIDE Edit Options 4 11 1 Undo This section describes the WinIDE Edit menu options for creating or editing source file contents To perform an edit operation click once on the Edit menu title to open the Edit menu Figure 4 9 Click on an option to perform the operation bdo Dez Cul Thies Copy Oc Ese Cney emis Dei elect Al Figure 4 9 WinIDE Edit Menu Choose Undo to undo or reverse the last action or change made in the active source window Changes made to the contents of the window and that are undoable or reversible are saved in an undo stack where they accumulate up to a maximum of 20 instances Changes can be reversed in descending order of the sequence in which they were made If no more changes remain in the stack the Undo option is disabled
72. lt value gt ICSO8GPW and ICDOSSW SYMBOL SYMBOL timer control 08 MM timer control 33 M681CS08GP In Circuit Simulator Rev 1 0 The ASCII character string label of the new symbol The value of the new symbol label Show the current user defined symbols Define new symbol timer control with value 08 Subsequently to modify the value of timer control enter the command MM timer control new value Write 33 to address 08 Operator s Manual MOTOROLA Debugging Command Set 311 Debugging Command Set TRACE Syntax Use with Example Operator s Manual Enable Disable Tracing The TRACE command enables or disables instruction captures When tracing 1s enabled the debugger records instructions in a 1024 element circular buffer Note that tracing slows execution somewhat The debugger disassembles captured information when buffer contents are viewed through the Trace window To view tracing results use the SHOWTRACE command If tracing is not enabled or if a trace slot is empty the Trace window will display the message No Trace Available To clear the Trace window toggle tracing OFF and then ON using the TRACE command TRACE ICSOSGPW only TRACE Enable or disable instruction tracing M68ICSO8GP In Circuit Simulator Rev 1 0 312 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Upload S Record to Screen UPLOAD_SREC NOTE Syntax Use
73. 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 See the CAPTUREFILE or CF command for 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 entering 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 lt address gt lt address gt Where lt address gt Location to be monitored for a change in value Use with ICSO8GPW only Examples CAPTURE PORTA Monitor location PORTA for any value changes CAPTURE CO Monitor RAM location CO for any value changes CAPTURE DO D1 D2 Monitor for any value changes in an array of locations M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 213 Debugging Command Set CAPTUREFILE or CF Open Close Capture File NOTE Syntax Use with Examples Operator s Manual The CAPTUREFILE command opens a capture file to record changed values If the specified file does not yet exist this command creates the file If the file already exists an optional parameter can be used to specify whether to overwrite existing contents R the default or to appen
74. not step into the interrupt Instead it will execute the whole interrupt and stop on the instruction returned to after the interrupt M68ICSO8GP In Circuit Simulator Rev 1 0 172 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger MONO8 Debugging Limitations and Tips The following tips provide useful insight 1 Single stepping is allowed in both RAM and ROM 2 The first breakpoint set is always a hardware breakpoint and any additional breakpoints set are software breakpoints To make sure that a hardware breakpoint is being set use the NOBR command before setting it Hardware breakpoints will stop execution in ROM and RAM Software breakpoints will stop execution only in RAM 3 Experiment with the register interpreter Use the R command for this 4 Code may be loaded only into RAM When doing this observe limitation number 7 To load code into FLASH memory use the PROGOSSW programmer included in this kit 5 Executing an SWI instruction while running is functionally equivalent to hitting a breakpoint except that execution stops at the instruction following the SWI 6 Ahardware breakpoint may be used to trap a data read write to anywhere in the memory map The ICD08SW debugger stops at the instruction after the one that accesses the data location To trap a read write to address 22 for example first use the NOBR command to make sure that no breakpoints are set Then set the hardware breakpoi
75. ord tbi AR e E Ene ENEE daras 66 source window lesser 51 dran PEPPER LEE 52 stat s Dale 2o nein e dhedawes ote re Oe does lues PING ed dues 21 tle bat ri a a 50 Olba os cu oo he RVeRPIAEReeFPG4 ee RS DEEL PRSE OLI PR ES 56 user interface eere 48 Window options 132292 RENT RO x ards PEENE EEES RETI aden 84 Arrange A nen a ae E eae E E EA aS 87 Cascadas ba ERE Udo d ode a 85 Minimize All 2 eiie RAI ERR IA T Eher IMPR Ie E d ee 88 BD Seres E exa r3 pda d E EE x ee eke wee 89 A via i EET 86 WIBOOWS cese reed bel E sp ohne ee ee Reo Re E PS 49 WINIDE INI file RII 32 66 word Wal C Tr E n 21 24 Xcommand sls 320 X index register VAG Ceres ee plane raro Ede E 136 AXREG conimand 2 oce TREE SS ape DEDERE edd 320 7 COMMANG 23 intra Rh thes RAN LAUNE DIES 321 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 407 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 408 Index MOTOROLA Motorola reserves the right to make changes without further notice to any products herein Motorola makes no warranty representation or guarantee regarding the suitability of its products for any particular purpose nor does Motorola assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability including without limitation consequential or incidental damages Typic
76. start execution of user code RUN Start execution of code at the current PC current or specified address The G GO and RUN commands are identical M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual ICDO8SW In Circuit Debugger 189 ICDO8SW In Circuit Debugger Table 9 1 ICD08SW Command Overview Sheet 4 of 5 Command SAVEDESK SHOWCODE Description Save the desktop settings for the ICS08GPW program when it is first opened or for use with the LOADDESK command Display code in the Code windows beginning at the specified address but without changing the value of the PC SHOWMAP SHOWPC SNAPSHOT View current MAP file The MAP command is identical Display code in the Code window starting from the address in the PC Save window data to the open log file SOURCEPATH SP SS Determine the path for source code that is not in the current working directory Assign specified value to the stack pointer used by the CPU and display in the CPU window Step through a specified number of source code instructions starting at the current PC address value then halt ST STATUS STEP Step through a specified number of assembly instructions starting at the current PC address then halt identical to the STEP and T commands Display the contents of the CPU registers in the Status window identical to the REG command Step through a specified number of assembly ins
77. the EXIT button iM Port Baud Rate COMI C COMA is C COME C COME M C COMI C COMP C 400 baud C COMA COME The bawd rete ix depeedent apon pour hardeses configuration ed por Figure 6 1 Can t Contact Board Dialog Window If the communication parameters for the communications port and baud rate are incorrect in the Can t Contact Board dialog window change them and then press the RETRY button If the board is not connected or the user doesn t want to use I O from the board then click the SIMULATION ONLY button Otherwise press the EXIT APPLICATION button When starting the ICS08GPW software for the first time the Pick Device dialog offers choices of different M68HC08 devices chips To open this dialog and change the device later enter the CHIPMODE command in the ICSO8GPW Status window command line NOTE Ifa file named STARTUP 08 exists in the current directory the WinIDE runs it as a macro file on startup See the MACRO command for more information M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 119 ICSO8GPW In Circuit Simulator User Interface 6 5 ICSO8GPW Windows The ICSO8GPW user interface consists of windows in which system and code information is shown and into which the ICSO8GPW command set can be entered Figure 6 2 The ICSO8GPW also displays these subwindows when appropriate e Stack window Trace window e Breakpoint windo
78. the Setup Environment option from the File menu to open the Environment Settings dialog 3 Enter environment options for the modules of the WinIDE development environment represented by the General Editor General Environment EXE1 EXE2 EXE3 and EXE4 Assembler Compiler tabs For the example project a In the General Environment tab choose the preferred environment options In the FILE Parameter passed to external program is text box enter the path and filename MAIN ASM b In the General Editor tab choose the editing options preferred c Inthe EXEI tab make sure the EXE Path text box points to the ICSO8GPW EXE path and filename and that the Options text box indicates the proper communications port if the pod is to be used d In the Assembler Compiler tab make sure these options are selected i The EXE Path text box indicates the path and filename for the CASMOSW EXE li The Type text box specifies the P amp E CASMOSW assembler iii To view the CASMOSW window during assembly check the Show Assembler Progress option in the Assembly Preferences section of the tab 4 Press the OK button to save the settings made in the Environment Settings dialog tabs and close the dialog Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 324 Example Project MOTOROLA Example Project Setting Up a Sample Project The environment is now set for the project To save it for later use 1 In the WinIDE se
79. the background Some items will allow only the foreground or background to be changed Press the OK button to accept the color changes Press the CANCEL button to decline all changes Change Window Colors Popup Selection Windows Selected Popup Selection Windows Disabled CPU Window CPO Register Hames CFU Window CPU Register Values CPU Window CPO Window Background i Hormal Codo Program Counter Preakpoint m TT Selected Code Window Hurmal Code Code Window Program Counter Figure 9 5 ICDO8SW Change Window Colors Window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 183 ICDO8SW In Circuit Debugger 9 5 6 CPU08 Window 9 5 6 1 Pop Up Menu Operator s Manual The CPU08 window shown in Figure 9 6 displays the current state of the 68HCO08 CPU registers The pop up window allows modification of these values CRUG olx ACCA mn HREG FF XREG FF PE FEZH CCR 14 1 20 SP FF Figure 9 6 ICD08SW CPU08 Window By pressing the right mouse button while the cursor is over the CPU window a pop up menu appears with the following options Set Accumulator Sets the accumulator to a user defined value Upon selecting this option the user is prompted for a value Set HREG Index Register Sets the H index register to a user defined value Upon selecting this option the user is prompted for a value Set XREG Index Register Sets the X
80. the board Syntax INPUTS Use with ICSO8GPW only Example INPUTS Show I O port input values Port A AA Port B 01 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 249 Debugging Command Set INT or IRQ Set IRQ Pin State 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 external interrupt is simulated as a level or edge level triggered interrupt depending on the IRQ bit in the MOR mask option register NOTE Ifthe M68ICSO8GP20 hardware pod is connected then the IRQ pin level comes from the circuit board and this command cannot be used to modify its value Syntax IRQ 0 1 Use with ICS08GPW and ICDOSSW Examples INT 0 Assign 0 to the IRQ pin IRQ 1 Assign 1 to the IRQ pin Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 250 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Open Close Logfile LF or LOGFILE The LOGFILE command opens an external file to receive log entries of the commands entered in the command line of the Status window and the system responses to those commands that appear in the Status window message area e If the specified file does not exist this command creates the file e Ifthe specified file exists an optional parameter can be entered to specify whether to overwrite e
81. the source code M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO8W Assembler Interface 105 CASMO8W Assembler Interface Table 5 4 Listing File Fields Continued Field M Contents Field Description cs The last field contains actual source code from the source code file Listing The listing table provides a summary of every label and its value table displayed in table format at the end of each listing file Example listing table MAIN1 ASM Assembled with CASMO8W 2 27 97 12 06 39 PM PAGE 2 0000 26 porta equ 0000 0000 27 portb equ 0001 0000 28 portc equ 0002 0000 29 portd equ 0003 0000 30 ddra equ 0004 0000 31 ddrb equ 0005 0000 32 ddrc equ 0006 0000 3 ddrd equ 0007 Symbol table DONSCN 08DD DONSCN1 08EE OPTSC 0866 OPTSE2 0877 OPTSC3 0888 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 106 CASMO8W Assembler Interface MOTOROLA 5 8 2 Labels CASMO08W Assembler Interface Pseudo Operations As the program code is written the user will not necessarily know the addresses where commands will be located The assembler solves this problem using a system of labels providing a convenient way to identify specific points in the program without knowing the exact addresses The assembler later converts these mnemonic labels into specific memory addresses and even calculates the offsets for branch commands for the CPU to use
82. to establish communication with the MCU The user M68ICSO8GP In Circuit Simulator Rev 1 0 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Troubleshooting the Quick Start will need to restart or retry the ICSOSGPW software while looking at the signals Using J7 pin 1 as the ground reference check for a signal that varies between 0 and 5 Vdc at J7 pin 10 board Vcc and J7 pin 4 SP RESET If these voltages are present the power is good but communication problems should be investigated as described in step 5 If the socket power LED comes on and stays on communication was probably established with the MCU Check for the following voltages at J7 using J7 pin 1 as the ground reference i Approximately 8 5 Vdc at J7 pin 3 and J7 pin 9 ii Approximately 1 25 Vdc at J7 pin 6 iii 5 Vdc at J7 pin 4 and J7 pin 10 If these voltages are present the power is good and the problem lies elsewhere 5 Make sure that the host PC can communicate with the MCU a The MCU s PTAO pin is used for host communications DDRA bit 0 should never be set to 1 as this interrupts monitor mode communications The target connector PTAO pins J2 pin 15 J4 pin 10 and J6 pin 7 are never connected to the MCU s PTAO pin they are wired only for probing purposes Make sure that the serial cable is correctly attached to the pod and to the correct serial port on the host computer Make sure that the cab
83. to execute the option New File Ctrl N Open File Ctrl O Save File Ctrl S Save File as Close File Ctrl D Print Print setup Exit Alt F4 Figure 4 6 WinIDE File Menu M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 59 WIinIDE User Interface 4 10 1 New File 4 10 2 Open File Operator s Manual Choose New File from the File menu to open a new client window in the WinIDE Main window The title of the new window in the title bar defaults to NONAME where reflects the number of new source windows created during this session If there is an active project the project name appears in the title bar If there is no project No Project precedes the window name Use this new window to enter source code When the contents of this window are saved the WinIDE editor prompts for a new filename This new filename replaces the NONAME in the title bar Alternatives Type CTRL N or click the NEW toolbar button This is the keyboard equivalent to choosing the File New File menu option Choose Open File from the File menu to open the Open File dialog window Figure 4 7 and choose an existing filename file type directory and network if applicable to open pen File 2 xi File name Folders d pemicro sample 1 Cancel charge asm e ds dcharge asm pemicro display asm ap 3 sample 1 eeprom asm equates asm init asm isr asm
84. to have the WinIDE editor attempt to recover error success information from the assembler compiler and open the file with the error line highlighted and displayed in the status bar when an error is encountered For this feature to work the Error Filename and Error Format options must also be set in this tab If this option is not checked the WinIDE editor will not look for a compiler result and will not display the results in the status bar Wait for compiler to finish Select this option to have the WinIDE editor disable itself until the compiler terminates This option must be selected for the editor to attempt to recover error success information from the assembler compiler Further turning this option on prevents the user from running external programs from the editor that may require compilation or assembly results If this option is not selected the editor starts the assembler compiler and continues letting Windows multitasking capabilities take care of the program Save files before Assembling Select this option to save all open files to disk before running the assembler This can be very important since the assembler compiler reads the file to be compiled from the disk and not from the memory of the WinIDE editor If the file being assembled isn t saved the assembler or compiler will assemble the last saved version For this reason this option should remain checked Error Format Click the down arrow to the rig
85. values e fno parameter is entered the BR command displays a list of all current breakpoints in the status window e fan address value is entered the BR command sets a breakpoint at the specified address An optional value lt n gt may be entered with the address to specify a break count The BR command sets a breakpoint at the specified address but code execution does not break until the nth time it arrives at the breakpoint The maximum number of breakpoint addresses is 64 Each BR BREAKA BREAKSP or BREAKHX 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 BREAKHX command is to duplicate one of those 64 addresses If source code is displayed in either code window mouse or keyboard commands can be used to set remove or clear all breakpoints 1 Position the cursor on the line of code where the breakpoint will be set 2 Click the left mouse button to select the line 3 Press the right mouse button once to open the Code Window Shortcut menu 4 Select Toggle Breakpoint at Cursor option If there is no current breakpoint set at this line of code a breakpoint will be set If there is a current breakpoint set at this line of code the breakpoint will be removed To remove all breakpoints enter the NOBR command in the Status w
86. which must also be in the module The user is then asked for a filename in which to upload S records The default filename extension is set to S19 if none is specified by the user Motorola S records are then written to the specified file 8 4 10 VM Verify Module For this command to work the user must have previously selected an S record file The S records are then checked to see if they all reside in the module to be programmed If not the user is asked for permission to continue If the answer is yes only those S record addresses that lie in the module are verified If a location could not be verified an error message is given indicating the address the contents of that address and the contents specified in the S record file 8 4 11 VR Verify Range Operator s Manual For this command to work the user must have selected an S record file previously The user is prompted for a starting address which must be in the module Next the user is asked for an ending address which must also be in M68ICSO8GP In Circuit Simulator Rev 1 0 168 PROGO08SW FLASH Programmer MOTOROLA 8 4 12 QU QUit PROGO8SW FLASH Programmer Programming Example the module S record addresses that lie in the module are verified If a location could not be verified an error message is given indicating the address the contents of that address and the contents specified in the S record file This command terminates the programmer a
87. with Example The UPLOAD_SREC command uploads the contents of the specified memory block range in S19 object file format displaying the contents in the status window If a logfile is opened UPLOAD_SREC puts the information into the logfile as well If the UPLOAD SREC command is entered sometimes the memory contents scroll through the debug window too rapidly to view Accordingly either the LOGFILE command should be used which records the contents into a file or use the scroll bars in the Status window This command is particularly useful in ICDO8SW where data from the real MCU can be captured to a logfile UPLOAD SREC startrange lt endrange gt Where startrange Beginning address of the memory block lt endrange gt Ending address of the memory block range ICSO8GPW and ICDOSSW UPLOAD SREC 300 7FF Upload the 300 7FF memory block in S19 format M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 313 Debugging Command Set V Set or Clear V Bit CCR The V command sets 1 or clears 0 the V bit in the condition code register CCR NOTE The CCR bit designators are at the lower right of the CPU window The CCR pattern is VI IHINZC V is overflow 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 correspond
88. 0 Executes code up to address 2FO M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 237 Debugging Command Set GOTOCYCLE Execute to Cycle Counter Value The GOTOCYCLE command executes the program in the simulator beginning at the address in the program counter PC Execution continues until the cycle counter is equal to or greater than the specified value until a key or the STOP button on the ICSO8GPW toolbar is pressed until it reaches a breakpoint or until an error occurs Syntax GOTOCYCLE lt n gt Where lt n gt Cycle counter value at which execution stops Use with ICSOS8GPW only Example GOTOCYCLE 100 Execute the program until the cycle counter equals 100 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 238 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Clear Half Carry Bit H or HREG The H or HREG command sets or clears the H bit in the condition code register CCR NOTE The CCR bit designators are in the lower portion of the CPU window The CCR pattern is VI IHINZC V is overflow 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 Use with ICS08GPW and ICDOSSW Examples H 1 Sets the H bit in the CCR H 0 Clears th
89. 05 Denver Colorado 80217 1 800 441 2447 or 1 303 675 2140 Customer Focus Center 1 800 521 6274 JAPAN Motorola Japan Ltd SPD Strategic Planning Office 141 4 32 1 Nishi Gotanda Shinagawa ku Tokyo Japan 03 5487 8488 ASIA PACIFIC Motorola Semiconductors H K Ltd Silicon Harbour Centre 2 Dai King Street Tai Po Industrial Estate Tai Po New Territories Hong Kong 852 26668334 Mfax Motorola Fax Back System RMFAX0 email sps mot com http sps motorola com mfax TOUCHTONE 1 602 244 6609 US and Canada ONLY 1 800 774 1848 HOME PAGE http motorola com sps Mfax is a trademark of Motorola Inc Motorola Inc 1999 M MOTOROLA M68ICS08GPOM D
90. 136 ADCLR command eee 198 ADDI command skriken ini e es 199 adding breakpomnts 222kack bh ERE RR E Re ise ARX RR ARR ERR 136 varlables 224g Ee Ai 124 address fields m isting T1622 esieva Geese ees ee doses Shes ee ee Seek REFERRE 96 Ad Sres whee poe deed a tow Gone nk be IPS D 105 ASCFO command rl at aan ees basa Rd eI 2 200 ASCII charactersue fer ears usar deed re dM ee A ree ae eret 339 CONSAN Sna tes ss mou Noe ns ALI sa 99 uic 117 format iu tl mcs aa de RIS ER s 127 ASCIIF3 command eee e 200 ASMcommand eeeeeeeeee eee ene 201 assembler COMMENTS osae sr ee uoo Boxe x RE Wn ee Robb ace de cR gerente s is ados 99 conditional assembly amp J 4 euxeaadte koi ras 102 Constants es che Loe ew Adee a A id a 98 descripto ode cues duet nies erent eee ne ps Pp E aba kx eas 42 directives ui a rs 97 99 100 102 103 111 ii PNE 109 His sects ee ast ete oe ite ae et sae coca Stan cattails ER 44 Interface d Re RESP hae Baud Phe Rad RBG Sad CR EET RRR 92 listing directives esos Ged ety hegre ne dye toad PER RH ESSE 104 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 383 op randS Joss eciducandtedoceshbciGecsnde douedeecicersnes sues 98 ui MP 66 third party cess RE Ru E esse ees Yu E PA axe 97 111 Assembler Compiler conditional assembly 2 esee eee rr 102 file DUNO Lu erp det RU Pap Rd Ed a Re iD pa nd t ded a AST BCS
91. 2hGcitecindedut cones decir dia ir 126 Memory Window Shortcut MEU a Se ee add 127 menus ANI A A a A a AS 58 microcontroller unit See MCU 2 ati tne aa e a a at a a A aa a e tates 25 MM command 22 bn ciinei a ated wid dete ak ae ed eos 126 269 modifying MEMO 1 eet eeu Eau pr EXE ERA eee see aes FERE E REN eds 126 Memory Bytes ic2cebeeeba b Ex ER RR ERE EE PARU E EEE eda 126 MONO08 sees 26 39 164 169 172 173 329 343 344 351 monitor mode See MONOS sucia di sae EN dy bho E eS E d 23 N NA 271 navigating in IDE environment s sossa denea cee eens 53 In SOUE TIES ui RESPONDE iN oh ee Pagus 54 No Trace Avallable sss ssa sessio eR br ee CEDAR LIS 134 NOBR command eee 2172 NOMAP command lee s 273 NOSYMBOL command eeeeeee RR I Re 274 number formats oce ME RDUM EE ltda 124 O Object fles TS 43 opcode TODBIHODIGS y el e Ra acd bebe a db ts A duced 98 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 396 Index MOTOROLA Index Open LoSH G socie EE se hese hen ENIM EA C EE PO qd nO ds 146 Open PIO REM 34 opening A a e a a A A E S S 146 WIDE lee a educatia ee ee 4a eee T USE Tr EX eric te ad 60 operating syst it A AAA C dq 27 Puoi 4 separe jr sensed ede dois pava peseta 79 ORG o Se eared ae EISE DERE sua Lia ed Lm CL eid 109 originate direti yec 53 dudo xe ve tad ea ER tota tere b qe x dx dde 109 Other Assembler Compiler scs ey REX REOR EE
92. 2i sakaco aaa RR ERREUR RR GR doe ERR 342 temperature Operating sos 24d ex dd IRA eke EUR ene ai ira d Ed RES 29 OA Los dm Educ edd eR EC RR A f RE RUE E a 29 AAA 52 ME codec iusso A a t 132 title bar WIDE ous gets dra dor ds week sed ie peux e kee E 50 Toggle Breakpoint at Cursor 0 0 0 0 cee eee eee eee 122 toolbar ICSOSGPW RTT 140 WIDE sus exei esther et ee rE E Geer tek soest EMEN 56 TRACEcommand eee ee 134 312 tracing frase DUE ais xad p ewe ede 134 trace buffer slot numbers nr xax Cr RR T ep iaa 134 A nE En EE e E REE E E A 134 ibl TR ee E E A E A E EEEE 74 Type surcar cda rra rada dci p dread 19 M68ICSO8GP In Circuit Simulator Rev 1 0 404 Index MOTOROLA Index O AAA seem eae che aan ened E chines PEN 81 Undo Witt LD Bisse he end Gee daa Se indes 63 UPLOAD SRECcommand eee 313 A COMIN 4c 15 46 oe Ra bee PC ROT code ate bea d d E dae d aired 314 values on stack os ovo enra onc edel aoa ace a Perna eae aaa diis 132 VAR command uie ex CR ERU Qr OR LR CEA KOUCR Hoe 315 variables cna rM TTE 124 choosing TUDOR arre ERATIS 125 Clearing cor mide a i P RE esta S d qug e oe 125 deleting 6 2 be ERE HEURE AR AM a RE be eR R ds 125 MAMAS uos era ai paa 124 Variables Window escort a A A AA Rae a ail VERIFY COMMANG tra ere rt ern ER T Sd ERA Ee Rd 316 VERSION command siii AERA eked out CREATA AA 317 viewing Drea POMS lt assames naa EORR SERIO PO NER RA E Rom dob 135 comman
93. 2ioss shear rb n3 44 ISOC Sieps asiesx spare quA t RR OS CTERETE REV XXE TS 44 Starting the ICSDSOGP BOB WA coe beo ER eee 45 Pod to Host Communication iaiiceaechses de heran rasa 45 Section 4 WinIDE User Interface LOB Loss du pP EET RP ROG LER PO EIS S OE Ed add d 47 d 1 0 APR 48 Windows Integrated Development Environment 49 SIDE Main VH ocn rri ERR pr 50 Main Window Fonctions 2 no be oo eee coria PER PLNS iuni 50 Main Window CompOnents ic 2 ce2seesieusseersevsades 50 MIMO SIME 6 cabo dine eheescgdiae sd ERA RE o dE EE dim 24 Prerequisites for Starting the WinIDE Editor 52 Starine the WinIDE Editor ss pnt ans EXE Vang S Edu anid eiai 3 pening Nngite PIBSueseesokusURRRAREERPRERRRA AE RT RA 24 Navigating in ihe WinIDE Editor soiosorsrornorar siarr raros 53 Usine n A A 54 Command Line Parameters ir AAA 55 WDE po Pc c Pr 56 MATE MODUS Le d COE b E e d x OR IRE aed t aao dcc NEG 58 M68ICSO8GP In Circuit Simulator Rev 1 0 6 Table of Contents MOTOROLA Table of Contents 210 Wille File Options cinsxissd ce dinesccnotessehedieesdaans 59 AI Tes AAA os 60 AUS Open PM ee ee ee ee ee re ee P ere eS ere 60 120 E A rrr ETT 61 AA cr 61 HIUS Close A 6l 2106 Pt Pile aspe ene ERES teod Red dd idR enact 62 WIT PO OT cop cre eh ERES RA RESUME E 62 A rrr 62 All Wine Edit One cease sc sek dibs eee nese tes deeusdens 63 ite Ult 65 A E QUE 60d ELE Pe 63 505 EM So erm 64 Blut Alatriste
94. 342 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Functional Description Using a target cable is optional and the board may be utilized with flying leads to other circuits The MCU can be either the 44 pin QFP version or the 40 pin DIP version On the ICSO8GP20 board socket XU1 supports the 40 pin DIP package and socket XU3 supports the 44 pin QFP package When the MCU resides on a target system the ICSO8GP20 board can communicate with the MCU over a 16 pin MONOS cable Motorola part number 01 RE91008W01 Either version of the MCU is supported when using the MONOS cable When using the ICSO8GPW simulation software the MCU provides the required input output information that lets the host computer simulate code performing all functions except for maintaining port values The internal FLASH memory on the device is downloaded with a program that generates the appropriate port values The ICSO8GPW software on the host computer lets the host computer become a simulator When the ICS requires port data the computer requests the data through the host s serial connection to the core MCU The core MCU responds by sending the data to the host via the serial connection It is this arrangement that allows a real world interface for the in circuit simulator The clock runs the MCU at a 4 9512 MHz external clock rate NOTE The simulation speed will be slower than this rate because the host computer is
95. 48 OO P 149 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 392 Index MOTOROLA Index Load SITI Bile 4 dL ent ede REOS ROLL POI eeihere n ide 144 Multiple SED teer edes p3cer A ee d e don 149 Open Logfile cse sess RR e Rr abi be ex eR ans e ER ES 146 Open WindOW 302143554 x rp sS XXE ede SR ERE EN d ES 151 Play MICI cancer 145 Record Macro Vins Lees eR Rex er PRU Y MS ES Y PE 145 R load DesEtOD misa nora roots 132 Reload Last 19 aspe ida de ur 144 Reset Processors lese e 149 Save DesktOP COLETTE 132 SIOP ceisdie dd bieenesit E E R E a ERE E rre 150 Stop MaCTO Mm 146 Stack Window n o ccc eee een es 132 stand alone mode 0 0 cc eee eee eens 43 je Pode ds a nm 33 Stat s WIDndOW isses cepto e ub ee a Feet Vane eee ed de 128 toolbar buttons ooooo e eee eee eee 53 140 Trace Window 0 0 ccc eee eee hs 134 USEr INtETLACE wave eee Nae ee ed He eee E EEO eS Ee CS 115 120 Variables Shortcut menu 0 0 0 ee een eens 124 Variables Window eese e 124 Window ODIOS ote eg apr E PPS is is 150 INGLUDE 5 ete REDE e qe POPE See V 325 INCLUDE directive o ooooooooooooonrrrr e eens 102 included files expanding gt oivchersiivadGesbasshbeadagekervesesharsae ake 75 USING od eue eeu ee ois dd dae pare eg Q4 ed pue Er eg 70 tndentation 2e oe a A Dae bah Se be ee cq 71 INFO command seeeeeeee ee 243 INPUTA
96. 5 2402420 2066404600s444440006 66 4 11 Specify Project File to Open Dialog Window 67 4 12 Specify Project File to Save Dialog Window 68 4 13 Environment Settings Dialog General Environment Tab 69 4 14 Environment Settings Dialog General Editor Tab 71 4 15 Environment Settings Dialog Assembler Compiler Tab 74 S IB EDU FormatList esesuy suasazgbe os ERE IRE bacs 78 4 17 Environment Settings Dialog EXE Tabs 79 4 18 Setup Fonts Dialog Window 22 3 cccievscevenseeidedievosees 80 Sl Seah Ris AAA 81 4 20 Find Dialog Window AL cesos car RES covey AAA 82 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA List of Figures 19 List of Figures Operator s Manual Figure Title Page 4 21 Replace Dialog WiMlOW iouis o42se42deesengie sd dag seuss 83 4 22 Goto Line Number Dialog Window 4 84 4 23 WinIDE Window Menu RATA keene ees 84 4 24 WinIDE with Subordinate Windows Cascaded 85 4 25 WinIDE with Subordinate Windows Tiled 86 4 26 WinIDE One Source Window Displayed Remaining Windows Minimized 4 lt 0 lt se 6ssse40504 87 4 27 WinIDE with Subordinate Windows Minimized 88 4 28 WinIDE Cascaded Windows with Active Window Split 89 5 1 WinIDE with CASMOSW Assembler Window Displayed 923 6 1 Can t Contact Board Dialog Window
97. 64 257 MEN ccr 65 SILS Porras qiio t OE pans dide ela 65 MAP IE rmm 65 SIL gee weacte yeh eueseee eens ES YTUEC RUE VPE YES 65 412 WinIDE Environment Opus 2 2cicaeccdoveocdietaiasedaned 66 AILE Upea PIGIERE 2 sce ses es tense RP ESSRE EL LEV ERIS EAS 67 A155 A 67 TIL Save Propo AG rr one 68 A129 O sk Loca dus GOES HU rei WR d 93 EA COAT 68 amp 1235 o A 68 4 12 5 1 General Environment Tabyecisriasdias do raso da 69 4 12 5 2 General Editor TID criar ras iaa 71 4 12 5 3 Assembler Compiler Tab rcoscirrri A RERERATEEP T3 4 12 5 4 Executable Tabs EXE D3 cc0r0saces dicts e RR RE LEES 78 HE SD POS rete eae ee eee eee ee 80 4 13 WiniDE Search TIONG as a ws dae a ded aegram Sca UR CR ER ca 81 OLN P bdosass skzesusehetdsbeasdd TX a E EE E dE ERE SR Kd 82 1312 Rphiheil o6sceweres Eu o9 OPERE IDEE aeo Ed TR PR E ES 83 HR A Dp he ee bo T EERTMES 83 SAG LME aia iso ko ARA EE RENE AER bh etna keene EAE 84 4 14 WInIDE Window Options 44 064ccs44i0esseo4se0sseusees 84 E e o Sa EET E T TEETE 85 5 oc eer ee PNE 86 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Table of Contents 7 Table of Contents Operator s Manual 4 14 3 4 14 4 4 14 5 ad Ja a 5 4 33 NT 3 9 4 2 5 3 5 5 4 3 9 9 5 6 5 6 1 5 6 2 M 5 7 1 CS 3 2 3 5 7 4 KONG 5 8 5 8 1 3 5 4 59 59 1 5 9 2 45 3 5 9 4 3 9 5 Cur for T As 87 Mimmo AN coss secet AAA AAA 88 d ERIT ITI nha E AA 89
98. 8 PTD4 B25 J3 27 19 PTD5 B26 J3 28 20 PTD6 B21 J3 29 21 PTD7 B22 J3 30 22 PTBO B17 J3 31 23 PTB1 B18 J3 32 24 PTB2 B13 J3 33 364 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Target Cable Pin Assignments Table B 8 Flex Target Cable M68CBLO5C and QFP Target Head Adapater MCTCO8GP20FB44 Sheet 2 of 3 QFP Package ICS08GP20 Target Head ICS08GP20 Pin Number Board Label Adapter Pin Number Pin Number 25 PTB3 B14 J3 34 26 PTB4 B9 J3 35 27 PTB5 B10 J3 36 28 PTB6 B5 J3 37 29 PTB7 B1 J3 39 30 VDDAD A1 J4 1 31 VssAD A13 J4 7 32 PTAO A18 J4 10 33 PTA1 A21 J4 11 34 PTA2 A22 J4 12 35 PTA3 A25 J4 13 36 PTA4 A29 J4 15 37 PTA5 A30 J4 16 38 PTA6 A33 J4 17 39 PTA7 A34 J4 18 40 VDDA A37 J4 19 41 Vesa A38 J4 20 42 XFC A4 J3 2 43 OSC2 A7 J3 3 44 OSC1 A11 J3 5 NC GND A3 J3 1 NC GND A8 J3 4 NC GND A17 J3 19 NC GND A26 J3 24 NC GND A39 J3 38 NC GND B34 J3 40 NC GND B27 J4 9 NC GND B20 J4 14 NC GND B8 J4 27 NC GND B6 J4 32 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 365 Technical Reference and Troubleshooting Table B 8 Flex Target Cable M68CBLO5C and QFP Target Head Adapater MCTCO8GP20FB44 Sheet 3 of 3 QFP Package ICS08GP20 Target Head ICS08GP20 Pin Number
99. 9 5 1 Status Window 9 5 1 1 Pop Up Menu Operator s Manual The following sections describe the Windows user interface for the ICD08SW in circuit debugger The Status window shown in Figure 9 1 serves as the command prompt for the application It takes keyboard commands given by the user executes them and returns an error or status update when needed E E Contact with HCUH Monitor established miter Code Version 4 Contact Fat abl i heed Trying security Code 500 500 00 500 00 00 00 S00 Success amaba porta Oo Figure 9 1 ICDO8SW Status Window Individual commands or a series of commands can be typed into the window or can be played from a macro file This allows the user to have a standard sequence of events happen the same way every time Refer to the MACRO command for more information It is often desirable to have a log of all the commands and command responses that appear in the status window The LOGFILE command allows the user to start stop the recording of all information to a text file which is displayed in the status window By pressing the right mouse button while the cursor is over the status window the user is given a pop up menu which has the option Help Displays this help topic M68ICSO8GP In Circuit Simulator Rev 1 0 176 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger User Interface 9 5 1 2 Keystrokes These keystrokes are v
100. A 2 BHI 0172 00 04 4 BRSET 0 04 012F 29 00 BHCS 010D 08 23 7 BRSET 4 23 018C Checksum 2A Checksum of the first S1 record The 16 character pairs shown in the code data field of Table A 5 are the ASCII bytes of the actual program The second and third S1 code data records each also contain 13 19 character pairs and are ended with checksum 13 and 52 respectively The fourth S code data record contains 07 character pairs and has a checksum of 92 Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 338 S Record Information MOTOROLA A 6 3 S9 Termination Record S Record Information S Record Example The S9 termination record is described in Table A 6 Table A 6 S 9 Header Record A 6 4 ASCII Characters M68ICSO8GP In Circuit Simulator Rev 1 0 Field ea Description Type S9 S record type S9 indicating a termination record Record length 03 o i three character pairs Address 0000 4 character 2 byte address field zeroes Code Data No code data in an S9 record Checksum FC Checksum of S9 record Each printable ASCII character in an S record is encoded in binary Table A 6 gives an example of encoding for the S1 record The binary data is transmitted during a download of an S record from a host system to a 9 or 16 bit microprocessor based system Operator s Manual MOTOROLA S Record Information 339 S Record Information Operator s
101. AD command 0 0 cc RR RR RR 254 Load STIS EIG ebbe ERU SE ed Se te ee 144 LOAD BINcommand eee RR ee 259 LOADALL command eeeeeee RR RR 255 LOADDESK command eee 256 loading map files ui tar clara ap R RE GAS RARE Ed Rada 144 LOADMAP command 0 0 eens 257 LOADV command 00 cece Re 258 LOADV BINcommand eee e 260 Cub PMCT C a aS 117 OPA eva id eee eee ess 146 SPECIES Lee obi e RR LRD INA OCA quU EE E eee AGE EAS rd de 146 LOGFILE command eeeeeeeeeee eens LIT Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 394 Index MOTOROLA Index M M68HCOS Serial Programmer See SPOMR rca raras 23 M6sICSOSGP in circuit simulator kit COHIDODEIS teja e dol a eee ir we du ei ds 26 MESCTIPUON s retinas 25 feats 1 2 wel cats Peed eee vods s Paese pede acted s 28 Nard WAL 2 nnn So ah Oe be ee rcx expe qp a tg See ew Qd EE 26 29 ud ule e 31 M68SPGMROS Serial Programmer See SPGMR secisersnerisia hbri Pers heteseea pride dme v dde 25 Machine Cycles saoe rosie dos cry d x rap bay dee ELA d Rede d e doe 105 MACRO commiand etes xa RUP YU RC n eR ERU C KO deeds 261 NISCHCEHIFBOH VES b e xat PE ea YEA PRIVEESdUERAA YEA UP E reas PE 103 MACROEND command siii Rxhe Ra AAA OERE S REA 263 macros EXPAD E oceano rs SHOES V kb deed dd 75 forward referencing 2 uus rr a as 104 J
102. AP Wile AA 219 Clear User Symbol oos o see rwv Ea E Var v d 220 Show Disassembled Code 221 Set Simulator Colors 246s skeseseecaews ess 222 Set Cycles Counter oos dd ado qs Rn 223 Disassemble Memory ccosicesirrricos sh 224 Set Port A Direction Register 225 Set Port B Direction Register ici ccicic s 226 Set Port C Direction Register 227 Set Port D Direction Register 228 Set Port E Direction Register 1 osos 229 Dump Memory to Screen losers 230 Evaluate Exige osse 2 e OFEN IE YES 231 Operator s Manual MOTOROLA Debugging Command Set 193 Operator s Manual EXIT or QUIT G GO or RUN GOEXIT GONEXT GOMACRO GOTIL GOTOCYCLE H or HREG HELP HX I INFO INPUTA INPUTB INPUTC INPUTD INPUTE INPUTS INT or IRQ LF OR LOGFILE LISTOFF LISTON LOAD LOADALL LOADDESK LOADMAP LOADV LOAD BIN LOADV BIN MACRO MACROEND MACROSTART MACS MAP MD or MD1 MD2 MM or MEM N Debugging Command Set Exit Uull ApplcallON c cocioborinorrad as 232 Begin Program Execution iius sisse co n 233 Execute Without Breakpoints Debugger 234 Execute Past Subroutine Interrupt 235 Execute Macro after Break i212 s ececdasde 236 Execute Until Address cosrusisriirsa 237 Execute to Cycle Counter Value 238 Set Clear Half Carry Bit 12 cosas 230 EA 240 Set H X Index Register Pair cocosorsoosss 241 Set Clear Interrupt Mask i cd
103. BELL 3 Ring PC bell three times M68ICS08GP In Circuit Simulator Rev 1 0 202 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Block Fill Memory BF or FILL The BF or FILL command fills a block of memory with a specified byte word or long value The optional argument specifies whether to fill the block in bytes B the default 8 bits or in words W 16 bits The ICDO8SW debugger can also supply the argument as type long L 32 bits MOTOROLA Syntax BF B W L lt startrange gt lt endrange gt n Where lt startrange gt Beginning address of the memory block range lt endrange gt Ending address of the memory block range lt n gt Byte word or long value to be stored in the specified block If the byte variant B is used then n must be an 8 bit value If the word variant W is used then n must be a 16 bit value If the long variant L is used then n must be a 32 bit value ICDOSSW only Use BF with ICSO8GPW and ICD08SW Use FILL with ICD08SW only Examples BF CO CF FF Store FF in bytes at addresses CO CF BF W 300 31F 4143 Store word value 4143 at addresses 300 31F M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual Debugging Command Set 203 Debugging Command Set BR NOTE Operator s Manual Set Instruction Breakpoint The BR command displays or sets instruction breakpoints according to its parameter
104. Byle FDB ccaivsceeeiveusaebeneeehene ees 109 5 9 4 COS ORG oaa ace Sore bei be dave vai ad 109 3 5 5 Reserve Memory Byte RMBD osscesassuba uhr 109 510 Assembler Error Messager 2 05 cius E RI ERR RR REFER RARE 109 311 Using Files from Other Assemblers ooooommrscirsrosns sos 1 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO08W Assembler Interface 91 CASMO8W Assembler Interface 5 2 Introduction Operator s Manual This chapter describes the operation of the CASMO8W assembler including methods for interfacing with the assembler from the WinIDE setting assembler options and directives generating and using output files and formats and understanding assembler generated error messages To be used in the target microcontroller CPU the source code for the program must be converted from its mnemonic codes to the machine code that the target CPU can execute The CASM assembler program accomplishes this by reading the source code mnemonics and assembling an object code file that can be programmed into the memory of the target microcontroller Depending on the parameters specified for the assembler other supporting files can be produced that are helpful in the debugging process When the user clicks on the ASSEMBLE COMPILE FILE button or uses the F4 hotkey in the WinIDE the CASM cross assembler is activated to process the active file in the WinIDE main window according to the parameters entered In additio
105. C2 Crystal amplifier output 9 PTA3 KBD3 PTA lt 3 gt Bidirectional Port A I O keyboard interrupt bit 3 10 OSC1 OSC1 Crystal amplifier input 11 PTA2 KBD2 Port A I O keyboard interrupt bit 2 12 RST TGT_RST In or out External reset 13 PTA1 KBD1 PTA lt 1 gt Bidirectional Port A I O keyboard interrupt bit 1 14 PTCO Port C I O bit O 15 PTAO KBDO TGT PTA 0 Bidirectional 9A VO Keyboard interrupt bit O 16 PTC1 TGT_PTC lt 1 gt Bidirectional Port C I O bit 1 17 Vssap VREFL po en ADC analog ground voltage reference low 18 PTC2 PTC lt 2 gt Bidirectional Port C I O bit 2 19 VppAp VnEFH TGT VDD ADC analog power voltage reference high 20 PTC3 TGT_PTC lt 3 gt Bidirectional Port C I O bit 3 21 PTB7 AD7 PTB lt 7 gt Bidirectional Port B I O ADC input bit 7 22 PTC4 PTC lt 4 gt Bidirectional Port C I O bit 4 23 PTB6 AD6 PTB lt 6 gt Bidirectional Port B I O ADC input bit 6 24 PTEO TxD PTE lt 0 gt Bidirectional Port E I O bit O SCI transmit data 25 PTB5 AD5 PTB lt 5 gt Bidirectional Port B I O ADC input bit 5 26 PTE1 TxD PTE lt 1 gt Bidirectional Port E I O bit 1 SCI receive data 27 PTB4 AD4 PTB lt 4 gt Bidirectional Port B I O ADC input bit 4 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 356 Technical Reference and Troubleshooting MOTOROLA Technical Reference an
106. CPU window double click on the value and enter the new value in the dialog box Press OK to close the dialog and save the new value To change the CPU CCR values double click the CCR value in the CPU window to open the Change CCR dialog Figure 6 14 Change the H I N V Z or C CCR bits by pressing the button below each to toggle condition code register bits between 1 on and 2 off Press OK to close the dialog and save the values s p op ond s s Figure 6 14 Change CCR Dialog Window To change the CPU stack pointer SP value from the CPU window position the cursor in the CPU window and click the right mouse button to open the CPU shortcut menu Choose the Set Stack Pointer option In the Change SP Value dialog enter the new value Press OK to close the dialog and save the value M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 131 ICS08GPW In Circuit Simulator User Interface 6 10 2 CPU Window Keyboard Commands Use these keyboard commands to navigate in the CPU window e Press the Fl key to shows the help contents topics e Press the ESCAPE ESC key to move the cursor to the command line of the Status window 6 11 Cycles Window Use the Cycles window Figure 6 15 to view the number of processor cycles that passed during execution of code in the simulator This is valuable when counting the number of cycles that a section of code req
107. CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 285 Debugging Command Set RESET Simulate Processor Reset The RESET command resets the MCU and sets the program counter PC to the contents of the reset vector This command does not start execution of user code Syntax RESET Use with ICS08GPW and ICD08SW Example RESET Reset the MCU Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 286 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Reset and Restart MCU RESETGO The RESETGO command simulates a reset of the MCU sets the program counter PC to the contents of the reset vector and then starts execution from that address Syntax RESETGO Use with ICSO8GPW only Example RESETGO Simulate reset of the MCU and start execution of code M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 287 Debugging Command Set SCCLR Clear SCI I O Buffers The SCCLR command can be used to flush the input and output buffers for SCI simulation This will reset the circular buffers and clear out all values Notice that if the SCI is currently shifting a value this command will not prevent the SCI from finishing that transfer See SCDI and SCDO for accessing the input and output buffers of the SCI interface If the M68ICSO8GP20 hardware pod is connected SCI inputs and outputs are direct
108. Circuit Simulator Rev 1 0 166 PROGO08SW FLASH Programmer MOTOROLA PROGO8SW FLASH Programmer Programming Commands 08P file is shown in the 08P file selected window After a 08P file is selected the user is prompted for the base address of the module This address is used as the beginning address for the module during programming and verification 8 4 3 EM Erase Module This command erases the entire module If the entire module is not erased an error message is given 8 4 4 PB Program Bytes The user is prompted for a starting address which must be in the module The user is then shown an address and a byte Pressing the ENTER key shows the next location The user can also enter in hex a byte to be programmed into the current location Failure to program a location entering an invalid hex value or exceeding the address range of the module will exit the program bytes window If a location fails to program an error message is given The symbols and may be appended to the value being written Respectively they increase the address default decrease the address and hold the address constant 8 4 5 PM Program Module For this command to work the user must have selected an S record file previously The S records are then checked to see if they all reside in the module to be programmed If not the user is asked for permission to continue If the answer is yes only those S record addr
109. Circuit Simulator Rev 1 0 226 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Port C Direction Register DDRC The DDRC command assigns the specified byte value to the port C data direction register DDRC Bits assigned O denote input pins bits assigned 1 denote output pins Syntax DDRC n Where lt n gt The byte value to be placed into DDRC Use with ICSO8GPW only Examples DDRC 03 Set the lower two bits of port C pins as outputs set the others to be inputs DDRC FF Set all port C pins to be outputs M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 227 Debugging Command Set DDRD Set Port D Direction Register The DDRD command assigns the specified byte value to the port D data direction register DDRD Bits assigned O denote input pins bits assigned 1 denote output pins Syntax DDRD lt n gt Where lt n gt The byte value to be placed into DDRD Use with ICSO8GPW only Examples DDRD 03 Set the lower two bits of port D pins as outputs set the others to be inputs DDRD FF Set all port D pins to be outputs Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 228 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Port E Direction Register DDRE The DDRE command assigns the specified byte value to the port E data directi
110. DO8SW EXE the limited real time in circuit debugging software e Documentation is this manual M68ICSO8GP In Circuit Simulator Operator s Manual 1 4 Hardware and Software Requirements The ICSO8GP software requires this minimum hardware and software configuration e AnIBM compatible host computer running Windows 95 or later version operating system Approximately 640 Kbytes of memory RAM and 2 Mbytes free drive space e A serial port for communications between the M68ICSOSGP pod and the host computer M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Introduction 27 Introduction 1 5 Toolset Features The M68ICSOSGP toolkit is a low cost development system that supports editing assembling in circuit simulation in circuit emulation and FLASH memory programming Its features include Operator s Manual Editing with WinIDE Assembling with CASMOS FLASH memory programming with PROGOSSW In circuit and stand alone simulation of M68HC908GP MCUs with ICSOSGPW including Simulation of all instructions memory and peripherals Optional simulator pin inputs from the hardware Conditional breakpoints script files and log files Limited real time emulation and debugging with ICDO8SW including Loading code into RAM Executing real time in RAM or FLASH One hardware breakpoint in FLASH Multiple breakpoints in RAM On line help documentation for all software So
111. E Action decimal or hexadecimal CYCLE_ADDER_OFF CYCLE_ADDER_ON Start accumulating instruction cycles Stop accumulating instruction cycles and print the total INCLUDE Include specified file in source code MACRO Create a macro MACROEND End a macro definition RAMEND Set logical end of RAM space RAMSTART Set default for ramloc pseudo operation Conditional Directive Sets the value of its parameter to true SET Action Maximum number of SETs is 25 SETNOT Determines the block of code to be used for IF or IFNOT Provides alternative to ENDIF when precedes ELSEIF Sets the value of its parameter to false Maximum number of SETNOTs is 25 conditional assembly the code between the IF and ENDIF will be assembled if the given parameter value is true the code between IFNOT and ENDIF will be assembled if the parameter value is false ENDIF for example if the parameter value is true the code between IF and ELSEIF will be assembled but the code between ELSEIF and ENDIF will not be assembled If the parameter value is false code between IF and ELSEIF will not be assembled but code between ELSEIF and ENDIF will be assembled ELSEIF gives the same alternative arrangement to a directive sequence that begins with IFNOT ENDIF See IF IFNOT ELSEIF M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual CASMO8W Assembler Interface 101 CASM
112. EA XR EER REP ANS 76 Output Debug File iis SURE ESSE EE EUR RES ERN ones 15 O tp t Listing Files sonido rhe dep a RR Rd eii i PE ERU RE 75 Output S19 ODIO dace en oboe nar ew dace a dais d ex iac 75 P parameters COMMANOHING NER EE NETETITE oa ee TOT TT CE TOT t TT 55 ICDOSSW suas Eu ote bo ir ir SCR a A 175 OS AAA 94 PROGUGSW asaltada 165 WADE uu etic IAS AD PA A 55 pans list selerekan pages ees sess eeu qx E eda ees qon ia d ari a ons 367 pasting TELE eceran Ea r EE CE E HERPES eR Cache 65 pulli EXE wood vistos xo bd edel vindex sees dfe Geese ae 74 PC commande catar veux xx bh IR RR a RO KO RR Lae ade 275 UI AE on E P 74 EA dussbs sdueRbR MEEXO ES RING ER RMEER I nes PEDE S tees 145 pod communications eeeeee es 21 32 45 118 description issue E rea X RR CR ROC ed 26 43 52 342 344 installation 0 RR RR RR Ie 31 35 37 POWER cori uh oak dud oe eae ak oon es aia eed 32 38 52 troubleshooting Lusso age eed e God ee A aoe eee ERRARE REO 344 345 POD commands oo a ed cac ue RE IE ole RT OP CH UR oh rade wus 276 PORTA Command ge Rs tat e Ra hes ERU OC RR CR ER eoa ATI POR TB command asu cio 250 3x bid ud4erd d ERA bi 278 POR PC COSI sio a e wa o rs Sah Sag isa alos 279 PORTO Command 222 deo aca rar Rob dora ER X RR RR AER ae od 280 PORTE COMMIANO d eiod d kd ache ea 9 ELO le P t d 281 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 397 ports seral an a O EA E a
113. ESK Save the desktop settings for the ICS08GPW program when it is first opened or for use with the LOADDESK command SCCLR Clear SCI I O buffers SCDI Enter input to SCI SCDO View outputs from SCI SCRIPT Execute a macro file containing debug command sequences identical to the MACRO command Display the contents of memory locations in the Memory SHOW window beginning at the specified address identical to the MD command SHOWBREAKS Open window displaying breakpoints used in the current debug session and allow modifying breakpoints Display code in the Code windows beginning at the specified SHOWCODE address but without changing the value of the PC SHOWMAP View current MAP file identical to the MAP command SHOWPC Display code starting from address in the PC in the Code window Display the Trace window with the last 1024 instructions SERVARE executed since the TRACE command issued Switch from in circuit simulation hardware pod connected to SIMO8 stand alone simulation no pod connected SNAPSHOT Save window data to the open logfile SP Assign specified value to the stack pointer used by the CPU and display in the CPU window SPCLR Clear SPI input output SPDI Enter SPI inputs SPDO View SPI outputs M68ICSO8GP In Circuit Simulator Rev 1 0 160 Debugging with ICS08GPW MOTOROLA Debugging with ICSO8GPW Command Set Summary Table 7 2 ICS08GPW Command Overview Sheet 6 of 7
114. Environment Settings x EXE4 Simulation EXE1 In Circuit Simulator EXE2 Programmer EXE3 In Circuit Debugger Assembler Compiler General Editor General Options Word Wrap X Auto Indentation C Wrap to Window X Create Backup O Wrap to Column Word Wrap OFF X Cancel Tab Settings Fixed Tabs Real Tabs Smart Tabs Filename Types E i Assembly files RES C source Files c Include Files inc Text files 7 txt i z Ali tiles 7 xl New File Filter Example doc New Filter Description Ex Documents Add New Filter Figure 4 14 Environment Settings Dialog General Editor Tab M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinIDE User Interface 71 WinIDE User Interface General Options Operator s Manual Auto Indentation Select this option to place the cursor in the column of the first non space character of the previous line when the ENTER key is pressed If this option is not checked the cursor goes to the first column For example if the current line begins with two tab spaces pressing the ENTER key will begin the next line with two tab spaces aligning the new line under the first text of the previous line Create Backup Select this option to create a backup file whenever a file is saved The WinIDE editor will copy the current disk version of the file the last save to a file of the same name with the BAK e
115. File 1CSOSGPW HC20PWM1 ASM TCNTL equ TMODH equ Status Pass 2 Assembling THODL equ TSC8 equ TCH8H equ Tene equ Current Line 32 Total Lines 32 TSC1 equ TCH1H equ 4 UNBUF INIT set up channel x for unbuffered PUM mou TOE 36 PRESCLR TSC stop and reset TIM select prescaler TOE ldx TSC6 CHOFFSET point to channel x SCR H reg 90 lda CHIE MOD EDG TOU sta x store channel ICAP control info lda DUTYHI specified duty cycle sta 1 x store in timer channel reg lda DUTYLO sta 2 x x x x x x x x T T T T T T T T T T T T T T T T T T rr mou PERHI TMODH store specified period mou HPERLO TMODL cli enable CPU interrupts delete this line if polling bclr BIT5 TSC enable timer counter Bytes 3176 Insert Figure 5 1 WinIDE with CASMO8W Assembler Window Displayed M68ICSO8GP In Circuit Simulator Rev 1 0 Operators Manual MOTOROLA CASMO8W Assembler Interface 93 CASMO8W Assembler Interface 5 4 Assembler Parameters The CASMOSW assembler may be configured by passing parameters in either of two ways From the WinIDE editor as described in 4 7 Command Line Parameters and 4 12 5 3 Assembler Compiler Tab From the command line by using Windows 95 or later version Program Item Property dialog Refer to the Windows documentation for information on this procedure The following parameters may be entered in any order To specify multiple pa
116. GE UP key to scroll the Code window up one page Press the PAGE DOWN key to scroll the Code window down one page Press the F1 key to show the help contents topic Press the ESCAPE ESC key to move the cursor to the command line of the Status window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 123 ICS08GPW In Circuit Simulator User Interface 6 7 Variables Window The Variables window Figure 6 6 displays current variables during execution Use the Variables Shortcut menu to add or remove variables from the current list lt Yariables Ioj x DDRA SFE DDRB 00 Add Variable Delete Variable Clear All Help Figure 6 6 Variables Window with Shortcut Menu 6 7 1 Displaying the Variables Shortcut Menu To display the Variables Shortcut menu position the cursor in the Variables window and click the right mouse button 6 7 2 Variables Shortcut Menu Options The Variables Shortcut menu offers these options for managing variables Add Variable Choose this option to open the Add Variable dialog Figure 6 7 to add a variable or address to the current variable list Select the variable type size and base Enter values for commands in the simulator as either labels which the user has defined in the map file or with the SYMBOL command or as numbers Specify the base in which variables are shown using the options in the Add Variable d
117. ICS08GPW In Circuit Simulator User Interface 115 ICS08GPW In Circuit Simulator User Interface 6 3 1 ICS08GPW Simulation Speed The user should be aware of a difference in speed between simulation and in circuit simulation Simulation is generally faster but does not involve real input and output The software can be set for simulation at startup by using the SIMO8 command In addition if power to the pod is off at startup the user will have the option of choosing simulation from the buttons in the communications error window In circuit simulation is slower but involves real input and output The POD command allows the user to reconnect to the module for in circuit simulation 6 3 2 System Requirements for ICS08GPW The ICSOSGPW runs under Windows 95 or later versions The host computer should have a minimum of 2 Mbytes of RAM system memory available for assembly processes as well as sufficient disk space to store the files that the ICSO8GPW creates 6 3 3 File Types and Formats Use a number of file types in conjunction with the ICSOSGPW simulator The following topics describe the use and structure of each type e 19 Object Files The ICSO8GPW software accepts any standard Motorola S19 files as input for simulation S19 object files can be created by any HC08 assembler such as CASMO8W and contain the actual object code that is simulated by the ICSOSGPW Specify the S19 files to be used on the command line or load them
118. ICSO8GP In Circuit Simulator Rev 1 0 El Register Files Execute the LOGFILE command closes the current logfile Open the Register Block window Display ICSO8GPW Help Operator s Manual MOTOROLA ICSO8GPW In Circuit Simulator User Interface 141 6 18 ICSO8GPW Menus Operator s Manual ICS08GPW In Circuit Simulator User Interface Table 6 3 summarizes WinIDE menus and options Table 6 3 ICS08GPW Menus and Options Summary Menu Option Description File Load 19 File Open the Specify S19 File to Open dialog to choose S19 file o eee ems or a Play Macro Open the Specify Macro File to Execute dialog Record Macro Open the Save As dialog Stop Macro Close the macro or script file Open Logfile Executes the LOGFILE command Close Logfile Executes the LOGFILE command Exit Close the ICSO8GPW simulator Execute Reset Processor Reset the emulation MCU and program counter to the contents of the reset vector Step Execute the STEP command Multiple Step Execute the STEPFOR command Go Execute the GO command Stop Stop code execution Repeat Command Repeat the last command entered in the Status window command line Windows Code 1 Toggles the Code 1 window open closed Code 2 Toggles the Code 2 window open closed Memory Toggles the Memory window open closed Variables Toggles the Variables window open closed Cycles Toggles the Cycles window open closed Status Toggles the Status window open clo
119. In Circuit Simulator Table of Contents Section 1 Introduction 1 1 LOB os oo oy oes ee hee hoe as ee hae eon cee 25 12 S lc c M RTI 25 13 Toolkit E CRON Ln eue dud ob X RE heres Shee EAE 26 14 Hardware and Software Requirements 0 06 02s02004 27 13 Taolet PARIDAS lA 28 1 6 a AAA A Cd Io rd on UR RAO 29 L3 Typogtaphi GOBVEDIODE AA 29 1 8 Quick Start Isis audias dh repe bx Ea ba 31 1 9 MC68HC908GP Security Feature ociosa RA 34 Section 2 Hardware Installation 2 1 o A 35 Za A A A 35 23 Configuring the In Circuit Simulator Board 36 245 Assembling the Hardware Pod c2ccicaccdacecotasedesdenes 37 223 Connecting toa Target System eoa sides ese es Weser Res 38 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Table of Contents 5 Table of Contents Operator s Manual 3 1 3 2 4 3 3 3 1 3 3 2 3 3 3 3 3 4 IAS 3 4 3 4 1 3 4 2 3 4 3 4 1 4 2 4 3 4 4 4 4 4 4 2 4 5 4 5 1 4 5 2 4 5 3 4 6 4 6 1 4 7 4 8 4 9 Section 3 Software Installation and Initialization CONNIE ARS 4 o rrr 41 ICSO8GP Software Components iuessascavc bete RE RRES canes 41 WADE EMO ibd eX 933 ESO ER A RO HEC ORE PALA 42 CASMUSW Assembler 2ii42ssescsuusshscsetesudese esa 42 ICSOSGPW In Circuit Simulator nnana er E RR RES 43 ICDOSSW In Circuit Debugger ICD 4 secs eese 43 PROGOSSW FLASH Programmer 2 22222 22 x rg 43 Installing the ICS0SGP Software 2
120. KHX command is entered without an address value the accumulator breakpoint does not show in the Breakpoint window If the BREAKHX command is entered with an address value the accumulator breakpoint may be cleared by 1 Enter the NOBR command 2 Position the cursor on that address in the code window Then press the right mouse button and select the Toggle Breakpoint at Cursor menu item M68ICSO8GP In Circuit Simulator Rev 1 0 208 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set HX Register Breakpoint continued BREAKHX Syntax BREAKHX lt n gt lt address gt Where lt n gt lt address gt Use with ICS08GPW only Examples BREAKHX A9 BREAKHX BREAKHX A9 400 M681CS08GP In Circuit Simulator Rev 1 0 Index register value that triggers a break in execution Optional address for the break in execution when the index register value equals n Break execution when the HX register value equals A9 Cancel the HX register breakpoint Break execution at address 400 if HX register value equals A9 Operator s Manual MOTOROLA Debugging Command Set 209 Debugging Command Set BREAKSP NOTE Operator s Manual Set Stack Pointer Breakpoint The BREAKSP command sets a stack pointer breakpoint to halt 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 as
121. LES parameter substitution Main Filename Select this option to use the filename in the Main filename edit box as the SFILES parameter substitution NOTE When using include files the user must enter the full pathname of the file containing the included files in the Main filename edit box Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 70 WinlDE User Interface MOTOROLA WinlDE User Interface WinlDE Environment Options If Modified files exist just prior to external program execution All executable programs which can be launched from the WinIDE editor offer the option to save all open editor files before the executable is launched Give user option to save each file Select this option to be prompted to save each modified file before the external program is launched If this option is not selected the external program runs without asking for confirmation The result may be that an external program runs while modified files exist in the editing environment a circumstance that may be undesirable and lead to incorrect results 4 12 5 2 General Editor Tab Click the General Editor tab in the Environment Settings dialog Figure 4 14 to bring the General Editor tab to the front Use the General Editor tab to change editing options such as indentation word wrap tab settings and filename types NOTE To change font options choose the Setup Fonts option from the Environment menu
122. LETE key This is the keyboard equivalent to selecting the Edit Delete menu option Choose Select All from the Edit menu to select all text in the active source window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 65 WinIDE User Interface 4 12 WinIDE Environment Options Operator s Manual This section describes the WinIDE Environment menu options for managing project information and setting up environment and font settings for a project Environment settings represent the current environment and configuration information for the WinIDE editor These settings are stored in the WINIDE INI file from which they are loaded each time the editor is started and saved each time the editor is exited When the editor is started the application opens the WINIDE INI file and reads the project information If there is an open project the project file s environment settings are read and used instead This lets the user have different environment configurations for different projects Environment information stored in the WINIDE INI file includes e ts name if a project is open e Current font information e Current source directory and project directory paths The preferences and options set in the Environment Settings dialog tabs including General Environment options General Editor options Executable options for assembler debugger compiler and programmer To
123. Latches PORTE or PRTE NOTE Ifthe M68ICSO8GP20 hardware pod is connected the system sends the n parameter value of this command to the board Syntax PORTE lt n gt Where lt n gt The new value for the port E output latches Use with ICSOS8GPW only Example PORTE 03 Set the port E output latches to 03 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual The PORTE command assigns the specified value to the port E output register latches The PRTE command is an alternate form of the PORTE command MOTOROLA Debugging Command Set 281 Debugging Command Set QUIET Toggle Window Refresh The QUIET command toggles the refresh of memory based windows on or off The default is ON This command can be used on the startup command line Turning refresh off dramatically increases the stepping rate since the data windows are not continually updated Syntax QUIET Use with ICD08SW only Example QUIET Turns refresh of memory based windows on or off Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 282 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Use Register Files R The R command pulls up windows for the register files and starts interactive setup of such system registers as the I O timer and COP Entering this command opens the register files window which can present a list of peripheral modules for the MC68HC908GP20 or MC68HC908GP32 MCUs The
124. M681CS08GPOM D M68lCS08GP In Circuit Simulator Operator s Manual Mj MOTOROLA M68ICSO8GP Operator s Manual Important Notice to Users While every effort has been made to ensure the accuracy of all information in this document Motorola assumes no liability to any party for any loss or damage caused by errors or omissions or by statements of any kind in this document its updates supplements or special editions whether such errors are omissions or statements resulting from negligence accident or any other cause Motorola further assumes no liability arising out of the application or use of any information product or system described herein nor any liability for incidental or consequential damages arising from the use of this document Motorola disclaims all warranties regarding the information contained herein whether expressed implied or statutory including implied warranties of merchantability or fitness for a particular purpose Motorola makes no representation that the interconnection of products in the manner described herein will not infringe on existing or future patent rights nor do the descriptions contained herein imply the granting or license to make use or sell equipment constructed in accordance with this description Trademarks This document includes these trademarks Motorola and the Motorola logo are registered trademarks of Motorola Inc Windows and Windows 95 are registered trademarks of Microsoft
125. MACROSTART command opened the macro file The recorded macro file is closed and left ready for use by the MACRO command Syntax MACROEND Use with ICSO8GPW and ICD08SW Example MACROEND Stop saving debug commands to the macro file then close the file M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 263 Debugging Command Set MACROSTART Save Debug Commands to Batch File The MACROSTART command opens a macro file and saves all subsequent debug commands to that file for later use This file must be closed by the MACROEND command before the debugging session is ended Syntax MACROSTART lt filename gt Where lt filename gt The name of the macro file to save commands The MAC extension may be omitted The filename can be a pathname followed by the asterisk wildcard character if so the command displays a list of all files in the specified directory that have the MAC extension Use with ICS08GPW and ICDOSSW Example MACROSTART TEST MAC Save debug commands in macro file TEST MAC Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 264 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions List Macros MACS The MACS command brings up a window with a list of macros These are files with the extension ICD such as the STARTUP ICD macro Use the arrow keys and the ENTER key or the mouse to select Cance
126. Manual M681CS08GP In Circuit Simulator Rev 1 0 340 S Record Information MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator Appendix B Technical Reference and Troubleshooting B 1 Contents B A 341 B2 Junhond Desh sos ck oo er bee dees e E EE da P 342 B 3 1 ELIO i 222252232 44 4EWE EPA dE RASTE4uAS ERE ees 342 B 3 2 SPGMROS Serial Programmer Base Unit 344 BA Troubleshooting the Quick Statl ocvocrocosiorsrrrsra rodas 344 B 5 Troubleshooting MON08 Mode 0 0 2 ee eee 351 BG Connector Pin Assignments oosouas su rau o E Rue E ERR ES 355 B Target Cable Pin Assignments Lcouezeneseh o SERERE PARS 364 HS Pimm Lilo 0er RANA 367 B 9 Board Layout and Schematic DiagraM ooo oooooooooo o 369 B 2 Introduction This appendix provides technical support information for the M68ICSO8GP in circuit simulator kit including Functional description of the kit e Troubleshooting the quick start procedure e Troubleshooting MONO8 mode e Connector and cable pin assignments e Schematic diagrams e Parts list e Board layout diagram M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 341 Technical Reference and Troubleshooting ESD CAUTION Ordinary amounts of static electricity from clothing or the work environment can damage or degrade electronic devices and equipment For example the electronic components in
127. ND PAs x ml INQUE OSCI E 2 e RST TGT RST TGT_PTC lt 0 gt PTCO 7 8 PICI TGT_PTC lt I gt PTC lt 2 gt PTC2 9 10 PTC3 TGT_PTC lt 3 gt PIC lt 4 gt PTCA 11 12 PTC5 PIC lt 5 gt 2c1 gt SP_OSC PTC 6 PTC6 13 14 PTEO PTE lt 0 gt P gt d PTE lt 1 gt PTEI 15 16 IR TGT IRQ PID lt 0 gt PIDO 17 18 PIDI PTD lt 1 gt GND 19 20 PTD2 PID lt 2 gt 2C1 3D4 osci lt a d PTD lt 3 gt 21 22 NC 23 24 GND E 2512 26 VDD IN PTD lt 4 gt PTD4 27 28 PID5 Y PTD lt 5 gt PID lt 6 gt PTD6 PTDT PID lt 7 gt YDD PTB lt 0 gt PTBO At 32 PTBI PTB lt 1 gt a a PTB lt 2 gt PTB2 33 2 34 PTB3 PTB lt 3 gt PIB lt 4 gt PTB4 35 36 PTB5 PTB lt 5 gt C PTB lt 6 gt PTB6 37 38 GND TGT PTB T PTBT 39 40 GND H m D VDD E J4 THA CONN B o TGT_VDD e CON40_2 1 1 1 VDDAD 1 2 NC c4 c5 c7 NC 3 4 NC 0 1UF 0 1UF 0 1UF Ean gt lt NG E GND 912 10 PTAO TGT PTA 0 2 2 2 PTA lt 1 gt PTAI 11 12 PTA2 PTA lt 2 gt EE BES E nee a PTA lt 6 gt PTAS 17 18 PTAT TGT_PTA lt T gt VDDA 19 20 VSSA OZ NC 21 22 NC o X7 NC 23 24 NC M NC 2312 EJ 26 NC C2 z GND o GND 27 28 NC o NC 29 30 NC i NC GND NC 33 rp 3 NC i un NC 35 36 NC ti LABEL CONNECTOR NC 37 38 GND PINS AS SHOWN NC 39 2 40 GND N a y 32 TARGET CONN FOR 40 PIN DIP E PTC PTC lt 5 gt CON40_2 AE eletcs PTC lt 6 gt D H E P VDDA 2 L PTAT7 TGT PTA 7 VSSA 4 3 PTAS PTA lt 6 gt N CGMXFC CGMXFC 6 5 PTAS PTA lt 5 gt 3D4 gt OSC2 O
128. O8W Assembler Interface 5 7 3 Conditional Assembly 5 7 4 INCLUDE Operator s Manual The CASMOSW assembler allows the user to specify blocks of code to be assembled only upon certain conditions To set up such conditional assembly procedures use the conditional assembler directives summarized in Table 5 2 Example of conditional assembly directives SSET debug sets debug tru SSETNOT test sets test fals nop always assembles nop always assembles SIF debug if debug true jmp start assembles SELSEIF if debug false jmp end does not assemble SENDIF nop always assembles nop always assembles SIF test if test true jmp test does not assemble SENDIF If the CASMOS8W assembler encounters the INCLUDE directive it takes source code from the specified file and continues until it encounters another INCLUDE directive or until it reaches the end of the main file When the assembler reaches the end of the main file it continues taking source code from the file that contained the include directive The file specification of the INCLUDE directive must be in either single or double quotes If the file is not in the current directory the specification should also include the full path name as well as the filename The user may nest INCLUDE to a maximum depth of 10 that is each included file may contain up to 10 additional included files Exam
129. ONS ZONE REV SPGMRO8 CONN MONO08 CONN ENTRY LOGIC DESCRIPTION DATE APPROVED GP20 SOCKETS TARGET ADAPTER LOGIC ANALYZER CONFIGURATION T ORIGINAL RELEASE 07 205 98 SM HEADERS ET SIGNAL CROSS REFERENCE Oo b wN e UNIT CROSS REFERENCE NOTES Lis UNLESS OTHERWISE SPECIFIED ALL RESISTORS ARE IN OHMS ALL CAPACITORS ARE IN UF ALL VOLTAGES ARE DC INTERRUPTED LINES CODED WITH THE SAME LETTER OR LETTER COMBINATIONS ARE ELECTRICALLY CONNECTED 5 1 8 WATT DEVICE TYPE NUMBER IS FOR REFERENCE ONLY THE NUMBER VARIES WITH THE MANUFACTURER SPECIAL SYMBOL USAGE DENOTES ACTIVE LOW SIGNAL lt gt DENOTES VECTORED SIGNALS INTERPRET DIAGRAM IN ACCORDANCE WITH AMERICAN NATIONAL STANDARDS INSTITUTE SPECIFICATIONS CURRENT REVISION WITH THE EXCEPTION OF LOGIC BLOCK SYMBOLOGY CODE FOR SHEET TO SHEET REFERENCES IS AS FOLLOWS 5 cb xx sier A aid ZONE INPUT VCC IS APPLIED TO VCC LOCATIONS UNLESS OTHERWISE SPECIFIED PIN 8 OF ALL 8 PIN ICS PIN 14 OF ALL 14 PIN ICS PIN 16 OF ALL 16 PIN ICS PIN 20 OF ALL 20 PIN ICS GROUND LOCATIONS UNLESS OTHERWISE SPECIFIED PIN 4 OF ALL 8 PIN ICS PIN 7 OF ALL 14 PIN ICS PIN 8 OF ALL 16 PIN ICS PIN 10 OF ALL 20 PIN ICS ETC GROUND IS APPLIED TO ETC LOCKED REFS CHANGED R1 TO 61 9K FOR 8 5V VTST CHANGED DIVIDER TAP ON U4 FOR 256 CYCLE DELAY CHANGED
130. OT SOURCEPATH SP SPCLR SPDI SPDO SPFREQ SS ST or STEP or T STACL STATUS STEPFOR M681CS08GP In Circuit Simulator Rev 1 0 Debugging Command Set Contents Remove Breakpoints i soccesse ese etn 272 lear MAP EB user ERST AES RAE 273 Clear User Sinbols cucooaaaa ese aso dA 274 set Programi Counter coocee cone eR ias 275 hange seda POE era AE 276 Set Port A Output Latches i 40 lt s00s 44 ZI Set Port B Output Latches i 42s26cceeceas 278 Set Port C Output Latches s cescicsssisiags 279 Set Port D Output Latches 2222222 9s 280 Set Port E Output Latches ioca soe na 281 Toggle Window Keliesl ocossorsrirs vd 282 Use Resister Piles lt 4 5 ic40dsswisewesuendon 283 Show Rete 25 264c2d00540e 00480604085 284 Place Comment in Batch Macro File 285 simulate Processor Reset 22s cei s 286 Reset and Restart MCU 5 cceccantecedns 287 lear Stl 7 Bates occ cst cuetieeeddaedd 288 Pip MER AA 289 bi SCI o TRU PP 290 Save Desktop Seti i luissusRleraku etd 291 Display Breakpoint Window 292 Display Code at Address 2 esce 293 Show Information in Map File 204 Display Code at PC Address 295 Display Trace Window lt ooommocoo o 296 Switch Simulation Mode 297 Save Window Data to Logfile 298 set Path for Source Cod iccicieutevdcus 299 Ol CR PONE sae ees a bo ERE RS 300 Clear SPI VO BUBSIS a 2ceqased ise Ea en 301 Es
131. P In Circuit Simulator Rev 1 0 10 Table of Contents MOTOROLA Tal 7 2 7 3 7 4 8 1 8 2 8 3 8 4 8 4 1 8 4 2 8 4 3 8 4 4 8 4 5 8 4 6 8 4 7 8 4 8 8 4 9 8 4 10 8 4 11 8 4 12 8 4 13 8 4 14 8 5 9 1 92 9 3 M68ICS08GP In Circuit Simulator Rev 1 0 Table of Contents Section 7 Debugging with ICS08GPW 070 AEAEE ne 153 VIGO caes howe OE eie AAA 133 ICSOSGPW Debugging Command Syntax 154 Command Set SUNNY AAA 155 Section 8 PROGO8SW FLASH Programmer CONEIS aso 4S Lees TEM Vans e babi oes QURE pads d Ed pde p 163 bins o PF 164 DU and PASES gt oio deus eo qur does tcd oed hax 165 Programing Commands AAA 166 BM Blank Check Module csccsrssetaeenacessousees 166 CM Choose Module IBP Liociesssceosstsceieesrenee mnn 166 REM Pee Module asociarse ZA 167 PB Program Byles losa sess res ERRASSE TES ERES 167 PM Program Module 26644 esse E ERE Rr RE RERUS 167 UM Show Mola ciscus loss uRES ieper REATRYS ERG 167 A AAPP 168 UM Upload Module sorcrssrserns ross bmx dem bs 168 BUE Upload Ranes escisiones eres ei 168 VM Verily Modules r Ee torre 168 bic VOR AA 168 A a ek i ee 169 KE BEset CDD socios AR 169 HE HD Lua one yd nse OE HEC e GREECE d a 169 Programing PUES 0 ou IRE RI RATER TEN E ERE RES 169 Section 9 ICD08SW In Circuit Debugger OOS 24454 ERE P4 dA T EHE IDE SPHERE D da E Rd 171 n nan AAA 172 MONOS Debugging Limitations and Tips
132. R and that it is configured for the factory default settings Ensure that there is an MCU in either XU1 or XU3 and that it is inserted correctly Connect the serial cable between the host PC and the SPGMR Apply power to the pod Start the ICSOSGPW simulator software as described in sections 3 and 4 of the quick start instructions Probe the PTAO pin XUI pin 33 or XU3 pin 32 for the serial data Since the board power is turned off and on several times during the connecting phase the data observed at the MCU s PTAO pin is also affected 6 Make sure that the MCU has a good clock source Use an oscilloscope to check the OSCI input at the MCU XUI pin 5 or XU3 pin 44 Set the oscilloscope to 0 1 us per division The oscillator should run when socket power is on Approximately two divisions per cycle should be observed This corresponds to a 4 9152 MHz signal the frequency required for a 9600 baud communications rate If the clock signal is not present check to see that a jumper is installed on W1 This selects the SPGMR as the source of the OSC1 signal 7 Make sure that the MCU can enter and remain in monitor mode For this to happen the following conditions must occur a At the rising edge of RST IRQ must be at Vrsr 8 5 Vdc Using a dual trace oscilloscope trigger channel 1 on the rising edge of RST XUI pin 6 or XU3 pin 1 and read the IRQ pin XUI pin 14 or XU3 pin 11 with channel 2 Start the ICSO8GPW software as Operator s Man
133. R dq CES ERO TER AM qe 67 Environment Options x4 eicpx Praxi app Ra Ru Rug ede s 66 Set Up Ponts scs oe beo xd ual Ee er xR E ERE REI Ee qud 80 BRUINS vus Sees bed bin idle epu etu etd s 62 70 file management osos seca pers A acd ERR aS 59 TUS options 4 cicerandeavecedecidessseesatessesibetangcanes 59 Close File ecos eon cook ESTE VERTES AK NER UAM ENS 61 loj mp n 62 c a aia Rie eS oe aA OG ea 60 Open Fl ss ERN 60 AP eee OTe See eT E E EER 62 PII OUD iore deam wee tue gee A eed saw ees ed ye eee eds 62 SAVE PUG spc s ba tedeeeneen Gass dia 61 Save FISAS vC 61 vp A E E E E E E E E E E E E E E E E 44 DISANPES severo dagda rc Ad 32 ISU A o O 52 AAA m 4 11 nnm d font formaton spe asese e acean coh dees eed Scie a d a 66 General Environment Tab oo oooooooooomoorrr o 69 A Ae dies tesa eS DX des RM bees eee eas 66 main windoW sya one e pret areas Cede ades esa ar qd 50 MENUS 2 E 58 PANNE AAA E o a a a S 59 Saving MES sica dat aaa 61 M68ICSO8GP In Circuit Simulator Rev 1 0 406 Index MOTOROLA Index search OPVMONS es ced spe OE CU POI INE RECS RET ROV ene CIA dq 81 PUD sts Sas he ate bene pasat atea 82 Find Next ora ond Steg ER SEE a 83 Go to Lines cosida ra E whet eee een weds eee 84 shortcut buttons n eeen nanesena eee eee 56 SOURCE MECO Sor
134. RS 187 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA List of Tables 23 List of Tables Operator s Manual Table 12 1 12 2 B 1 B 2 B 3 B 4 B 5 B 6 B 7 B 8 B 9 B 10 Title Page MONOS Target System Connector Pl 1 2 2 2 330 MONOS Target System Connector P2 occoocirosrasror rs 330 RECO Pl MC 334 s acord Field COMING srorrasic nsiries rar 3295 xit sro MP ER 336 SO Header A 337 Sl Header Roco soa Lego eR eeRP ERE DIPSA UR dare 338 SO Header Rocdd cu iibri cone nese eS DENT ERST RAE A ARES D 339 Target DIP Connector dd 6 244 02 snddnde seanteeds ERE RAD E ends 356 Treet CODEC IS 2 once Gd AAA 358 Target B Connector JA lt 4 4ce44 o0dee4ns0a sieges EE RE REG 360 SPGMR Connectors J7 and J8 22 scoocae sensu n ee RR RR EE RS 362 Auxiliary Port C Logic Analyzer Connector Jl 362 Auxiliary Port D Logic Analyzer Connector J5 362 MONOS Connectar Ios Lusso rar AS 363 Flex Target Cable M68CBLO05C and QFP Target Head Adapater MCTCO8GP20FB44 364 Target MONOS Cables coss cintas SEES DEP RE ERA 367 K S0SGP20 Bird Parts List ys ced carr 367 M68ICSO8GP In Circuit Simulator Rev 1 0 24 List of Tables MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator 1 1 Contents 1 2 Overview 1 2 1 3 1 4 UR 1 6 UM 1 8 1 9 Section 1 Introduction A A 23 Toolkit CONDON AAA 26 Hardware and Software RequirementS oo
135. SC2 OSC2 8 7 PTAS PTA Uy e e OSCI OSCi 10 9 PTA3 PTA lt 3 gt TGT RST RST 12 11 PTAZ PTA lt 2 gt TGT_PTC lt 0 gt PTCO 14 13 PTAL PTA lt I gt TGT_PTC lt 1 gt PTC 16 2 15 PTAO TGT_PTA lt 0 gt a PTC lt 2 gt PTC2 l8 117 A PTD6 PTD lt 6 gt TGT_PTC lt 3 gt PTC3 20 19 55 SIPTDT PID lt 7 gt PTC lt 4 gt PTC4 22 21 PTB 7 EE PTE lt 0 gt PTEO 24 2 23 PTB lt 6 gt ii PTE lt 1 gt PTEI 26 125 PTB lt 5 gt TGT IRQ TRO 28 127 PIB lt 4 gt PTD lt 0 gt PTDO 30 29 PIB lt 3 gt PID lt 1 gt PTDI 32 31 PIB lt 2 gt PID lt 2 gt PID2 34 33 PTB 1 ge PID lt 3 gt PTD3 36 135 PTB lt 0 gt SL VSS 38 37 PID lt 5 gt id VDD 40 39 PID lt 4 gt z lt AN Co WV L LABEL CONNECTOR WV SD PINS AS SHOWN a Wb TGT PTA 0 7 gt 2A1 lt gt E lt p gt 2A1 lt gt TGT_PTC lt 0 1 3 gt ag A p n rm p TARGET ADAPTER LOGIC ANALYZER CONFIGURATION HEADERS 5 DRAWING A SIZE GEDTTL SCH_1 A ANO BEY Dsl Gage ua 63ASE21123W C LAST_MODIFIED Fri Sep 18 11 11 25 1998 SHEET 4 OF 6 2 1 Signal Cross Reference CGMXFC IRQ oscil osc2 PTA lt 7 BIB lt 7 PTD lt 7 0 gt PTE lt 1 0 gt RST RST IN RST OUT SP OSC TGT IRQ PTA 2 TGT PTC lt for the entire design 0 0 Bro lt 0 20 gt 3D4 lt 4D4 gt 2A1 gt 3D4 lt 2C1 lt 3D4 lt 4C4 gt 3D4 gt 4B4 lt 2C1
136. Set Clear Interrupt Mask 2 2 22 ossis 242 INFO Display Line Information 243 INPUTA ol Olt A MPU ids eee kg chet enyen es 244 INPUTB met Pon B Inputs 2262242 9e ER EP 245 INPUTC Sel Porn C DPU A 246 INPUTD Set Port D MPU coa sa rd 247 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Table of Contents 13 Table of Contents INPUTE INPUTS INT or IRQ LF or LOGFILE LISTOFF LISTON LOAD LOADALL LOADDESK LOADMAP LOADV LOAD_BIN LOADV_BIN MACRO MACROEND MACROSTART MACS MAP MD or MD1 MD2 MM or MEM NOBR NOMAP NOSYMBOL PC POD PORTA or PRTA PORTB or PRTB PORTC or PRTC PORTD or PRTD PORTE or PRTE QUIET R REG REM RESET RESETGO SCCLR Operator s Manual Set Port E Inputs AA 248 Show Poit Mpili cove tL esceyetecestenaes 249 Set IRQ Pin State i uad sd a CERRO RH 250 Open Close Logfile cccedsedcuvdganseecuas 251 Tucu DE Step LISA cda A 232 Tura On Step Listing 1224432 nica RE An 253 Load 3 ROBORIS soprano ras 254 Load S Records and Map File 255 Load Desktop Settings 2222 aser d s 256 Load Map PS resice pha R E bas 257 L ad and VON hac oe pex equE seeds aes 258 Load Binary File seccion caer 239 Load and Verify Binary File 260 Petia Batch PS LL cbt esveeascecexedeie 261 Stop Saving Commands to Batch File 263 Save Debug Commands to Batch File 264 LISIS a e P du MC GOD 265 Show Information in Map File
137. TGT_PTC lt 3 gt 1 1 VCC 14 GND 7 o Ti R gt R4 R5 6 is 47K e 1 4W 2 GRI M Zool 2 RST OUT r GND RST_OUT V gt 102 VA Me GND 185817 qf qi RST lt p gt 3D4 lt gt gpRST_IN 4D4 lt gt U6 MONO8 CONNECTO J6 LL U5 2 2013 f l 2 GND XN VM 4 RST M HC04A 6 IRO GND IRO VCC 14 GND 7 CC 7 PL 9 pe ADAS USER RESET 10 PTA lt 7 gt pss U5 em 12 PTC 0 TGT_PTC lt I gt 13 14 PTC lt 1 gt r n TGT TOXI gt 1 2 3 le lt 13 TGT_PTC lt 3 gt 15 16 PTOS HCO TGT_PTC lt 0 1 3 gt SN VCC 14 GND 7 lt p Gt 1l 4A4 lt gt EN IGT_PTA lt O 7 gt GND lt p 4A4 lt gt TGT_IRQ 4D4 E SPGMRO8 CONN MONOO8 CONN ENTRY LOGIC Oma ON meztizasuco HATA SIZE GEDTTL DRAWING NO A GEDABV 63ASE21123W REV C LAST_MODIFIED Fri Sep 18 11 11 23 1998 SHEET 2 OF 6 2 1 2C1 lt gt 4D4 lt gt PTA 0 7 lt i gt 4D4 _PTB lt 0 7 gt 23 4D4
138. UD AS MOM wesse erdee E a a E e aE A 104 TOCOMING rra rei 145 SIODDIDE cesiuparisiridar Res dad ka id dada ida 146 MACROSTART command das loas 264 MACS command ui A AA Saeed a 265 Mam Filename PERTH 70 Main Filename option WADE P 76 managing Code Window COlIebls cucri overdue dened RE ex der va ra ds 122 OPE WINIO WSs Derrida atrae 84 project THIOERHIUOLU us redes eat eee ed sados CEA TR RE RS 66 Variables ue dos od a AA pa d ae ac UD a es 124 bib c rm 59 MAP command dakectbarad ek ad er dp aka eara Ad a 266 Map Piles 222RpeRbensh t se 4 RbecRPe 4 het cqcA REND eS PETERS da MAD EET 43 loading PPM tessa donee bese terse ee cee es 144 markers Clean e ops esit xeu seat eu scopi ra pe Rt dde cee log nena ss 54 MOVIN Sue aide hee arpa Sue Ede dde ide Dd dades 34 35 SEINT cross ne ee RA WEE REA RE d uae ne a 54 USING 24 2065 posui CRETAE ERROREM CREER EUER AAA 54 Match Cases sou sex pump whee nung whe add ees 82 83 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 395 Match Whole Word Only 2422 5ccsv senereheskdees ner inde whee 82 83 MCU PEE 25 26 27 133 MD command a Deeks 267 MD2 command eed GAS Ra ee ERES 268 meddid eaea teen ee ot see O AE AA 44 memory address 2223 oua when oue Hebe pep ue abe does WM 105 334 MAP eia ceded aa a kicked ec ddo ede asse ei bn dara 127 IDOOI VUE aero radar leds 126 system requirements cerros arrays 27 VISWINE 2va
139. User Interface 4 14 4 Minimize All Select the Minimize All option from the Window menu to minimize all open source windows and display them as icons at the bottom of the WinIDE main window Figure 4 27 Figure 4 27 WinIDE with Subordinate Windows Minimized Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 88 WinIDE User Interface MOTOROLA 4 14 5 Split WinIDE User Interface WinlDE Window Options Select the Split option from the Window menu to divide the active source window into two or more separate panes each capable of displaying a different view of the same file To toggle the split window view click on the Split option A check mark appears beside the option when the split view is in effect Adjust the relative size of the panes by dragging the split bar a double horizontal line separating the panes Position the pointer over the split bar until it changes to the split pointer Figure 4 28 iOH JI A ee EM 1 Pinar mois eee dis Diah glee SL TIT Far Varr irgisirr qu ft T HEH ee EIA brmyr mada igirur ie GH Chae P Di Deelra Hejlgt s Ie r Vaamari db gin hei i TEH SH lis L4 EM 1 Tiar immi d iain de birai pira H i AH H 1 lis HI i pa E 1 E GB HH E Pe See mum mam dic ta 1 up ami rr PE uniri 1 FHH T im Ps i L j rag Ara WEH ione W ieee era l se jes p miini dehy opis Web be CHE A SP EEF aL perii matie iP imoermpin jirrir rin TL rama Figure 4 28 WinIDE Cascad
140. VES Se ii d ERU qe edere wade od KE Gate eds 63 Save OPUONS os eyes eeu a oce eae Ea ex d erreur equa eq R s d 69 SAVING Ae Pc P 61 softWafe SIdPIUD cs dud oc becuse ee ONE qe dare Rd direi f epus 118 CHECKSUM tc Se ae se Se be Se Soe Sd Sed es Se ida 334 Child Windows s susunana sonnn ee eee en eee een nes 50 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 385 CHIPMODE command V Rp I Per REDE PEE PTS ER DTI ias 218 clearing Clear All anotar ci parda EE PT ES 125 Markers MT 54 pcr WM TP 125 CLEARMAP command amp aus 2chee Boone see GO KA ARA 219 CLEARSYMBOL command 1522 xkersax 4 Ree he xt RAE AA S 220 client windows WAAIDE oie iae abr Ebo estas qd hes eS RU dd aqnis 50 closing files current projecte e udo dme ribera cies 68 inui MET EUM 61 code UMING ics ber4tiser kei 4 n a ders a adri Eaque 132 Code Widow eee e ec ee e beeen eee ea be Re s 122 311 a A Rs EENT R SAREN TEER REA 334 COE coo bee a a a ERE ERI Ed a E De Cdi 81 column HUMIDES La s og qucd ced eoe de eae ed sc o s oes 51 command DUE ign deaeeSeedk PARA RA seus 140 Synta tiem cod wage a anes ee tee we Eee eed eee ees 154 command line entering COMMING osa pa acce eeeeeueseb eens oe 128 riguger CC PT EET 55 COMMENDS ous she x de RR E REROC EE a E e a ea ae oes 99 communications pod to host s es 0 cece ee eee 21 45 COMPUCE sceri ari Ak iR eb I RE a Ea ERR eR ARRIERE d es 74 snm
141. W windows are open except Code 1 To open the Code 1 window click on the Code 1 option To close it click on the Code 1 option to remove the check and close the window 6 21 2 Change Colors Choose Change Colors from the Windows menu to open the Change Window Colors dialog window Figure 6 33 The Change Window Colors dialog window displays the color settings for the ICSO8GPW debugger windows or window components To see the current settings select the window or window element from the list on the left To change the foreground or background color setting for this window or element uncheck the Use Defaults for Foreground Background checkbox Use the left mouse button to select a foreground color or use the right mouse button to select a background color Press the OK button to save the color changes or press the CANCEL button to close the dialog without saving changes Some window items allow only the foreground or background to be changed Status Window Dialog Responses Status Window Dialog Background Status Window Dialog Selected Status Window Commandbox Text Status Window Status Bar Windows Normal Windows Selected Popup Selection Windows Disabled usto Yee Chip Window Pin Values Iv Foreground Chip Window Pod Indicator Background This is a sample of what the text in the window will look like Y OK X Cancel Help Figure 6 33 Change Window Colors Dialog Window M68ICSO8GP In Cir
142. Z is zero and C is carry A letter in these designators means that the corresponding bit is set a period means that the corresponding bit is clear Syntax CCR n Where n The new hexadecimal value for the CCR Use with ICS08GPW and ICDO8SW Example CCR E4 Assign the value E4 to the CCR This makes the binary pattern 11100100 the N bit set other bits clear M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 215 Debugging Command Set CGMXCLK Syntax Operator s Manual Set CGMXCLK to Bus Clock Relationship Several peripherals can be clocked by either the bus clock or the CGMXCLK To properly simulate these modules with respect to the bus clock properly set the CGMXCLK to bus clock relationship The CGMXCLK command allows the user to specify how many bus cycles are equal to a certain number of CGMXCLK cycles Changing these values automatically resets the processor to ensure proper peripheral initialization This value needs to be specified only once per debug session regardless of the number of resets To consistently use a different setting place the initialization in the startup macro STARTUP 08 The following peripherals use or can use the CGMXCLK e Timebase module e A D analog to digital converter COP computer operating properly watchdog e SCI serial communications interface The default is 2 CGMXCLK cycles 1 bus cycle in time This would be t
143. _PTD lt 0 7 gt T 4D4 _PTE lt 0 1 gt 23 8 2C1 lt gt 4D4 lt gt _PTC lt 0 6 gt gt NOD 44 PIN QFP 68HC908 SOCKET 4 17 vpp 40 vpDA 30 vpDAD VRE 2A1 IRQ i PTEO TxD 9 PTE 0 Q 180 veP gt 43 Du PTD5 T1CH1 PTD lt 5 gt E 44 osci PTD4 T1CHO PTD lt 4 gt 4B4 lt Osc2 lt b 42 comxrc PTD7 T2CHl PTD lt 7 gt 10 rst T2CHO PTD 6 4CA Oscl gt PTE lt 1 gt 10 preisrxp yap lt 7 gt 29 PTB lt 7 gt yap lt 6 gt 28 PTB lt 6 gt PTD 0 12 prpo ss 27 PTB lt 5 gt 4D4 gt CGMXFC gt PTD lt 1 gt 13 rpi MIsO 26 PTB 4 PTD lt 2 gt 14 pro2 mos 25 PTB lt 3 gt m PTD lt 3 gt 15 prp3 sPsck 24 PTB lt 2 gt 2B1 lt gt lt i gt 5 23 PTB lt 1 gt i PTC lt 6 gt PTC lt 6 gt 22 PTB 0 PTC lt 5 gt 7 45 PTC lt 4 gt 6 lt 4 gt PTA KBD lt 7 gt 39 PTA lt T gt PTC lt 3 gt 5 lt 3 gt KBpee 38 PTA lt 6 gt PTC lt 2 gt 4 2 KBp 5 37 PTA lt 5 gt PTC lt 1 gt 3 prc lt 1 gt KBp 4 36 PTA lt 4 gt PTC 0 2 prcco gt KBpe3 35 PTA lt 3 gt KBp 2 34 PTA lt 2 gt VSSAD REFL PTA KBD 33 PTA 1 VSSA P PTA KBD 0 32 PTA O vss BODY QFP AND PLCC ONLY GND VDD S u 44 PIN PLCC 68HC908 SOCKET 23 vpp NOT POPULATED 2 VDDA L 36 VDDAD VRE pTE0 txp 15 PTE 0 IRO 17 Al rrox vee q OSC2 5 osc2 PTD5 T1CH1 PTD lt 5 gt OSC1 6 osci PTD4 T1CHO PTD lt 4 gt pos CGMXFC 4 cemxrc PTD7 T2CH1 PTD lt 7 gt RST LO RsT PTD6 T2CHO PTD lt 6 gt Ire
144. a a EOM Rede ctio 227 DIOE D Command 22 s A ERORERRERT RAE PEKEXEILC NAE RE ERE ESRB 228 debuggers I P 79 92 95 117 ICDO8SW o s s x e dare Pee poe eae Eee RI AES 28 43 69 115 172 nitatis oss da eR SEX RERAENAO GEASGISAERG ERAS EAE 172 A a DAR Ea E EAR CAR ES 33 78 175 i 173 WSIS drid eS dares Ra epi droit da uae 43 176 ICSOSGPW o A qur x evita i tp da E qur eor go 8M 115 153 TOWNES aco dope ce x ERE ER hase ACER KORR ORA aca ood iba on 148 BGB Uat Pa doe aa Ere b aU ede alba 33 78 USING oot gui eae Eas Geese desir ea 42 43 MONOS interface eese I eh 39 329 OPONE iia avs porras aer 66 SECU uus ics a eR aa ai pas 34 o A 13 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 387 debugging commands detailed listings Tcp 196 detailed listings See also individual command names 00 esses 25 ICD08SW command TOpall eer pep RERO E OU d Ead P ciar 186 GSSCHDUUN borran ex dx RR a exi reas ees 185 SUMM TY oia atraer ds DIEI Ra RES Ru 187 SYNAR espouses dix de Ke Yes px Xp P ped deas Aes 185 ICSO8GPW CMCC LS ose deu Eva d AER EA PRESE d E Ee 140 o A edd wei RE San ies Ceca Wed oan pP eg duod 155 o Dibacad 9 cesdcewd e eR dA Aq ES ad Ewa d ad esu ERE 154 deleting DICAEDOIDU arx euina ur he eee etae eU ee UM ee RU eR en 137 65 trapo PET A E E a S 125 desktop information
145. ables from the Variables window Help Displays help for this topic M68ICSO8GP In Circuit Simulator Rev 1 0 180 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger User Interface 9 5 3 2 Keystrokes These keystrokes are valid while the Variables window is the active window INSERT Adds a variable DELETE Deletes a variable UP ARROW Scrolls window up one variable DOWN ARROW Scrolls window down one variable HOME Scrolls window to the first variable END Scrolls window to the last variable PAGE UP Scrolls window up one page PAGE DOWN Scrolls window down one page F1 Displays help for this topic ESC Makes the Status window the active window 9 5 4 Memory Window The Memory window shown in Figure 9 4 is used to view and modify the memory map of a target View bytes by using the scrollbar on the right side of the window To modify a particular set of bytes double click on them Double clicking on bits brings up a byte modification window Merry Window 1 Figure 9 4 ICD088W Memory Window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 181 ICDO8SW In Circuit Debugger 9 5 4 1 Pop Up Menu By pressing the right mouse button while the cursor is over the Memory window the user is given a pop up menu which has these options e Set Base Address Sets the Memory window scrollbar to show whatever address the user specifi
146. abling the Target System Interface To use the target system in a stand alone fashion without the M68ICSO8GP20 hardware pod connected it is necessary to jumper the pins on the target board s connectors as shown in Figure 12 2 This reconnects the target MCU to the appropriate circuits on the target system For production boards a further enhancement of this scheme would be to include cutable traces between the pins of P1 and P2 as shown in Figure 12 2 The traces may be cut when debugging is necessary To return the board to stand alone use jumpers may be installed as shown Figure 12 2 Target System Stand Alone Connection Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 332 Using the MONO8 Interface MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator A 1 Contents A 2 Introduction A2 A 3 A 4 AS A 6 A 6 1 A 6 2 A 6 3 A 6 4 Appendix A S Record Information Introduction 2 44244 6634454 ee 4G EY EPISGO ESREPSG OG RSGOEYS 333 S Record CORE aude RR a Edo dd 334 SOM AA 335 S Record Creato aures Rex a A ORE EX 336 S Record AAA 336 S0 Header R cord 42 aaa e aar th ec OEC E de 337 Pis RSEOUL ores O dme de PS 338 S9 Termination Record oooooooommommm oo s 339 ASCII Char ctetB soaked be EIE Eb ADDE Re End 339 The Motorola S record format was devised for the purpose of encoding programs or data files in a printable format for transport between computer platf
147. ace in RAM for program variables The RMB directive does not generate any object code but it normally generates an entry in the assembler s internal cross reference table 5 10 Assembler Error Messages Configure the CASMO8W assembler to highlight any errors that it encounters during assembly and display an error message on the prompt line Table 5 6 summarizes these messages M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO8W Assembler Interface 109 Message Conditional assembly variable not found Duplicate label Error writing LST or MAP file check disk space Error writing object file check disk space Include directives nested too deep INCLUDE file not found Invalid base value Invalid long opcode too MACRO label too long MACRO parameter error Out of memory Parameter invalid too large missing or out of range Operator s Manual CASMO8W Assembler Interface Table 5 6 Assembler Error Messages Probable Cause The variable in the IF or IFNOT statement has not been declared via SET or SETNOT directive The label in the highlighted line already has been used Insufficient disk space or other reason prevents creation of an LST or MAP file Insufficient disk space or other reason prevents creation of an object file Includes are nested 11 or more levels deep Assembler could not find the file specified in the INCLUDE directive
148. active window UP ARROW Scrolls window up one line DOWN ARROW Scrolls window down one line HOME Scrolls window to the Code window s base address END Scrolls window to last address the window will show PAGE UP Scrolls window up one page PAGE DOWN Scrolls window down one page F1 Displays help for this topic ESC Makes the Status window the active window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 179 ICDO8SW In Circuit Debugger 9 5 3 Variables Window The Variables window shown in Figure 9 3 is used to view variables while the part is not running The user may add or remove variables through the INSERT or DELETE keys the pop up menu or the VAR command Variables can be viewed as bytes 8 bits words 16 bits longs 32 bits or strings ASCIT 9 5 3 1 Pop Up Menu TES Figure 9 3 ICDO8SW Variables Window By pressing the right mouse button while the cursor is over the variables window the user is given a pop up menu which has these options Operator s Manual Add Variable Adds a variable to the Variables window at the currently selected line A pop up window allows the user to specify the variable s address type and base Delete Variable Removes the selected variable from the Variables window A variable is selected by placing the mouse cursor over the variable name and clicking the left mouse button Clear All Removes all vari
149. address Execute the LOAD BIN command then automatically execute Pore erin the VERIFY command MACRO Execute a macro file containing debug command sequences identical to the SCRIPT command MACROEND Close the macro file in which the debug command sequences are being saved Open a macro file and save all subsequent debug commands to MACROSTART _ this file until closed by the MACROEND command during an active ICSO8GPW session MACS Bring up a window with a list of macros MAP View current MAP file The SHOWMAP command is identical MD Display the contents of memory locations in Memory window 1 MD1 beginning at the specified address Display the contents of memory locations in Memory window 2 MD2 m beginning at the specified address MM Modify contents of memory beginning at the specified address MEM and or select bytes words longs N Set or clear the N bit of the CCR NOBR Remove one or all of active breakpoints PC Assign the specified value to the MCU program counter QUIET Toggles refresh of memory based windows QUIT Terminate the ICDO8SW application and close all windows identical to the EXIT command R Open window for Register files and start interactive setup of system registers such as I O timer COP REG Display contents of CPU registers in the Status window identical to the STATUS command REM Enter comments in a macro file Simulate a reset of the MCU and set the PC to the contents of RESET the reset vector Does not
150. adecimal value Set CGMXCLK to bus clock relationship Set chip for simulation Remove the current MAP file from memory identical to the NOMAP command Remove all user defined symbols from memory Set simulator colors Change the value of the cycles counter Disassemble machine instructions display addresses and contents as disassembled instructions in the Code window Assign the specified byte value to the port A data direction register DDRA M68ICSO8GP In Circuit Simulator Rev 1 0 Debugging with ICSO8GPW MOTOROLA Debugging with ICSO8GPW Command Set Summary Table 7 2 ICS08GPW Command Overview Sheet 2 of 7 Command Description DDRB Assign the specified byte value to the port B data direction register DDRB DDRC Assign the specified byte value to the port C data direction register DDRC DDRD Assign the specified byte value to the port D data direction register DDRD DDRE Assign the specified byte value to the port E data direction register DDRE Send contents of a block of memory to the Status window in DUMP bytes words or longs Evaluate a numerical term or expression and give the result in EVAL hexadecimal decimal octal and binary format Terminate the software and close all windows identical to the EXIT QUIT command Start execution of code at the current PC address or at an G optional specified address identical to the GO an
151. al Fort A VO Keyboard interrupt bit 0 11 PTA lt 1 gt Bidirectional Port A I O keyboard interrupt bit 1 12 PTA2 KBD2 PTA lt 2 gt Bidirectional Port A I O keyboard interrupt bit 2 13 PTA3 KBD3 PTA lt 3 gt Bidirectional Port A I O keyboard interrupt bit 3 14 GND Flex cable shield ground 15 PTA4 KBD4 PTA lt 4 gt Bidirectional Port A I O keyboard interrupt bit 4 16 PTAS KBD5 PTA lt 5 gt Bidirectional Port A I O keyboard interrupt bit 5 17 PTA lt 6 gt Bidirectional Port A I O keyboard interrupt bit 6 18 PTA7 KBD7 TGT_PTA lt 7 gt Bidirectional Port A I O keyboard interrupt bit 7 19 VDDA TGT VDD PLL analog power 20 VSSA GND PLL analog ground 21 NC No connection 22 NC No connection 23 No connection 24 NC No connection 25 NC No connection 26 NC No connection 27 GND GND Flex cable shield ground Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 360 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Connector Pin Assignments Table B 3 Target B Connector J4 Continued Pin No Mnemonic Schematic NET Direction Signal Description 28 No connection 29 NC No connection 30 NC No connection 31 No connection 32 GND GND Flex cable shield ground 33 NC No connection 34 No connection 35 NC
152. al parameters which may be provided in Motorola data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Motorola does not 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 applications intended to support or sustain life or for any 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 AA are registered trademarks of Motorola Inc Motorola Inc is an Equal Opportunity Affirmative Action Employer How to reach us USA EUROPE Locations Not Listed Motorola Literature Distribution P O Box 54
153. alid while the status window is the active window UP ARROW Scrolls window up one line DOWN ARROW Scrolls window down one line HOME Scrolls window to first status line END Scrolls window to last status line PAGE UP Scrolls window up one page PAGE DOWN Scrolls window down one page F1 Shows this help topic To view previous commands and command responses use the scroll bar on the right side of the window 9 5 2 Code Window The Code window shown if Figure 9 2 displays either disassembled machine code or the user s source code if it is available The disassembly mode will always show disassembled code regardless if a source file is loaded The source disassembly mode will show source code if source code is loaded and the current PC points to a valid line within the source code otherwise disassembly is shown To show both modes at once the user should have two code windows open one set one to disassembly and the other to source disassembly M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 177 ICDO8SW In Circuit Debugger 9 5 2 1 Pop Up Menu Operator s Manual Code Window 7 Source 808 an2ll am A BUFFPTA buffer pointer 3 ADDRESS write address BYTECDIANT munber nf bytes im buffer Wite a buffer mou save address at end write next page soy Lia add sta luda S amp huFFer insk addr Enax pulse cnt inst addr edt inst addr Epga fdiuv Fla
154. ammer may be started and parameters may be passed to it in either of two ways From the WinIDE editor as described in 4 12 5 4 Executable Tabs EXE 1 3 e From the command line by using the Windows 95 or later versions Program Item Property dialog Refer to the Windows documentation for information on this procedure The following parameters may be entered in any order To specify multiple parameters separate them with spaces com n The optional parameter com n where n is a value from 1 to 8 specifies which communications port to use v Ifthe optional parameter v is specified as either V or v then the range of S records is not verified during the program ming or verification process This can help speed up these functions Examples PROG08SW com2 v com2 port is selected and S records range is not verified PROGO8SW com7 com portis selected and S records range is verified M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA PROGO08SW FLASH Programmer 165 PROGO8SW FLASH Programmer 8 4 Programming Commands NOTE Programming commands are executed by selecting them from the pick list This is done by either using the up and down arrow keys or by typing the first letter s on the line to select a command Pressing ENTER causes the selected command to execute Commands can also be executed from the menus or from the button bar Any additional information needed for the command will
155. and Initialization 45 Software Installation and Initialization 2 Cant Combat Board Problem centacting board Check yusr beard connections amd selec the correct COM past Fip 38empt communication wlth the HETHY button Otherwise use the EXIT button Cd Port Baud Rate f COMI C COMA 5 hd haud C CUM C COME C COMI C COMP 400 baud C COMA COME Thr bawd rete ix depeedent apon your harass configuration SIMULATION ahy EXIT Application Figure 3 2 Can t Contact Board Dialog Window NOTE The COM port assignment defaults to COM 1 unless another port is specified in the startup command Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 46 Software Installation and Initialization MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator 4 1 Contents Section 4 WinIDE User Interface 4 2 A sud bod dece dene Rl o e RR eb ed Bao RR di 48 4 3 Windows Integrated Development Environment 49 4 4 WDE Main WIB OW 25 4 054 4 rk eee ee AY3 te EAR edina 50 4 4 1 Main Window Functions osicisioscrcrrcrrr radar dd 50 4 4 2 Main Window Components 6 lt 2 e s60sceveseesceesae os 50 4 5 COME SIB 224604 ban Ath PR EROR RRPa REQD ARE R4 ERAS band 34 4 5 1 Prerequisites for Starting the WinIDE Editor 52 4 5 2 Starting the WISIDE Editor ir 52 4 5 3 dai soune Finis riase TT eT t a2 4 6 Navigating in the WinIDE BdHOr scie sese es aro YR ERE 53 4 6 1 Daune NUK ok
156. and Set Command Descriptions Set Stack Pointer Breakpoint continued BREAKSP Syntax Use with Examples BREAKSP lt n gt lt address gt Where n address ICSOSGPW only BREAKSP EO BREAKSP BREAKSP EO 300 M681CS08GP In Circuit Simulator Rev 1 0 Stack pointer value that triggers a break in execution Optional address for the break in execution when the stack pointer value equals n Break execution when the stack pointer SP value equals EO Cancel the SP breakpoint Break execution at address 300 if SP value equals EO Operator s Manual MOTOROLA Debugging Command Set 211 Debugging Command Set C Set Clear Carry Bit The C command sets or clears the C bit of the condition code register CCR NOTE The CCR bit designators are in the lower portion of the CPU window The CCR pattern is VILHINZC V is overflow 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 Use with ICSO8GPW and ICDO8SW Examples C 0 Clears the C bit of the CCR C 1 Sets the C bit of the CCR Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 212 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Capture Changed Data CAPTURE The CAPTURE command specifies locations to be
157. and should be approximately 0 V 5 V 0 V and 0 V respectively at the rising edge of RST After the rising edge of RST the MCU pins PTA7 PTCO PTC1 and PTC3 are connected by the pod to the MONOS connector pins TGT PTA7 TGT_PTCO TGT_PTC1 and TGT PTC3 The MCU s PTAO pin is never connected to the TGT PTAO pin as it is used for host communication The MCU s PTA7 pin must be held low for at least 24 bus cycles after the RST pin goes high The counter circuit comprised of US U6 and U7 keeps the MCU s PTA7 pin near 0 V for 256 OSCI clock cycles This corresponds to 64 bus cycles Using a dual trace oscilloscope trigger channel 1 on the rising edge of RST and read the MCU s PTA7 pin with channel 2 Verify that PTA7 is held low for at least 256 OSCI clock cycles about 52 us at 4 9152 MHz PTA7 is reconnected to the TGT_PTA7 pin and the target system circuitry when this delay expires Either RST or IRQ must remain at 8 5 Vdc to hold the MCU in monitor mode The ICSO8GP20 board has an IRQ lockout feature to keep IRQ at 8 5 Vdc when the RST or RST IN signal is asserted M68ICSO8GP In Circuit Simulator Rev 1 0 354 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Connector Pin Assignments low and keep it at 8 5 Vdc for at least 256 OSC1 clock cycles after RST goes high The TGT_IRQ signal is allowed to control the IRQ signal when RST is not asserted and the delay has expired 12 Make
158. arch Window Help tai oe EP e m m s a e CAPEMICROMC This software will feature the 68HCO8XL36 Timer Interface Module in an unbuffered PWM example A periodic waveform with specified duty cycle and period will be generated on a specified channel Assembled with IASMOS Uer 3 03 Register Equates TSC equ 20 Timer Status Control Register 26 TDMA equ 21 Timer DMA Select Register 21 TCNTH equ 22 Timer Counter Register Hi 22 TCNTL equ 23 Timer Counter Register Lo 23 TMODH equ 24 Timer Counter Hodulo Register Hi 24 TMODL equ 25 Timer Counter Modulo Register Lo 25 TSCO equ 26 Timer Channel 6 Status Control Register 26 TCHOH equ 27 Timer Channel 6 Register Hi 27 TCHOL equ 28 Timer Channel 8 Register Lo 28 TSC1 equ 29 Timer Channel 1 Status amp Control Register 29 TCH1H equ 28 Timer Channel 1 Register Hi 2a TCH1L equ 2B Timer Channel 1 Register Lo 2b TSC2 equ 20 Timer Channel 2 Status Control Register 2c TCH2H equ 2D Timer Channel 2 Register Hi 2d TCH2L equ 2E Timer Channel 2 Register Lo 2e TSC3 equ 2F Timer Channel 3 Status amp Control Register 2F TCH3H equ 38 Timer Channel 3 Register Hi 38 TCH3L equ 31 Timer Channel 3 Register Lo 31 CAD AmE Figure 4 26 WinIDE One Source Window Displayed Remaining Windows Minimized M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinIDE User Interface 87 WIinIDE
159. at is to find words with a specific uppercase and or lowercase arrangement Direction Up Down Click on an option to direct the search Choose the Down option to direct the search from the current cursor position in the text to the end or bottom of the file Choose the Up option to direct the search from the current position in the text to the beginning or top of the file Press the FIND NEXT button to start the search NOTE The Find window is modeless and can remain open allowing the user to interact with either the Find dialog or the source window Alternatives Press CTRL F This is the keyboard equivalent to selecting the Search Find menu option Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 82 WinlDE User Interface MOTOROLA WinIDE User Interface WinlDE Search Options 4 13 2 Replace Select the Replace option to open the Replace dialog Figure 4 21 to search for and substitute text in the active source window Replace Find what readeed Find Next Replace with Replace Replace All Match whole word only Cancel Match case _ taxe Figure 4 21 Replace Dialog Window In the Find what text box enter the text string to find in the Replace with text box enter the text string to replace it with Refine the search using the Match whole word only or Match case options Match whole word only Choose this option to limit the search to whole words and not cha
160. ation Assembling the Hardware Pod Table 2 3 W3 Configuration Header Target System Vpp Pin Signal Name Description 1 VDD System power 2 TGT VDD To target VDD VppA and VDDAD pins Jumper on pins 1 and 2 default ICSOSGP20 system power is applied to the target cable Vpp Vppa and Vppap pins Jumper off Allows using a separate power supply for the target system 2 4 Assembling the Hardware Pod Before beginning locate these items Two 10 pin SIP connectors on the solder side of the ICSO8GP20 in circuit simulator board e O pin RS 232 serial connector labeled HOST on the SPGMR e 5 volt circular power input connector on the SPGMR To assemble the pod and prepare it for use with a host PC 1 Install the MCU into the ICSOSGP20 board Locate socket XU3 on the board Install the MCU provided with the M68ICS08GP package into this socket upside down observing the pin 1 orientation with the socket s notch The top label side of the MCU package must be visible when looking at the component side of the ICSO8GP20 board 2 Install the ICS08GP20 board onto the SPGMR base unit Make certain that power is off before performing this step Fit the two 10 pin SIP headers on back of the board into the sockets on the SPGMR The Motorola logo on both the board and the SPGMR must be visible and aligned in the same direction The two LEDs on the SPGMR must be visible M68ICSO8GP In Circuit Simulator Rev 1 0 O
161. ations are established the SPGMR s socket power LED will light M68ICSO8GP In Circuit Simulator Rev 1 0 32 Introduction MOTOROLA Introduction Quick Start Instructions With a project or source file open in the WinIDE main window click the DEBUGGER button Figure 1 1 on the WinIDE toolbar to start the ICSO8GPW debugger and debug the contents of the active source window For more information about debugging with ICSO8GPW refer to section 6 16 Entering Debugging Commands and to Section 7 Debugging with ICSO8GPW Figure 1 1 WinIDE Debugger Toolbar Button 5 Assemble the code Press the ASSEMBLE COMPILE FILE button Figure 1 2 on the WinIDE toolbar to assemble the source code in the active WinIDE window Additional information about the CASMOS8W assembler can be found in Section 5 CASMO0S8W Assembler Interface sj Figure 1 2 WinIDE Assemble Compile File Toolbar Button 6 Runthe PROGOSSW programmer Press the PROGRAM button Figure 1 3 on the WinIDE toolbar to start the programmer Additional information about PROGO8SW can be found in Section 8 PROGO8SW FLASH Programmer Z Figure 1 3 WinIDE Program Toolbar Button 7 Run the ICDO8SW real time debugger Press the REAL TIME DEBUGGER button Figure 1 4 on the WinIDE toolbar to start the ICDO8SW in circuit debugger and emulator Additional information can be found in Section 9 ICD08SW In Circuit Debugger M68ICSO8GP In Circuit Simulator Rev 1 0
162. be prompted for in a window which opens for that purpose Errors caused by a command and any responses are presented in the status window Although the following commands are shown in the pick list they are inactive for the M 8HC9850GP20 and will not execute if selected BR EB e EW e PW In addition there is one function that is allowed to be unique to the module being programmed The selection menu name and the length of up to one hexadecimal parameter may be specified in a supporting 08P file 8 4 1 BM Blank Check Module This command checks the entire module to see if 1t has been erased If not the address of the first non blank location is given along with its contents 8 4 2 CM Choose Module 08P Operator s Manual The user is presented with a list of available 08P files Each 08P file contains information on how to program a particular module Usually the name of the file indicates what kind of module it relates to For example the file 908 GP20 08P specifies how to program a 68HC908GP20 device Setup information and further descriptions of the module are provided in ASCII text within the module file The user can look at this information with any standard text editor This information is also presented in the status window when a 08P file is selected A particular 08P file is selected by using the arrow keys to highlight the filename and then pressing the ENTER key The currently selected M68ICSO8GP In
163. bler Compiler Tab 4 662iecedssie oes Ee AYERS 73 4 12 5 4 Exsentubie Tabs EXE E ck iidadecdetsegeetisdguaude 78 AE E A 80 A19 TOnDESSub UDUDUE eric ARAN 81 ZI Pol An 82 EIS ae ae a ee IA 83 SIS GERD DERE Se ee ee ee ee re a eer ee errr eee eee 83 As AA 84 4 14 WinIDE Window Options 0 0 0 cece eee ee eee 84 2 EDO 0 Tm 85 Ae 86 S142 Pirie 1500 CPP 87 LHA i000 3 0 PPP 88 ACE Eds RPTRATXURPROETEREE AR REX TIRE DETA 89 4 2 Overview This chapter is an overview of the WinIDE windows menus toolbars dialogs options and procedures for using each of them Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 48 WinlDE User Interface MOTOROLA WinIDE User Interface Windows Integrated Development Environment 4 3 Windows Integrated Development Environment The Windows integrated development environment WinIDE editor is a graphical interface for editing compiling assembling and running these external ICSO8 programs e CASMOSW assembler e CS08GPW in circuit simulator e PROGS8SW FLASH programmer e CD08SW real time in circuit debugger The WinIDE interface consists of standard Windows title and menu bars a WinIDE toolbar a main window containing any open source or project file windows and a status bar The WinIDE components are labeled in Figure 4 1 and described in 4 4 2 Main Window Components TITLE BAR File Edit Environment Search Wi
164. bly language or C compiler is used it must be able to produce compatible source level map files Script files are plain ASCII text files containing ICSO8GPW simulator commands Use any command in the ICSO8GP command set in script files Running the script file then has the effect of entering the commands in it in the ICSO8GPW command line The user can create script files in the WinIDE editor using files created by other text editors following these rules Enter each command on its own line Preface comments with a semi colon Use commands from the ICSO8GPW command set and WAIT e Logfiles are simple ASCII text files sometimes called scratch pad files The logfile records the sequence and content of commands executed and the debugger responds to the commands The user can view logfiles from within the WinIDE editor The ICSO8GPW simulator creates logfiles if the LOGFILE or LF command is active M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 117 ICS08GPW In Circuit Simulator User Interface 6 4 Starting ICS08GPW Start the ICSO8GPW simulator by itself in stand alone mode with no inputs or outputs from the hardware pod or run it from within the WinIDE editor Also the user can modify the ICSO8GPW environment in the WinIDE editor e Torun the simulator from the WinIDE editor use either of these methods Click the DEBUGGER EXE1 button on th
165. board equivalent to selecting the Edit Redo menu option Choose Cut from the Edit menu to cut the currently selected text from the active source window and place it on the system clipboard The Cut option is active only when text in the active source window has been selected Alternative Type CTRL X This is the keyboard equivalent to selecting the Edit Cut menu option M68ICSO8GP In Circuit Simulator Rev 1 0 64 WinlDE User Interface MOTOROLA 4 11 4 Copy NOTE 4 11 5 Paste 4 11 6 Delete 4 11 7 Select All WinlDE User Interface WinIDE Edit Options Choose Copy from the Edit menu to copy the selected text from the active source window to the Windows clipboard The Copy option is available only if text in the active source window has been selected Alternatives Type CTRL C or click the COPY toolbar button This is the keyboard equivalent to selecting the EDIT COPY menu option Choose Paste from the Edit menu to paste the contents of the Windows clipboard into the active source window at the insertion point location Alternatives Type CTRL V or click the PASTE button on the toolbar This is the keyboard equivalent to selecting the Edit Paste menu option Choose Delete from the Edit menu to delete the selected text from the active source window without placing it on the Windows clipboard Text deleted using the Delete option can be restored only by using the Undo option Alternatives Press the DE
166. choose an environment option click once on the Environment menu title Figure 4 10 to open the menu Click on the option to execute Opes Pruseci Sayre Progeck Aa Setup Ereacrarumi Selap Fari Figure 4 10 WinIDE Environment Menu M68ICSO8GP In Circuit Simulator Rev 1 0 66 WinlDE User Interface MOTOROLA WinlDE User Interface WinIDE Environment Options Project files have the extension PPF They store two kinds of information e Environment settings User settings and WinIDE configuration parameters Desktop information Open edit windows size location and markers 4 12 1 Open Project Choose Open Project from the Environment menu to choose the project file in the Specify project file to open dialog Figure 4 11 Specify project file to open 2 x File name Folders d tim projects mdds1 Cancel yds c tim Network 3 projects 3 mdds1 List files of type Drives Project File PPF amp d godel d y Figure 4 11 Specify Project File to Open Dialog Window 1 Enter the project name in the File name text box or select the project name from the list box below it 2 Press the OK button to open the new project file or press the CANCEL button to close the dialog without opening a file 4 12 2 Save Project Choose Save Project from the Environment menu to save the current project in the currently specified file and pathname M68ICSO8GP In Circuit Simulator R
167. circuit simulator See ICSOSGPW 2c csse ue installing loaditg co2uitecikke Rhk e A ERAS modifying startup PROGO8SW FLASH programmer See PROGOSSW requirements MO sd borse CR EORR RE third party M681CS08GP In Circuit Simulator Rev 1 0 Index Operator s Manual MOTOROLA Index 401 WinIDE See WIDE omo a ate ante URI ML EEG ok ieee E a 25 Sound Bell on Erot 2 s rb tete Ak a he ae A ee ee a 76 SOULCE COE ers ra sas lis Dadas otf at 106 assembly MOS cres rra dad ss 121 disassembly MUS podas eric 121 Cdi rr de a nd 42 GXOCUUNG ceca ck bar acad id etas bern dd 122 Hi p A uU 52 source files APP Ere ro EERE ERER eE Ea 63 CUINE PORO irese ai od E E eye E FARS E E E E ae a 63 Ao nn 97 source window A O shake ak we Spee Ge 51 source level debDUBEIBE c a ve eed een bee RD EERCRE EH P ai 95 SOURCEPATH command llleeeee eee 299 SP comitand iuc RERER ARCU ER ERE EE EIER CREER 300 SPCLR comrniand isie aem ada EP 301 AE ee s 302 SPDO command lsee es 303 specifications Nard Ware s bibe ERG RSS SET Rc iU bokeh do ER EAE 29 specifying ASCII constants 2 0 0 0 0 RR RR IRR es 99 SPFREQ SORIA ond xod bar Guo ERRORES D HERES rias 304 SPGMR 26 31 32 35 36 37 38 43 164 172 342 344 345 351 Split D f sepainbericatidas a Rs e maxR eie ats rated 89 Split Pointer 26e eer RO radar AO P qua pe rteqp she cinq 89 S records COMEM iesu dee tias 334 Creat PH 336 OVELVIEW acta ib dried idi
168. closocinsinsossr rro ciar ER LIS 323 set Up the PARE is RA 324 Create the Source PUES asccnsirc nvidia 325 Assemble the FIDO a cossorsisisbosrasirrda rai 326 Section 12 Using the MONO8 Interface 0 o rrr 329 TROT oix cocoa v cd qae qb ddp pue ddi dapes ido 329 Header Placement and Layout ice caridad 329 Connecting to the In Circuit Simulator oo oooooooo 334 Disabling the Target System Interface 332 Appendix A S Record Information Pe s crgo rau ae dt uri dE Dd eee 333 Us AMA X4 e EPGUReIGSRSPRRNS 333 Ss Recomnd Colt surera o erV de 334 E MM 335 S Record CIS i c exu da k v4 ddini 336 Seton MAA 336 S0 Header Record amp iiuezasRreki eG AA RE HENS RAE E LAO A RR 337 a I o o EEEE ETNE EEIE EEEE T EE 338 S9 Termination Record o 339 ASCH ALS La ek ced ee he rh ee ie EE eRe 339 M68ICSO8GP In Circuit Simulator Rev 1 0 16 Table of Contents MOTOROLA Table of Contents Appendix B Technical Reference and Troubleshooting Bl BS Loaded hib 39 seen EUREN IROR Se ER ER HAE 341 Bc Tg eh CORE RERO hee D E 341 Ba F nchonal AMA 342 B 3 1 ICSUSOPZU OO criar HERRERA AA 342 B 3 2 SPGMROS Serial Programmer Base Unit 344 BA Troubleshooting the Quick Start ocoocoronsrrsorca e onn 344 B 5 Troubleshooting MON08 Mode 0 0 00 eee ee 331 BG Connector Pin Assignments 52cccgcic0s cdadeudseseiaseceus 353 B 7 Target Cable
169. command Syntax POD lt n gt Where lt n gt The number 1 8 of a serial port COM1 through COMS on the PC Use with ICSO8GPW only Example POD 1 Connect to serial port COMI Port A 80 Port B 00 Reset 1 IRQ 1 Version 01 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 276 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Port A Output Latches PORTA or PRTA NOTE Syntax Use with Example 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 If the M681CSOSGP20 hardware pod is connected the system sends the n parameter value of this command to the board PORTA lt n gt Where n The new value for the port A output latches ICSOSGPW only PORTA FF Set all port A output latches high M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 277 Debugging Command Set PORTB or PRTB Set Port B Output Latches 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 NOTE Ifthe M68ICSOSGP20 hardware pod is connected the system sends the n parameter value of this command to the board Syntax PORTB n Where n The new value for the port B output latches Use with ICSOS8GPW only
170. compiler source code instead of assembly instructions If the number argument is omitted one source instruction is executed If the SS command is entered with an n value the command steps through n source instructions Syntax SS lt n gt Where lt n gt Number of instructions to step through Use with ICS08GPW and ICD0SSW Examples SS Step through the instruction at the PC address value SS 8 Step through eight instructions starting at the current PC address value M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 305 Debugging Command Set ST or STEP or T Execute Single Step The identical ST STEP and T commands step through a specified number of assembly instructions beginning at the current program counter PC address then halt All windows are refreshed as each instruction is executed If the number argument is omitted one instruction is executed If the command is entered with a parameter value the command steps through that many instructions Syntax STEP lt n gt Where lt n gt Use with CSO8GPW and ICD08SW Examples STEP ST 2 Operator s Manual The hexadecimal number of instructions to be executed by each command Execute the assembly instruction at the PC address value Execute two assembly instructions starting at the PC address value M68ICSO8GP In Circuit Simulator Rev 1 0 306 Debugging Command S
171. cuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICSO8GPW In Circuit Simulator User Interface 151 ICS08GPW In Circuit Simulator User Interface 6 21 3 Reload Desktop Choose Reload Desktop from the Windows menu to reload the stored configuration for the current project This option is useful for restoring desktop windows to their stored sizes and locations after making changes To make changes permanent choose the Save Desktop option The new window sizes and locations will be written over the old settings and stored with other project files 6 21 4 Save Desktop Choose Save Desktop from the Windows menu to save the current configuration of the desktop and the position and size of the windows in the ICSOSGPW simulator Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 152 ICS08GPW In Circuit Simulator User Interface MOTOROLA User s Manual M681CS08GP In Circuit Simulator Section 7 Debugging with ICSO8GPW 7 1 Contents Ta e Le a A E is E E 153 7 3 ICSO8GPW Debugging Command Syntax 154 2 8 Command Set SUEDE roro debe eae AN ER E CER ERRARE 155 7 2 Introduction This chapter consists of e A logical overview of the ICSO8GPW debugging command set e An explanation of rules for using the command set including command syntax and arguments Asummary of commands by type and function The ICSO8GPW simulator command set consists of commands for simulating debugging a
172. d RUN commands Start execution of code at the current PC address or at an GO optional specified address identical to the G and RUN commands Similar to GO command except that the target is left running GOEXIT without any breakpoints and the debugger software is terminated Execute the program in the simulator beginning at the address GOMACRO in the PC and continue until a keypress Stop Macro command from the toolbar breakpoint or error occurs Execute from the current PC address until the next instruction is GONEXT reached Used to execute past a subroutine call or past intervening interrupts Execute code beginning at the PC address and continue until GOTIL the PC contains the specified ending address or until a keypress Stop Macro command from the toolbar breakpoint or error occurs GOTOCYCLE Execute code beginning at the current PC and continue until the cycle counter is equal to or greater than the value specified H m HREG Set or clear the H half carry bit in the CCR HELP Open the ICS08GPW Help File M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging with ICS08GPW 157 Debugging with ICSO8GPW Table 7 2 ICS08GPW Command Overview Sheet 3 of 7 Command Description HX Set both bytes of the concatenated index register H X to the specified value Set or clear the I bit of the CCR INFO Display information about the line highlighted in the source
173. d Tesullsz lar OPERE AR ECKE ER EN S d 128 Sl Hi AAA 130 instructions during tracing o ooocoooococnr ee eee eee 134 MEMO I Loci iex EEEAERTS ARE e a rbd C ied 126 WAIT COMIDA ra PROP S an RUE EORR 318 Wait for Assembler Result cc ossa eru n e n Rs 76 Wait for compiler to finish 2 6 0cd 200428264044 rb Reges TI WHEREIS command 3 rne xh cr er x e 9 reg OC RH CE LR gas 319 Window Base Address dialog 2 1 2 0 ccc eee eee eas 122 banno A aaa a e a a a E S 95 26 27 29 45 WiIBIDE josh ah Rx EA AA aee dns 27 42 Assembler Compiler Tab o serrat As 73 Jo MORTEM 61 configuration parameters 0 0 eee eee eee eens 67 configuring external programs 0 0 ereere ranee 74 descrplioli 24a eces evens hane neers be raros ia 27 48 Edit ODUOUS lt Seras EDAD EN Tad E RR 63 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 405 Operator s Manual Close New Project 24 6 2 decsede deer x Endo rra nd rd dde 68 CODY oe re exi ex edd sire eb ache ed sa 65 Bg PPP Dr 64 Del t cs Lian A aie iod di s pan fer icu ps 65 Open Projectes eodd resh peit an aA Re Reis Ae 67 Paste e Er E E E e REE E 65 Dion P 64 Save Project 1 esses ueber RR euep ORE RR RA Rab ERE das 67 Saye Project ASS riores Eee 68 A H 65 Setup Environment 0 0 0 cece e 68 edit options Edi pancho eee eee oun eee ake S He E Pee SA EREE we 63 Environment Menu ed e d dacoe m Cte CE
174. d Troubleshooting Connector Pin Assignments Table B 1 Target DIP Connector J2 Continued Pin No Mnemonic Schematic NET Direction Signal Description 28 IRQ TGT_IRQ External interrupt 29 PTB3 AD3 PTB lt 3 gt Bidirectional Port B I O ADC input bit 3 30 PTDO SS PTD lt 0 gt Bidirectional Port D I O bit 0 SPI slave select 31 PTB2 AD2 PTB lt 2 gt Bidirectional Port B I O ADC input bit 2 32 PTD1 MISO PTD lt 1 gt Bidirectional Port D I O bit 1 SPI master in slave out 33 PTB1 AD1 PTB lt 1 gt Bidirectional Port B I O ADC input bit 1 34 PTD2 MOSI Port D I O bit 2 SPI master out slave in 35 PTBO ADO PTB lt 0 gt Bidirectional Port B I O ADC input bit 0 36 PTD3 SPSCK PTD lt 3 gt Bidirectional Port D I O bit 3 SPI serial clock 37 PTD5 T1CH1 Port D I O bit 5 timer 1 channel 1 38 Vss GND MCU ground 39 PTD4 T1CHO PTD lt 4 gt Bidirectional Port D I O bit 4 timer 1 channel 0 40 Vpp TGT VDD MCU power M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 357 Technical Reference and Troubleshooting Table B 2 Target A Connector J3 Operator s Manual Pin No Mnemonic Signal Description 1 GND GND Flex cable shield ground 2 CGMXFC CGMXFC External filter capacitor 3 OSC2 Crystal amplifier outpu
175. d Troubleshooting Troubleshooting the Quick Start 2 Disconnect any target cables from the board These troubleshooting steps assume that no target system connections are present 3 Make sure that the MCU is installed correctly Verify that only one MCU is installed in either XU1 or XU3 Insert the MC68HC908GP32FB QFP version of the part into the XU3 socket with the part pins down and with the orientation notch and pin to the upper left Alternately insert the DIP version of the part MC68HC908GP32P into the XUI socket with the part pins down and with the orientation notch to the top of the board 4 Make sure the board is getting power a Check the power at the output of the adapter First disconnect the pod from the power supply then measure the power at the wall adapter s output connector to confirm that it produces 5 Vdc The outer barrel of the connector is ground and the inner sleeve is 5 Vdc If there is no power at the connector verify that the adapter is getting power from the AC power outlet b Check the power at the SPGMR First remove the ICSO8GP20 board from the SPGMR then plug the adapter s output connector into the SPGMR The system power LED should light Check for 5 Vdc at the SPGMR s board socket P5 pin 7 This socket is the 10 pin SIP socket located nearest the LEDs If the LED does not light or if 5 Vdc is not present on P5 pin 7 check the fuse in the SPGMR If more than 6 2 Vdc or reverse voltage is applie
176. d can be used by attaching the pod to the target through the extension cable that comes with the toolkit The simulator can also work in stand alone mode without the pod attached to the host computer In this case simulator inputs can be specified using the INPUTx commands Start or move to the ICSO8GPW in circuit simulator software from the WinIDE editor The ICSO8GPW software also can be started using standard Windows techniques and run independently of the WinIDE editor The ICSOSGPW simulator accepts standard Motorola S19 object code files as input for object code simulation and debugging When using a third party assembly or C language compiler the compiler must be capable of producing source level MAP files to allow source level debugging 3 3 4 ICDO8SW In Circuit Debugger ICD ICDO8SW allows limited real time debugging of the 65HC908GP20 MCU Unlike the simulator the ICD allows reading writing and controlling execution of the actual processor Code can be loaded into RAM or FLASH memory and executed in real time or in single steps For debugging in RAM multiple software breakpoints are available For debugging in FLASH memory one hardware breakpoint is available 3 3 5 PROGO8SW FLASH Programmer PROGOSSW allows erasing programming and verification of the MCU s FLASH memory Individual bytes may be programmed or an S19 object file may be used as the source M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual
177. d must be in the current base or have a base qualifier prefix M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO8W Assembler Interface 99 CASMO8W Assembler Interface 5 7 2 Cycle Adder Operator s Manual or suffix The next base remains in effect until the end of the file or until another BASE directive is entered The original default base is hexadecimal but the default can be changed to binary octal or decimal default bases instead It is good practice to specify a base explicitly to be always sure that base is currently in effect The CASMOSW assembler contains an internal counter for instruction cycles called the cycle adder Two assembler directives CYCLE ADDER ON and CYCLE ADDER OFF control this counter When the assembler encounters the CYCLE ADDER ON directive it clears the cycle adder The cycle adder starts a running total of instruction cycles as subsequent instructions are assembled For instructions that have variable numbers of instruction cycles the cycle adder uses the smallest number When the assembler encounters the CYCLE ADDER OFF directive it writes the current cycle adder value to the LST file and disables the cycle adder M68ICSO8GP In Circuit Simulator Rev 1 0 100 CASMO8W Assembler Interface MOTOROLA CASMO8W Assembler Interface Assembler Directives Table 5 2 Assembler Directives Directive Change the default input base to binary octal BAS
178. d the log entries A If parameter is omitted a prompt asks for this overwrite append choice The command interpreter does not assume a filename extension for the capture file To close the capture file enter this command without any parameter values 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 The CAPTURE command specifies the location to be monitored for value changes Closing the capture file deletes the location specification The simulator continues writing to an open capture file The capture file must be closed within a reasonable time to prevent the file from growing too large CAPTUREFILE filename R A Where filename Name of the capture file ICSOSGPW only CAPTUREFILE TEST CAP Open capture file TEST CAP CF TEST4 CAP A Open capture file TEST4 CAP append new entries M68ICSO8GP In Circuit Simulator Rev 1 0 214 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Condition Code Register CCR The CCR command sets the condition code register CCR in the CPU to the specified hexadecimal value The value entered with the command displays in the CPU window NOTE The CCR bit designators are in the lower portion of the CPU window The CCR binary pattern is VII HINZC V is overflow H is half carry I is IRQ interrupt mask N is negative
179. d to the SPGMR the fuse will blow c Check the pod system power with the ICS08GP20 board attached Disconnect the SPGMR from the power supply and disconnect the SPGMR from the host PC Configure the ICSO8GP20 board to the factory defaults and attach the ICSO8GP20 board to the SPGMR Reconnect the power supply to the SPGMR The system power LED should light If the LED does not light there may be a problem with the ICSO8GP20 causing too much of a drain on the 5 Vdc supply Check the system power at J7 pin 7 The J7 connector is the top connector that connects to the SPGMR near the LEDs The pins of the J7 connector may be probed from the top side of the board Using J7 pin 1 as the ground reference check for 5 Vdc at J7 pin 7 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 345 Technical Reference and Troubleshooting d Check the ICSO8GP20 board s VSW_OUT power with the host Operator s Manual disconnected With the ICSO8GP20 board installed on the SPGMR the SPGMR powered and no host connection to the SPGMR check for the following voltages on the J7 connector of the ICSO8GP20 board using J7 pin 1 as the ground reference Approximately 8 5 Vdc at J7 pin 9 Approximately 1 25 Vdc at J7 pin 6 If these voltages are not present when the system power LED is lit there may be a problem with the SPGMR s internal step up power supply There may also be a problem
180. de register of the M68HC08 index register An 8 bit CPU register in the M68HCOS that is used in indexed addressing mode The index register X can also be used as a general purpose 8 bit register in addition to the 8 bit accumulator input output I O Interfaces between a computer system and the external world For example a CPU reads an input to sense the level of an external signal and writes to an output to change the level on an external signal instructions Instructions are operations that a CPU can perform Instructions are expressed by programmers as assembly language mnemonics A CPU interprets an opcode and its associated operand s as an instruction M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Glossary 379 Operator s Manual listing A program listing shows the binary numbers that the CPU needs alongside the assembly language statements that the programmer wrote The listing is generated by an assembler in the process of translating assembly language source statements into the binary information that the CPU needs MCU Microcontroller A complete computer system including CPU memory clock oscillator and I O on a single integrated circuit memory location In the M68HC08 each memory location holds one byte of data and has a unique address To store information into a memory location the CPU places the address of the location on the address bus the data informat
181. debugger ICD for the M68HCOS8 serial programmer SPGMR The debugger employs a command set that allows real time debugging within the limitations of the M68HC08 s MONOS on chip debugging monitor 9 3 MONOS Debugging Limitations and Tips Operator s Manual These limitations are inherent in MONOS debugging and should be observed carefully 1 Die eR Do not change the data direction or data value of PORTA bit 0 When written these bits should be set to 0 Do not enable keyboard interrupts for PORTA bit 0 Do not step an instruction that branches to itself Do not step a software interrupt instruction SWI The hardware breakpoint registers are reserved for use by the ICDO8SW debugger Attempting to use these registers for other purposes may not work Be careful about showing peripheral status and data registers in the memory or variables window A refresh of these windows will read these registers and may cause the clearing of flags The debug monitor built into the HC08 processor uses up to 13 bytes of the stack Do not write to these addresses from SP 13 to SP To load a program into RAM the stack should be moved to the end of RAM otherwise the processor will use 13 bytes in the middle of the RAM block Use the command SP 23F to move the stack If the command is put into the STARTUP ICD file it will execute every time the debugger is entered If interrupts are turned on during stepping the ICDO8SW debugger will
182. develop manage and work with the source code For more information about using the TNCLUDE function see 5 7 4 INCLUDE M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Example Project 325 Example Project The example MAIN ASM file Ck ck c KK KK KKK KKK KK KK KK KK KK KK KKK KKK KK KK KK ko ko kx ko ko ko ko ko Include files Ck c KK KK KK KK KK KKK KKK KKK KKK KK KK KK KK KK KK KK kk ko ko ko ko ko ko ko ko Sinclude equates asm Sinclude init asm Sinclude charge asm Sinclude dcharge asm Sinclude options asm Sinclude misc asm Sinclude readv asm Sinclude isr asm Sinclude display asm Sinclude eeprom asm Sinclude text asm Sinclude vectors asm 11 3 3 Assemble the Project Operator s Manual The project is ready for assembly In the WinIDE follow these steps 1 With the MAIN ASM file in the active window press the ASSEMBLE COMPILE FILE button third button from the left on the WinIDE toolbar to start the assembler from the WinIDE editor Alternately press the F4 hotkey If the assembler encounters errors during assembly the assembler stops and the first error is displayed highlighted in red in the source file To correct the errors click on the DEBUGGER EXEI toolbar button left most button on the WinIDE toolbar to open or move to the ICSO8GPW simulator to debug the source code When you have finished debugging the code in t
183. ds criar A RERO ES 143 6 25 Specify S19 File to Load Dialog Window 144 6 26 Specify MACRO File to Execute Dialog Window 145 6 27 Specify MACRO File to Record Dialog Window 145 6 28 Specify Output LOG File Dialog Window 146 6 29 Logfile Already Exists Dialog Window lesse 147 6 30 Sample Ouipal Logfile oes ised auas aas 4 432334 AA 147 631 ICS0SGPW Execute Men cccndigdsitdiaceecedadsed aus 148 652 ICS0SGPW Window MUN cescrvrsrtsr ERAT ERA CAESA EE VE 150 6 33 Change Window Colors Dialog Window 151 9 1 KDOSSW Status WY eek oe ns RACERENATH HER WAY dies 176 9 2 ICDOSSW Code Window 2 2244s45 deu i E REPE RR ES 178 9 3 ICD08SW Variables Window 2 eee ee ees 180 94 ICDO8SW Memory Window lt 6464454 cw ree RACE ARRA 181 9 5 ICD08SW Change Window Colors Window 183 9 6 ICDO08SW PS Window 2 0 iio 184 9 7 ICDO8SW Set CCR Window iue Lexuiac REL ER eet b eevee bien 185 10 1 Assembly Window ASM Command 4 201 10 2 Modify Memory Dialog Window 2 00 269 fL CASMOSW WO c iua Rehd cheese deen d ebd ER EROR ene 327 12 1 MONOS Target System Connector Layout 331 12 2 Target System Stand Alone Connection 4 334 BA ICSOSGP20 Board Layout csc siden dee ideddctedseuesnuased 369 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Ma
184. e 298 SOURCEPATH Set Path for Source Code 299 SP Ser Sk Pomer i 4945 4d 45 HE E ER EE 300 SPCLR Clear SPI VO Buffers aciuesebe cra 301 SPDI Emer SPI DPU ee eis titas 302 SPDO View SPI Outputs 222245229924 Ar 303 SPFREQ Set Input Clock for SPI Slave 304 SS Execute Source Step s 2 cow st rs 305 SforSlePorT Execute Single Step i61422144e00 shuns ees 306 STACK Show Stack Window c 2se4se 8eee eee 307 STATUS A A 308 STEPFOR EDI AAA AAA A 309 STEPTIL Step Until Address scrisrrrdcrisir boe 310 SYMBOL Add Symbol ce ta y ope IER ERRER PEE ee 311 TRACE Enable Disable Tracing 312 UPLOAD SREC Upload S Record to Screen 313 V Set or Clear V Bit CCR 314 VAR Display Vacablg 2222222442 4404 209496 315 VERIFY Verty 5 Record Pile cacssccaadenasacuas 316 VERSION or VER Display Software Version 317 WAIT bir 3 pi TP 318 WHEREIS Display Symbol Valte i cence icecavadaus 319 X or XREG Set X Register Value Nace ere e ERE ened 320 Z Sevele Zero Bil cco ccacdiedcndeaaeocues 321 M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Table of Contents 15 Table of Contents 11 2 11 3 11 3 1 11 3 2 11 3 3 12 1 12 2 12 3 12 4 12 5 A 1 A2 A 3 A A4 A 5 A 6 A 6 1 A 6 2 A 6 3 A 6 4 Operator s Manual Section 11 Example Project 7 Pcr PTT 323 nos o ML 343 Seting Upa Sample Projs
185. e Play Macro menu option Alternatives Press the CTRL M key combination or click the RECORD MACRO toolbar button These are the keyboard equivalents to choosing the File Record Macro menu option Select the Stop Macro option from the File menu or press the CTRL S key combination to stop the active macro s execution Alternatives Press the CTRL S key combination or click the STOP MACRO toolbar button These are the keyboard equivalents to choosing the File Stop Macro menu option Select the Open Logfile option from the File menu to open the Specify Output LOG File dialog Figure 6 28 Use this dialog to specify a logfile name and directory drive path in which to save output log information for the current debugging session Specify output LOG file 21 x File name Folders 3 Cancel test log a ec E ics bcwl Network 3 ics bcw v List files of type Drives PRE Logfile log amp c godel Figure 6 28 Specify Output LOG File Dialog Window M68ICSO8GP In Circuit Simulator Rev 1 0 146 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface File Options If the specified logfile exists a message box Figure 6 29 prompts the user to e Overwrite the existing logfile with current logging information Append the current logging information at the end of the existing logfile e Cancel the open LOGFILE command without savin
186. e Character Length Bit WAKE EQU Bit 3 Wake up Condition Bit mL EQU Bit 2 Idle Line Type Bit PEN EQU Bit 1 Parity Enable Bit d ero EQU Bit 6 Parity bit Z E 3 SCI Control Register 2 Bit 7 SCI transmit Interrupt Enable Bit Bit 6 Transmission Complete Interrupt Enable seez EQU EQU EQU ony s2awvoruo HJ Bit Bit 5 SCI Receive Interrupt Enable Bit Tea12 Top 1 Bytes 6327 Insert Figure 4 24 WinIDE with Subordinate Windows Cascaded To choose a window from the cascaded display click on its title bar This moves the selected window to the top of the stack and makes it the active window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinIDE User Interface 85 WIinIDE User Interface 4 14 2 Tile Select the Tile option from the Window menu to arrange the open source windows in tiled fashion Figure 4 25 The user will see the entire window border for each although not necessarily the window s entire contents ae WIN IDE HCO8GP20 PPF ic Ele Edit Environment Search Window Help aazel lle e m e e a es C PEMICRONICSO8GPW GP20_SCI ASM BEE panna iati i ia i it I RI I RR t t i i i e APPS NOTE RN127h SCI EXAMPLE ax This progran illustrates the basic operation of transm x receiving data packets using the SCI on the 68HC708XL3 xx Assembled with IASMO8 Uer 3 63 es C PEMICRO
187. e ESC key can delete a currently entered line including one selected by scrolling through old commands NOTE Only the command lines entered by the user are saved Responses to other ICD prompts are not For example when a memory modify command is given with just an address the ICD prompts for data to be written in memory These user responses are not saved for scrolling however the original memory modify command is saved Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 186 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger Debugging Commands 9 6 3 Command Set Summary Table 9 1 summarizes the debugging commands that may be used with ICDOSSW For detailed descriptions of each command refer to Section 10 Debugging Command Set Table 9 1 ICD08SW Command Overview Sheet 1 of 5 Command Description Set the accumulator to specified value and display new value in n CPU window identical to the ACC commana Set the accumulator to specified value and display new value in AGE CPU window identical to the A command ASCIIF3 Toggle memory windows between displaying data only and data ASCIIF6 with ASCII characters Assemble M68HCO08 instruction mnemonics and place resulting ASM m machine code in memory at the specified address BELL Sound PC bell the specified number of times ELE Fill a block of memory with a specified byte word or long value BR Display or set instruction breakp
188. e H bit of the CCR M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 239 Debugging Command Set HELP Syntax Use with Examples Operator s Manual Open Help The HELP command opens the Windows help file for the program An alternative way to open the help system is to press the F1 key If entered with an optional parameter help appears for the specified topic If no parameter is entered the entire help file appears HELP lt topic gt Where lt topic gt A debug command or assembly instruction ICSO8GPW and ICDOSSW HELP Open the help file HELP asm Displays help for the ASM debugging command M68ICSO8GP In Circuit Simulator Rev 1 0 240 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set H X Index Register Pair HX The HX command sets both bytes of the concatenated index register H X to the specified value Syntax HX value Where value The new value for the X register Use with ICS08GPW and ICDO8SW Example HX 0400 Set the H X index register value to 0400 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 241 Debugging Command Set l Set Clear Interrupt Mask The I command sets or clears the I bit of the condition code register CCR The CCR bit designators are in the lower portion of the CPU window The CCR pattern is VIIHINZC V is overflow
189. e WinIDE toolbar Press the F6 hotkey e To modify how the software starts from WinIDE editor From the WinIDE Environment menu choose the Setup Environment option to open the Environment Settings dialog Select the EXE1 Debugger tab heading see Figure 4 17 Environment Settings Dialog EXE Tabs if it is not already on top to set options for the ICSO8GPW simulator For more information about the options in the tab see 4 12 5 4 Executable Tabs EXE 1 3 e Torun the simulator directly from Windows double click the ICSOSGPW icon using this method In Windows 95 or later versions choose the ICS08GPW icon from the ICSO8GPW group in the Start menu After startup the software will establish communication with the board at the given parameters and the status bar will read Attempting to contact COM 1 e Ifthe ICSO8GPW software can communicate with the pod through the serial port the status bar message reads Contact with pod established e If the software is not able to connect with the pod the Can t Contact Board dialog window Figure 6 1 appears Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 118 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Starting ICSO8GPW 2 Can Combat Board Problem ceniacting board Cheek yos beard connectliueg and select the correct OOM part Fip 38empt communication wlth the HET Y button Otfeenadse use
190. e button and select the Toggle Breakpoint at Cursor menu item This removes the breakpoint from the line Syntax NOBR lt address gt Where lt address gt Optional address of a single breakpoint to be removed Use with ICS08GPW and ICDOSSW Examples NOBR Remove all current instruction breakpoints NOBR 120 Remove the instruction breakpoint at address 120 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 272 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Clear MAP File NOMAP The NOMAP command removes the current MAP file from memory forcing the debugger to show disassembled code in the Code windows instead of source code Symbols defined using the SYMBOL command are not affected by this command For the ICSO8GPW the NOMAP command is identical to CLEARMAP Syntax NOMAP Use with ICSO8GPW and ICDOSSW Example NOMAP Clears symbols and their definitions M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 273 Debugging Command Set NOSYMBOL Clear User Symbols The NOSYMBOL command removes all user defined symbols created using the SYMBOL from memory Symbols are created using the SYMBOL command Symbols defined via a loaded MAP file are not affected Syntax NOSYMBOL Use with ICS08GPW and ICDOSSW Example NOSYMBOL Clears user defined symbols and their definitions Operator s Manual M681CS08GP In Circuit S
191. e compiled from the disk not from the open windows in the WinIDE editor If the file is not saved before assembling it the assembler will assemble the last saved version In general leave this option checked Sound Bell on Error Select this option to have the assembler beep if it encounters an error e Other Assembler Compiler If the Other Assembler Compiler is chosen from the Type list the WinIDE editor offers these additional options Options Enter the options to pass to the compiler on the command line Such options generally consist of switches that instruct the compiler and a filename Enter the FILES string in the command line to insert either the current filename or the filename specified in the Main Filename option in the EXE Path text box of the General Environment tab options Figure 4 13 M68ICSO8GP In Circuit Simulator Rev 1 0 76 WinlDE User Interface MOTOROLA WinlDE User Interface WinIDE Environment Options Confirm command line Select this option to display a window describing the desired executable and the parameters that should pass to the executable just before the assembler compiler is run This gives the option to cancel the assemble compile continue as described or modify parameters before continuing with the assembly If this option is not selected the assembler compiler runs without prompting to confirm parameters Recover Error from Compiler Select this option
192. e equals n Break execution when the accumulator value equals 55 Cancel the accumulator breakpoint Break execution at address 300 if accumulator value equals 55 Operator s Manual MOTOROLA Debugging Command Set 207 Debugging Command Set BREAKHX NOTE Operator s Manual Set HX Register Breakpoint The BREAKHX command sets an HX register breakpoint and breaks code execution when the value of the HX register equals the specified n value With an n value the command forces a break in execution as soon as the accumulator value equals n With n and address value 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 The maximum number of breakpoint addresses is 64 Each BR BREAKA BREAKSP or BREAKHX 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 BREAKHX command is to duplicate one of those 64 addresses If the BREAKHX command is entered without an address value the break in code execution clears the accumulator breakpoint To cancel the accumulator breakpoint before the break occurs enter the BREAKHX command without any parameter values If the BREA
193. e of the binary file Starting address Loads a binary myfile of bytes starting at hex address 100 Operator s Manual MOTOROLA Debugging Command Set 259 Debugging Command Set LOADV_BIN Load and Verify Binary File The LOADV_BIN command first executes the LOAD_BIN command then automatically executes the VERIFY command Syntax LOADV_BIN lt filename gt lt add gt Where lt filename gt lt add gt Use with ICD08SW only Example LOADV BIN myfile 100 Operator s Manual Name of the binary file Starting address Loads a binary myfile of bytes starting at hex address 100 then executes a VERIFY command M68ICSO8GP In Circuit Simulator Rev 1 0 260 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Execute Batch File MACRO The MACRO command executes a macro file which is a text file that contains a sequence of debug commands Executing the macro 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 macro MAC files in the current directory The file for execution can be selected directly from this list NOTE Amacro file can contain the MACRO command allowing nested macro files up to 16 levels deep The most common use of the REM and WAIT commands is within macro files The REM command displays comments while the macro f
194. e results and then deletes the error file To keep a copy of the file add such instructions to the batch file 4 12 5 4 Executable Tabs EXE 1 3 Choose either the EXE 1 in circuit simulator the EXE 2 programmer or the EXE 3 debugger tab in the Environment Settings dialog to bring the tab to the front Enter options for the general purpose external programs for example ICS08GPW that will be used with this project Figure 4 17 illustrates the tabs The options are the same for all tabs Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 78 WinlDE User Interface MOTOROLA WinlDE User Interface WinIDE Environment Options va ree ee E Duos 515 Cigars F Dasa sar din E hii AP Pub a I ems DE ds E Pipari rara tir Doira lara E es Cei i liig B Epa bs i L iii crol F ikem Lemhi Pap D nomm abend riam error T ad hs Acidi Pesa O Sad bos ras Figure 4 17 Environment Settings Dialog EXE Tabs e Type Enter a description of the executable type in the Type text box This string will appear in other parts of WinIDE editor The default for Executable 1 is debugger For the ICSOSGPW the user may choose to change the Type to ICS This will change the label on this tab and elsewhere in the dialog EXE Path Enter the full path and executable name of Executable 1 in the EXE Path text box The executable name may have an EXE COM or BAT extension For a DOS based executable or batch file th
195. e the file type Also define filters and add them to the list by first entering the appropriate information into the boxes for New File Filter and New Filter Description on the lower right then selecting the ADD NEW FILTER button Filters to be removed may be deleted by highlighting a filter and using the REMOVE SELECTED FILTER button 4 12 5 8 Assembler Compiler Tab In addition to running an external compiler other external programs such as third party programmers debuggers or simulators may need to be run The WinIDE editor allows configuration of as many as three external programs two general purpose programs and one compiler Use the settings on the M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 73 WinIDE User Interface Operator s Manual Assembler Compiler tab of the WinIDE Environment Settings dialog to set up external programs Click the Assembler Compiler tab heading in the Environment Settings dialog Figure 4 15 to bring the tab to the front Use the options on this tab to change the settings and parameters for the assembler or compiler path and type and specify output listing and assembly preferences EXE Path Enter the full path and executable name of the compiler in the text box The extensions EXE COM BAT are legal For a DOS executable or BATch file create a PIF file to prevent the screen from changing video modes when the executable runs Environme
196. e to be loaded The MAP extension can be omitted The filename value can be a pathname that includes an asterisk wildcard character If so the command displays a list of all files in the specified directory that have the MAP extension Load map file PROG MAP into the host computer Load map file PROGI MAP into the host computer Display the names of the MAP files on the diskette in drive A Display the names of the MAP files in the current directory Operator s Manual MOTOROLA Debugging Command Set 257 Debugging Command Set LOADV Load and Verify The LOADV command first executes the LOAD command then automatically executes the VERIFY command Syntax LOADV lt filename gt Where lt filename gt Filename of user source code Use with ICD08SW only Example LOADV myprog Loads the 19 into the target The contents of the S19 file on the target board are then compared with the file myprog Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 258 Debugging Command Set MOTOROLA Load Binary File Syntax Use with Example Debugging Command Set Command Descriptions LOAD BIN The LOAD BIN command loads a binary file of bytes starting at address add The default filename extension is BIN LOAD BIN filename add Where filename add ICD08SW only LOAD BIN myfile 100 M681CS08GP In Circuit Simulator Rev 1 0 Nam
197. e user may choose to create a PIF file to prevent the screen from changing video modes when the file is run Options Enter the options to be passed to the executable on the command line in the Options text box In general options will consist of switches that instruct the executable from the command line Add a filename using the SFILES string The SFILES string inserts either the currently active filename or the filename specified by the SFTLES parameter set in the FILE parameters to pass to the external programs field in the General Environment tab Confirm Command line before running Select this option to display a window describing the executable to be run and the parameters which will be passed just before the assembler compiler is run This gives the option to cancel the assemble compile continue M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinIDE User Interface 79 WinIDE User Interface 4 12 6 Setup Fonts Operator s Manual as described or modify parameters before continuing If this option is not selected the assembler compiler will be run without prompting to confirm parameters Save all files before running Select this option to save all open files to disk before running the executable This is important since external programs that must read the edit file read only the last version saved to disk In general always select this option Select the S
198. ed Windows with Active Window Split M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinIDE User Interface 89 WinlIDE User Interface Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 90 WinlDE User Interface MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator 5 1 Contents Section 5 CASMO8W Assembler Interface e col o io AAA 92 53 CASMOSW Assembler User Interface 93 5 4 Assembler ParamictEiS asus sd averse en A 94 5 5 Assembler LOHDIES aa od P3 EX Id dr WR AE OR Cc 95 So Co aAa MMC rrr ER 95 Saa Pile ETT ETE E TTT 95 2252 LIUBS POL edo eI RR ETE HH SON EUR eS 96 5 5 4 o PEINT LPS 97 da Files from Mier Assemblers AL cue ssedesk qi p RAE RERRERAREA 97 5 6 Assembler DEDOS Ls died hays kan ini HANE AK EEG E EFE REA EE 98 5 6 1 Op rands and CO sc ohh ae be eee Y OR RACER ence ees 98 5 6 2 CONNU APN gg PER PECEY eee 99 5 7 Assembler LIBRO Au Lord o Cn HR ORE e e oC Rod od 99 5 7 1 BOB EEE NA AAE ET ANTE AELE A NAET md ids 99 NM dk dc T uno 100 5 13 Conditional Assembly o3 POR RERREEEA He s en dees res 102 5 7 4 AE MERE MMC rrr 102 NR MACRO rs AR AAN ree ere ci 103 5 8 Lisha DHECGDVUR iros DIARIA 104 5 8 1 LIN IS ANA EA 105 5 8 2 LAN rar A 107 39 Pein Operon 6 oy a3 24r ESO eho ESeWEHCERT RII ERE V YVES 107 5 9 1 A EUNN EEE 108 m Form Constant Byte PUB ilodaaeesacaescRte I XR aA 108 5 9 3 Form Double
199. ed from the pod and this command has no effect Syntax SCCLR Use with ICSO8GPW only Example SCCLR Clear input and output buffers for SCI simulation Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 288 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Input SCI Data SCDI The SCDI command allows the user to input data into the SCI If a data parameter is given the value is placed into the next slot in the circular input buffer If no parameter is given a window is displayed with the input buffer values Input values can be entered while the window is open An arrow points to the value that will be used next as input to the SCI The maximum number of input values is 256 bytes If the M68ICSOSGP20 hardware pod is connected SCI inputs and outputs are directed from the pod so this command has no effect ICSO8GPW simulates the correct number of cycles for one character the character appears in the SCI data register and the appropriate flags are set Syntax SCDI lt n gt Where lt n gt The value to be entered into the next location in the input buffer Use with ICSO8GPW only Example SCDI 55 Set the next input value to the SCI to 55 SCDI Pull up the data window with all the input values M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 289 Debugging Command Set SCDO View SCI Outputs The SCDO
200. em and returns an error message or status update message as in the message area of the window The Status window message area displays all ICSO8GPW commands including implemented ICSOSGPW menu options and toolbar buttons and command results Use the scroll controls on the right side of the Status window to view previous commands or use these keys to navigate within the message area e Press the up arrow T key to scroll the window up one line e Press the down arrow 1 key to scroll the window down one line e Press the HOME key to scroll the window to the first status line e Press the END key to scroll the window to the last status line e Press the PAGE UP key to scroll the window up one page e Press the PAGE DOWN key to scroll the window down one page e Press the Fl key to display the help contents topic l logfile Opening log file C ICSO5CW1 ICSO5CW TEST LOG Ready Command Line Figure 6 9 Status Window M68ICSO8GP In Circuit Simulator Rev 1 0 128 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Status Window To save the information displayed in the Status window enable logging e Choose the Start Logfile option from the ICSO8GPW file menu or enter the LF command in the Status window command line Figure 6 10 A Status Window OE x gt 1f savedata log Opening log file C PEMICRO ICSO8GPW SAVEDATA LOG gt dump 0 40 umping m
201. emory data Press any key to abort 0000 XX XX XX XX 00 00 00 00 XX UU UU UU 00 OO 80 00 0010 28 08 XX 00 00 00 CO 00 XX 00 00 00 OO OO OO 00 0020 20 00 00 FF FF 00 XX XX 00 XX XX 20 00 00 FF FF 0030 00 XX XX 00 XX XX 20 00 00 40 40 01 1F XX 00 UU 0040 XX gt 1E og file closed Figure 6 10 Results of Entering the LF Command in the Status Window e The Specify output LOG file dialog Figure 6 11 opens Specify output LOG file 12 fx File name Folders c pemicroNics Bgpw LOG SAVEDATA LOG E c E gt PEMICRO f ICS08GPw List files of type Drives ese Logfile log e Figure 6 11 Specify Output LOG File Dialog Window e n the dialog choose a path and filename for the logfile Press OK to create the file or CANCEL to close the dialog without opening the logfile M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 129 ICS08GPW In Circuit Simulator User Interface e Ifa logfile that already exists is chosen the Logfile Already Exists window Figure 6 12 appears asking if the user wants to overwrite the existing file or append the status messages to the end of the existing file Choose OVERWRITE or APPEND to begin logging in the file or CANCEL to close the dialog without opening the logfile Logfile Already Exists x The specified file already exists Do you want to Overwrite the file Appe
202. en An arrow points to the value that will be used next as input to the A D The maximum number of input values is 256 bytes If the ICSOS8 circuit board is connected A D inputs are received from the board so this command has no effect ADDI lt n gt Where n ICSOSGPW only ADDI 55 M681CS08GP In Circuit Simulator Rev 1 0 The value to be entered into the next location in the input buffer Set the next input value to the ADDI to 55 Pull up the data window with all the input values Operator s Manual MOTOROLA Debugging Command Set 199 Debugging Command Set ASCIIF3 and ASCIIF6 Toggle ASCII Display The ASCIIF3 and ASCIIF6 commands toggle the memory windows between displaying data only and data and ASCII characters ASCIIF3 toggles memory window 1 ASCIIF6 toggles memory window 2 Syntax ASCIIF3 Use with ICD08SW only Example ASCIIF3 Toggles memory window 1 between displaying data only and data with ASCII characters Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 200 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Assemble Instructions ASM The ASM command assembles M68HC08 Family instruction mnemonics and places the resulting machine code into memory at the specified address The command displays a window with the specified address if given and current instruction and prompts for a ne
203. enames must be in quotes and must contain the file extensions Make sure all comments in the source file are preceded by a semicolon Use the global find and replace operation in the editor to change any assembler directives listing directives and or pseudo operations if they exist in the source code Remember that assembler directives must begin with the character or and must start in column 1 If necessary use the BASE directive to change the default base for operands CASMOSW defaults to hexadecimal M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO8W Assembler Interface 111 CASMO8W Assembler Interface Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 112 CASMO8W Assembler Interface MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator Section 6 ICSO8GPW In Circuit Simulator User Interface 6 1 Contents 6 2 ii osos essa toca RR e844 EY GO ee edd ee h eS GREG SEES 115 6 3 re IO au aac RO EROR Ro ER oc dl 115 6 3 1 ICSOSGPW Simulation Speed 0 c0ccsscaseeesewsuss 116 6 3 2 System Requirements for ICSOBGPW ocoomornacinsara ns 116 6 3 3 File Typ s and POTS 00 s RO RE RARA NARRAR RA 116 6 4 cut e A 118 6 5 WSOSGPW WiindoWE ico cb dew e iweb id CERE ERE ii 120 6 6 Code Windows 2 00020 00cce Rer RE RR REGERE ERROR Rs 121 6 6 1 To Display the Code Windows Shortcut Menus 121 6 6 2 Code Window Shortcut Menu Functi
204. enient shortcut buttons that duplicate the function of the most frequently used menu options A tool tip or label pops up when the mouse button lingers over a toolbar button identifying the button s function Figure 6 23 ICSO8GPW Toolbar Table 6 2 identifies and describes the ICSO8GPW toolbar buttons M68ICSO8GP In Circuit Simulator Rev 1 0 140 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface ICS08GPW Toolbar Table 6 2 ICS08GPW Toolbar Buttons Back to Editor Button Label Button Function Return to the WinIDE editor Load S19 File Open the Specify S19 File to Load dialog to choose an S19 file Step Reload Current S19 Reload the last most currently loaded S19 file Simulate a reset of the MCU and set the program counter PC to the contents of the reset vector does not start execution of user code Execute the STEP command Multiple Step Go Stop Execute the STEPFOR command Execute the GO command Stop execution of assembly commands Play Macro Open the Specify Macro File to Execute dialog to choose a macro to execute Record Macro Open Logfile Stop Macro Function Open the Specify Macro File to Record dialog to enter a filename for the macro Stop recording the macro Execute the LOGFILE command opens the Specify Output Logfile dialog Close Logfile AA ed NE M68
205. er press CNTL N where N is denotes a marker number between 0 and 9 This feature is useful when editing a large file Markers can also be set changed navigated to or cleared using options on the Edit Shortcut menu Figure 4 3 Open the Edit Shortcut menu by clicking the right mouse button in any edit window Fi ejej Mejeji Haste Toggle Marker 0 9 gt Goto Marker 0 9 Clear All Markers Figure 4 3 WinIDE Edit Shortcut Menu To set or clear a marker using the Edit Shortcut menu options 1 With the cursor in any editing window click the right mouse button to open the Shortcut menu 2 Position the cursor on the line where the marker should appear Click the right mouse button to display the Shortcut menu 3 Click the Toggle Marker 0 9 option to open the list of markers 4 Clickonceon the marker to toggle When the marker number is checked it is toggled on when the marker number is unchecked it is toggled off M68ICSO8GP In Circuit Simulator Rev 1 0 54 WinlDE User Interface MOTOROLA WinlDE User Interface Command Line Parameters To move to a marker number using the Shortcut menu options 1 With the cursor anywhere in the edit file click the right mouse button to open the Edit Shortcut menu 2 Click on the Go To Marker 0 9 option to open the Marker submenu Figure 4 4 and choose the marker number to move to Toggle Marker 0 Toggle Marker Toagle Marker Toggle Marker Toagle
206. er can be HEADER defined only once the default header is blank the header string is entered in quotes LIST Turns on the LST file output Turns off the Ist file output This directive is the counterpart of NOLIST the list directive at the end of a file this directive keeps the symbol table from being listed Sets the length of the page the default parameter value is 166 PAGELENGTH lines 2 decimal Sets the width of the output word wrapping additional text the FACIENTES default parameter value is 160 columns decimal f Makes the string specified in quotes double or single a SUBHEADER subheader on the listing pages the subheader takes effect on the next page Note The caret character following a directive indicates a mandatory parameter value that must be supplied Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 104 CASMO8W Assembler Interface MOTOROLA CASMO8W Assembler Interface Listing Directives 5 8 1 Listing Files If a listing file is requested using the L parameter in the command line of the Windows Program Item Properties or the Output Listing File option is checked in the Assembler Compiler tab in the Environment Settings dialog the listing file LST is created during the assembly This listing file has the same name as the file being assembled but with the extension LST Any existing file with the same name will be overwritten The list
207. er or assembler in the editor Because the WinIDE editor is modular the user may for example choose to substitute a third party C compiler or other assembler for the CASMOSW cross assembler provided in the toolkit 3 3 2 CASMO8W Assembler Operator s Manual CASMOSW is a cross assembler that creates Motorola S19 object files and MAP files from assembly files containing 68HCOS instructions To debug source code in the simulator or debugger code window load compatible source level map files CASMOSW produces such map files as an output by default The CASMOSW assembler supports all 68HC08 instructions and addressing modes It can produce S19 object files MAP files and LST absolute listing files The listing files can be configured to show cycle counts The assembler also supports macros and conditional assembly Section 5 CASMO0SW Assembler Interface provides full information about the assembler options and how to use them M68ICSO8GP In Circuit Simulator Rev 1 0 42 Software Installation and Initialization MOTOROLA Software Installation and Initialization ICSO8GP Software Components 3 3 3 ICS08GPW In Circuit Simulator ICSO8GPW is an in circuit simulator for HC908GP series microcontrollers that can get inputs and outputs I O for the device when the external M68ICSOSGP hardware pod for example the assembled ICS08GP20 board and SPGMR serial programmer is attached to the host computer I O from a target boar
208. es Upon selecting this option the user is prompted for the address or label to display This option is equivalent to the MD Memory Display command Show Memory and ASCII Sets the current Memory window display mode to display the memory in both hex and ASCII formats Show Memory Only Sets the current Memory window display mode to display the memory in hex format only Help Displays help for this topic 9 5 4 2 Keystrokes These keystrokes are valid while the Memory window is the active window HOME END PAGE PAGE E ESC Operator s Manual UP ARROW DOWN ARROW UP DOWN Scrolls window up one line Scrolls window down one line Scrolls window to address 0000 Scrolls window to last address in the memory map Scrolls window up one page Scrolls window down one page Displays this help topic Makes the Status window the active window M68ICSO8GP In Circuit Simulator Rev 1 0 182 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger User Interface 9 5 5 Colors Window The Colors window shown in Figure 9 5 shows the colors that are set for all of the debugger windows To view the current color in a window select the item of interest in the listbox and view the text in the bottom of the window To change the color in a window select the item then use the left mouse button to select a color for the foreground or use the right mouse button to select a color for
209. esses that lie in the module are programmed If a location could not be programmed an error message is given 8 4 6 SM Show Module The user is prompted for a starting address If this address is not in the module an error is given A window is opened that shows the contents of memory as hex bytes and ASCII characters if printable Non printing characters are shown as periods This window stays on the screen until the user presses the ESCAPE key M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA PROGO8SW FLASH Programmer 167 PROGO8SW FLASH Programmer 8 4 7 SS Specify S Record This command asks the user for the name and or path to a file of Motorola S records to be used in programming or verifying a module If the file is not found an error message is given The currently selected file is shown in the 19 file selected window The programmer accepts S1 S2 and S3 records All other file records are treated as comments If the user does not specify a filename extension a default of S19 is used 8 4 8 UM Upload Module The user is then asked for a filename in which to upload S records The default filename extension is set to S19 if none is specified by the user Motorola S records for the entire module are then written to the specified file 8 4 9 UR Upload Range The user is prompted for a starting address which must be in the module Next the user is asked for an ending address
210. et MOTOROLA Debugging Command Set Command Descriptions Show Stack Window STACK The STACK command opens the HC08 Stack window which shows the stack pointer SP value data stored on the stack and results of an RTS or RTI instruction Syntax STACK Use with CSO8GPW only Example STACK Open the stack window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 307 Debugging Command Set STATUS Show Registers The STATUS command displays the contents of the CPU registers in the Status window The STATUS command is identical to the REG command This command is useful for saving the CPU state to a logfile Syntax STATUS Use with ICS08GPW and ICDOSSW Example STATUS Display the contents of the CPU registers Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 308 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Step Forever STEPFOR The STEPFOR command continuously executes instructions one at a time beginning at the current program counter PC address Execution continues until an error condition occurs until it reaches a breakpoint or until a key or the STOP button on the ICSO8GPW toolbar is pressed All windows are refreshed as each instruction is executed Syntax STEPFOR Use with ICS08GPW and ICDOSSW Example STEPFOR Step through instructions continuously M681CS08GP In Circuit Simulator Rev 1
211. etup Fonts option in the Environment menu to open the Setup Fonts dialog Figure 4 18 to change font options in the editor __ Courier FP Courier New MS LineDraw Terminal Font style Size Regular 10 A iu Effects r Sample Strikeout Underine AaBbY y2z Color E Script MN Black Western Figure 4 18 Setup Fonts Dialog Window Font The Font text box displays the name of the current font To change the current font select another font name from the Font list Use the scroll arrows if necessary to view all the font choices Font Style The Font Style text box displays the name of the current font style To change the current font style select another font style name from the Front Style list Size The Size text box displays the current font size To change the size enter a new number in the text box or choose a font size from the list M68ICSO8GP In Circuit Simulator Rev 1 0 80 WinlDE User Interface MOTOROLA WinIDE User Interface WinlDE Search Options e Effects Toggle special font effects Strikeout Choose this option to produce a horizontal strike through line in the selected text Underline Choose this option to produce a horizontal underscore line below the selected text e Color Choose the text color from the drop down list box Click on the downward pointing arrow to display the Color list Use the scr
212. ev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 67 WinIDE User Interface 4 12 3 Save Project As Choose Save Project As from the Environment menu to display the Specify project file to save dialog Figure 4 12 1 Enter the project name in the File name text box or select the project name from the list box below it 2 Press the OK button to open the new project file or press the CANCEL button to close the dialog without opening a file Specify project file to save L2 x File name Folders t d timhprojects mdds1 Cancel ds C tim Network 3 projects 3 mdds1 Save file as type Drives Project File PPF amp d godel d Figure 4 12 Specify Project File to Save Dialog Window 4 12 4 Close New Project Choose Close New Project from the Environment menu to e Close an active current project file e Open a new project 4 12 5 Setup Environment Choose Setup Environment from the Environment menu to display the Environment Settings dialog box The Environment Settings dialog contains these five tabs General Environment e General Editor e Assembler Compiler Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 68 WinlDE User Interface MOTOROLA WinlDE User Interface WinIDE Environment Options e EXE 1 Default ICSO8GPW in circuit simulator EXE 2 Default PROGO8SW programmer EXE 3 Default ICD08SW debugger EXE4 In the En
213. execution ending address Use with ICSO8GPW and ICDOSSW Examples GO Begin code execution at the current PC value GO 346 Begin code execution at address 346 G 300 371 Begin code execution at address 300 End code execution just before the instruction at address 371 RUN 300 Begin code execution at address 300 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual Debugging Command Set 233 Debugging Command Set GOEXIT Execute Without Breakpoints Debugger The GOEXIT command is similar to the GO command except that the target is left running without any breakpoints and the debugger software is terminated Syntax GOEXIT lt addr gt Where lt addr gt Starting address of user code Use with ICD08SW only Example GOEXIT 100 Sets the program counter to location 100 hex runs the program and exits from background debug mode Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 234 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Execute Past Subroutine Interrupt GONEXT The GONEXT command executes from the current PC address until the next instruction is reached It is used to execute past a subroutine call or past intervening interrupts Some debuggers refer to this functionality as step over Syntax GONEXT Use with ICD08SW only Example GONEXT M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Co
214. face 4 9 WinIDE Menus Table 4 4 summarizes WinIDE menu titles and options Table 4 4 WinIDE Menus and Options Summary Menu Title Option Description File New file Open a new file window no name Open file Display the Open File dialog to choose a file to open Save file Save the current file Save file as Open the Save As dialog to choose a directory and filename in which to save the current file Close file Close the current file Print Open the Print dialog to print the current file Print setup Open the Print Setup dialog to choose printer options Exit Close the WinIDE editor Edit Undo Undo the last action Redo Redo the last action Cut Cut the selection to the clipboard Copy Copy the selection to the clipboard Paste Paste the contents of the clipboard Delete Delete the selection Select all Select all text in the current window Environment Open project Open the Specify Project File to Open dialog Save project Save the current project Save project as Open the Specify Project File to Save dialog Close new project Close the current project file or open a new project file if no current file Set up environment Open the Environment Settings dialog to change settings for General Environment External EXE 2 General Editor External EXE 3 Assembler Compiler External EXE 4 External EXE 1 Set up font
215. ftware integrated into the WinIDE environment allowing hotkey access to all applications Emulation connection to the hardware M68ICSO8GP In Circuit Simulator Rev 1 0 28 Introduction MOTOROLA Introduction Specifications 1 6 Specifications Table 1 1 summarizes the M68ICSO8GP hardware specifications Table 1 1 M68UCSO08GP Specifications Characteristic Specification Temperature Operating 0 to 40 C Storage 40 to 85 C Relative humidity 0 to 95 non condensing Power requirement 5 Vdc from included AC DC adapter NOTE The procedural instructions in this operator s manual assume that the user is familiar with the Windows interface and selection procedures Figures in this manual show ICS08GPW windows and dialog boxes as they appear in the Windows 95 environment 1 7 Typographic Conventions This operators manual uses special typographical conventions to enhance readability They are e Code statements confirmations data entry field text parameters and strings are indicated in regular Courier SINCLUDE INIT AS This option displays an Exit Application confirmation message This new filename replaces the NONAME 1 in the title bar oe FILES Window names and parts of windows are indicated in initial caps unless the name of the window is capitalized in a unique way Memory and Code windows CASMO8W window WinIDE main window M68ICSO8GP In Circuit
216. g logging information Logfile Already Exists x The specified file already exists Do you want to Overwrite the file Append to the file or Cancel the peration Figure 6 29 Logfile Already Exists Dialog Window The open logfile does not appear in the Debugger window To enable logging in a currently active logfile the LF LOGFILE command must be executed as well otherwise no logging occurs in the open logfile The LF command begins logging of commands and responses to the specified external file While logging is enabled any line appended to the command log window also is written to the logfile Figure 6 30 Logging to the external file continues until another LF command stops logging and closes the logfile ai D PEMICRO LOG SAMPLE LOG Opening log file D PEMICRO LOG SAMPLE LOG gt Logfile Appending to log file D PEMICRO LOG SAMPLE LOG gt Step gt Stepfor Operator interrupt gt Stepfor Figure 6 30 Sample Output Logfile View the logfile in the WinIDE editor or in any program that displays text files M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICSO8GPW In Circuit Simulator User Interface 147 ICS08GPW In Circuit Simulator User Interface 6 19 7 Close Logfile 6 19 8 Exit Alternatives Press the CTRL L key combination or click the OPEN LOGFILE toolbar button These are the keyboard equivalents to choosing the File Open Logfile menu op
217. gger ICD 43 PROGOSSW FLASH Programmer eoccocorosorresrrrocanes 43 Installing the ICSO8GP Software uas d va x eer EY GERE sews ES 44 Rie A 44 Starting the ICSDSOP Sofateirssesickesabetrkbenaukaea ka 45 Pod to Host Communication 2 5 4222 rr ru rere AY 45 This chapter summarizes and explains how to install and initialize the ICSOSGP software 3 3 ICS08GP Software Components The ICSO8GP software consists of these components WINIDE EXE Windows integrated development environment editor CASMO08W EXE 68HC08 cross assembler ICSO8GPW EXE In circuit simulator optimized for the HC08 Family of Motorola microcontrollers ICD08SW EXE Real time debugger and emulator PROGOS8SW EXE FLASH memory programmer M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Software Installation and Initialization 41 Software Installation and Initialization 3 3 1 WinIDE Editor The WinIDE editor is a text editing application that allows use of several different programs from within a single development environment Use the WinIDE editor to edit source code launch a variety of compatible assemblers compilers debuggers or programmers and configure the environment to read and display errors from such programs If error detection options are selected in the Environment Settings dialog the WinIDE editor will highlight errors in the source code and display the error messages from the compil
218. gram instructions do not appear in the status window as code runs This display state is the default when the software is first started To turn on the display of stepping information use the LISTON command Syntax LISTOFF Use with ICSO8GPW only Example LISTOFF Do not show step information Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 252 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Turn On Step Listing LISTON The LISTON command turns on the screen listing of the step by step information during stepping The register values and program instructions are displayed in the Status window while running code The values shown are the same values seen by the REG instruction To turn off this step display use the LISTOFF command Syntax LISTON Use with ICSO8GPW only Example LISTON Show step information M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 253 Debugging Command Set LOAD Syntax Use with Examples Operator s Manual Load S Records The LOAD command loads an S record S19 object file into the debugger Entering this command without a filename brings up a list of S19 files in the current directory Select a file for loading from this list Upon loading if the reset vector is defined in the code the debugger sets the PC to that address When used with ICSO8GPW the a
219. gt 40 PTA lt T gt PTC lt 3 gt 10 prc lt 3 gt KBpe6 39 PTA lt 6 gt PTC lt 2 gt 9 prc 2 KBpes5 38 PTA lt 5 gt PTC lt I gt PICci 7KBD lt 4 gt 37 PTA lt 4 gt PTC 0 PTC 0 KBD lt 3 gt PTA lt 3 gt KBD 2 5 PTA lt 2 gt A VSSAD REFL PTA KB 34 PTA I VSSA PLL PTA KBD 0 33 PTA lt 0 gt vss BODY FOR 40PDIP ONLY GP20 SOCKI Gl TS SIZE GEDTTL SCH 1 A GEDABV SCH 1 DRAWING NO 63ASE21123W REV LAST MODIFIED Fri Sep 18 11 11 24 1998 SHEET 3 OF 6 2 1 2C1 3D4 _PTA lt 0 7 gt 23 E PTA 0 7 lt gt _PTB lt 0 7 gt PTB 0 7 3D4 OUT M 0 7 lt gt _PTD lt 0 7 gt PTD lt 0 7 gt 3D4 0 7 25 0 7 lt gt _PTE lt 0 1 gt n Q PTE lt 0 1 gt 3D4 0 1 0 1 2C1 3D4 _PTC lt 0 6 gt ga PTC 0 6 TGT IRQ 2A1 lt IRQ lt CGMXFC E 3D4 lt q w2 HDR3_2 2B1 gt RST_OUT gt Ei TGT VDD o2 J3 THA CONN A l5 3 CON40_2 RST GND 1 2 CGMXFC CGMXFC RST_IN OSCZ G
220. he case when running the M68HC908GP Family of devices from a 4 9152 MHz clock oscillator with a 2 4576 MHz internal bus When running a 32 768 kHz crystal with a 2 4576 MHz internal bus set 75 bus cycles 1 CGMXCLK cycle Do this by using the command CGMXCLK 75 1 Try to keep the numbers involved as low as possible for more accurate simulation For example 1 and 4 are better than 201 and 800 CGMCLK nl n2 Where lt n1 gt Number of bus cycles lt n2 gt Time equivalent CGMXCLK cycles M68ICSO8GP In Circuit Simulator Rev 1 0 216 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set CGMXCLK to Bus Clock Relationship continued CGMXCLK Use with ICSO8GPW only Examples CGMXCLK 75 1 Bus crystal 2 4576 MHz bus 32 768 kHz crystal CGMXCLK 1 2 Bus crystal 2 4576 MHz bus 4 9512 kHz crystal CGMXCLK Pops up a window asking for values M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 217 Debugging Command Set CHIPMODE Choose Device for Simulation The CHIPMODE command brings up a pop up window containing all of the HCOS devices that can be simulated with ICSO8GPW for Windows The device can be selected from the window NOTE The selection of a new chip does not take effect until the next debugging session Syntax CHIPMODE Use with ICSOSGPW only Example CHIPMODE Brings up a window for
221. he ICSO8GPW simulator return to the WinIDE editor by clicking the BACK TO EDITOR button the left most button in the ICSO8GPW toolbar Continue assembling debugging and editing the source files until the assembly completes successfully Based on the Output Control options selected in the Assembler Compiler tab of the Environment Settings dialog the M68ICSO8GP In Circuit Simulator Rev 1 0 326 Example Project MOTOROLA Example Project Setting Up a Sample Project assembler creates additional output files with the filename of the main file and an extension which indicates the file type The 19 and MAP files are required the LST file is optional a MAIN S19 Motorola S record S19 object code file that can be downloaded into the simulator b MAIN MAP Map file containing information necessary for source level debugging c MAIN LST Listing file d The CASMOSW window displays during assembly showing the files and progress of the assembler in the Status area When assembly completes successfully the assembler window appears like the one shown in Figure 11 1 LAV Main File PRG SOR GPZQASM Current File PRG GPEASM Saus Pass 2 c Assembling Current Lime 65 Tetal Limes 128 Figure 11 1 CASM08W Window M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Example Project 327 Example Project Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0
222. he same filename Do this by checking the Main File option in the Environment Settings dialog s General Options tab This technique is useful when passing a specific filename to the external program without regard to what is being edited 4 8 WinIDE Toolbar The WinIDE toolbar Figure 4 5 provides a number of convenient shortcut buttons that duplicate the function of the most frequently used menu options A tool tip or label pops up when the mouse button lingers over a toolbar button identifying the button s function Table 4 3 identifies and describes the WinIDE toolbar buttons and hotkeys a em Elaa alala s Figure 4 5 WinIDE Toolbar Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 56 WinlDE User Interface MOTOROLA WinlDE User Interface WinIDE Toolbar Table 4 3 WinIDE Toolbar Buttons Icon Button Label Button Function Call the external program 1 specified in the Environment Settings dialog s EXE 1 tab This could be a third party assembler debugger or compiler Default ICS08GPW External program 1 hotkey F6 Call the external program 2 specified in the Environment Settings dialog s EXE 2 tab This could be a third party assembler debugger or compiler Default PROGO8SW External program 2 hotkey F7 hs Call the external program 3 specified in the Environment Settings dialog s EXE 3 tab This could be a third party assembler debugger or compiler Default ICD08SW
223. here command A command name in upper or lower case letters argument An argument indicator when arguments are italicized they represent a placeholder for the actual value entered when not italicized they indicate the actual value to enter Table 7 1 Argument Types explains the possible argu ment values M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 185 ICDO8SW In Circuit Debugger The following nomenclature conventions apply to the ICD08SW in circuit debugging commands n Example OFF 255T 9 6 2 Command Recall Any number from 0 to OFFFFFFFF hex The default base is hex To enter numbers in another base use the suffixes T for base ten O for base eight or Q for base two or also use the prefixes for base ten for base 8 and for base two Numbers must start with either one of these prefixes or a numeric character 3770 111111110 255 0377 11111111 Any valid address default hex Optional parameter Program counter points to the next instruction to be fetched Equals IP 6 ASCII string Everything on a command line after and including the semi colon character is considered a comment This helps in doc umenting macro script files The PGUP and PGDN keys can be used to scroll through the past 30 commands issued in the debug window Saved commands are those typed in by the user or those entered through macro script files Th
224. ht of the Error Format list box to display the list of error formats Figure 4 16 If the WinIDE editor is to attempt to read back an error from a compiler it must understand the error syntax This option lets the user select an error format from a list of supported formats If the Recover Error from compiler option is checked and the filename specified in the Error M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 77 WinIDE User Interface Filename text box is found the editor parses that file from end to beginning looking for the error If the editor finds an error it opens the file highlights the error line and displays the error in the status bar Biland Congalible Figure 4 16 Error Format List Error Filename Enter the filename to which the editor pipes the compiler assembler error output Some compilers provide a switch for piping error output to a file others require that this be handled manually As most compilers are DOS based a batch file can be created into which to pipe the output For example COMPILER OPTIONS gt ERROR TXT This batch file creates the file ERROR TXT and sends the assembler compiler output to that file Most C compilers require a batch file to run the compiler through its various steps compiling linking to which the user may add a pipe for error output Once the environment reads this error file the WinIDE editor displays th
225. ialog Figure 6 7 The default number format for the ICSO8GPW is hexadecimal Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 124 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Variables Window Variable Address Type Unsigned Byte C Signed 8 bit Integer C Unsigned Word C Signed 16 bit Integer C Unsigned Longword C Signed 32 bit Integer C String C Boolean C Float Decimal C Double Decimal Base CH Octal Binary X Cancel 7 Help Figure 6 7 Add Variable Dialog Window To override the default base for any number also enter either a prefix or suffix but not both shown in Table 6 1 in the command lines Table 6 1 Base Prefixes and Suffixes Base Prefixes Suffixes Example SPF 1255 377 11111111 111111110 3770 255T OFFH Use the Type options in the Add Variable dialog to choose a variable type 8 bit bytes 16 bit words 32 bit longs or ASCII strings Delete Variable Choose this option to remove the selected highlighted variable from memory and from the current variable list Clear All Choose this option to clear all variables in the current variable list M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 125 ICS08GPW In Circuit Simulator User Interface 6 7 3 Variable Wind
226. ick once on the Window menu to open the menu Figure 4 23 Click on the option to execute Cascade Tile Arrange Icons Minimize All Split 1 C PEMICRONC 3 CAPEMICRONCSOSGPWAGP2OTMI SM 4 CAPEMICRONCSOSGPW GP2OTMDC ASM Figure 4 23 WinIDE Window Menu Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 84 WinlDE User Interface MOTOROLA WinIDE User Interface WinlDE Window Options 4 14 1 Cascade Select the Cascade option from the Window menu to arrange the open source windows in overlapping or cascaded style Figure 4 24 like fanned cards In this arrangement open source windows are all set to the same size and shape one overlapping the other from the upper left hand to the lower right hand corner of the WinIDE main window with their title bars visible c WIN IDE HCOBGP20 PPF PE File Edt Environment Search Window Help PRERA Eee See a APPS NOTE AN1274 SCI EXAMPLE x This program illustrates the basic operation of transmitting and x receiving data packets using the SCI on the 68HC708XL36 with CGHA Assembled with IASH88 Uer 3 03 II I III III I III III I III III IIIS IIIS IIS IIIS IIS IIIS II SASS IISA Baud EQU 00 Baud rate set to default value J sect EQU 13 SCI Control Register 1 Loops EQU 7 Bit 7 Loop Mode Select Bit ENSCI EQU Bit 6 Enable SCI Bit jo TxINU EQU Bit 5 Transmit Inversion Bit J u EQU Bit 4 Mod
227. ied function These are used to control the erasing verifying programming and viewing of modules to be programmed These generic functions are implemented specifically for the MC68HC908GP20 by the 908 GP20 08P programming algorithm and by the 908 GP20 08P programming algorithm for the MC68HC908GP32 The SPGMR can be configured to program a processor resident in a target system For setup instructions see 2 5 Connecting to a Target System The programming routines for a particular module are loaded into the CPUOS on chip RAM for execution during erasure programming verification and showing of the module The routines and associated comments for a particular module are in the form of Motorola S records stored in a file with a 08P extension Any of the enabled features of the PROGOSSW programmer can be selected using the mouse or the up and down arrow keys or by typing the selection letters to the left of the selection display Pressing ENTER or double clicking the mouse will execute the highlighted entry if itis enabled The user will be prompted for any additional information required to execute the selected function Before a module can be programmed from an S record file select such a file otherwise the user will be asked to select one M68ICSO8GP In Circuit Simulator Rev 1 0 164 PROGO08SW FLASH Programmer MOTOROLA PROGO8SW FLASH Programmer Startup and Parameters 8 3 Startup and Parameters The PROGO8SW FLASH progr
228. ile executes The WAIT command establishes a pause between the execution of the macro file commands If a startup macro file is in the directory startup routines run the macro file each time the application starts See the STARTUP command for more information To create a macro file use either a text editor or the MACROSTART and MACROEND commands Syntax MACRO filename Where filename The name of a macro file to be executed with or without extension MAC The filename can be a path name that includes an asterisk wildcard character If so the software displays a list of macro files for selection Use with ICS08GPW and ICD08SW M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 261 Debugging Command Set MACRO Execute Batch File continued Examples MACRO INIT MAC Execute commands in file INIT MAC SCRIPT Display names of all MAC files then execute the selected file 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 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 262 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Stop Saving Commands to Batch File MACROEND The MACROEND command stops recording of the macro file in which the software has saved debug commands The
229. imulator Rev 1 0 274 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Program Counter PC The PC command assigns the specified value to the MCU program counter As the PC always points to the address of the next instruction to be executed assigning a new PC value changes the flow of code execution the code windows change accordingly The value entered with the command is displayed in the CPU Window An alternative way for setting the PC in a code window is to position the cursor on a line of code click the left mouse button to select the line then press the right mouse button and select the Set PC at Cursor menu item This assigns the address of that line to the PC Syntax PC address Where address The new PC value Use with CSO8GPW and ICD08SW Example PC 0200 Sets the PC value to 0200 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 275 Debugging Command Set POD Change Serial Port The POD command connects to the ICSO8GP circuit board through the specified serial COM port If successful this command responds with the current status of ports reset and IRQ pins on the board The command also shows the version of the board This command is used to change from stand alone mode no hardware pod attached to the host computer to in circuit simulation mode pod attached To change back to stand alone mode use the SIM08
230. in the middle of an intended instruction may cause improper results Syntax CODE lt add gt Where lt add gt The user code s starting address Use with ICD08SW only Example CODE 100 Shows the disassembled code in the code window starting at hex address 100 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 221 Debugging Command Set COLORS Set Simulator Colors The COLORS command opens the Change Window Colors dialog that allows choosing the text and background colors for windows in the ICSO8GPW simulator and ICD08SW debugger After setting the colors options for the windows save the changes using the SAVEDESK command For more information about using the Change Window Colors dialog see 6 21 2 Change Colors Syntax COLORS Use with ICSO8GPW and ICDO8SW Example COLORS Open the colors window Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 222 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Cycles Counter CYCLES or CY The CYCLES command changes the value of the cycle counter The cycle counter counts the number of processor cycles that have passed during execution The Cycle window shows the cycle counter The cycle count can be useful for timing procedures If no parameter is specified the current cycle count is displayed in the Status window This is useful for capturing the cycle count to a
231. indow command line M68ICSO8GP In Circuit Simulator Rev 1 0 204 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Instruction Breakpoint continued BR Syntax BR lt address gt lt n gt set a breakpoint BR list current breakpoints Where lt address gt The address for a breakpoint lt n gt Break after value code execution passes through the breakpoint n 1 times then breaks the nth time it arrives at the breakpoint Use with ICS08GPW and ICD08SW Examples BR 300 Set a breakpoint at address 300 BR 330 8 Set a breakpoint at address 330 break on eighth arrival at 330 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 205 Debugging Command Set BREAKA NOTE Operator s Manual Set Accumulator Breakpoint The BREAKA command sets an accumulator breakpoint to halt 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 as 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 The maximum number of breakpoint addresses is 64 Each BR BREAKA BREAKSP or BREAKHX command that includes an addres
232. indow without saving the changes M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 137 ICS08GPW In Circuit Simulator User Interface 6 14 4 Removing All Breakpoints In the Breakpoint window click the right mouse button to open the Breakpoint Shortcut menu Choose the Remove All Breakpoints menu option to clear all breakpoints Press the OK button to store changes and close the Breakpoint window or press the CANCEL button to close the Breakpoint window without saving changes 6 15 Register Block Window The Register Block window Figure 6 20 can be opened by pressing the REGISTER FILES button on the ICSO8GPW toolbar or by entering the R command in the Status window command line A Choose a Register Block or press ESC 68HC988GP20 Timer Interface Module TIM 68HC968GP26 Clock Generator Module CGH 68HC988GP28 Keyboard Interrupt Module KBI 68HC988GP28 Parallel Input Output Ports PIO 68HC9808GP20 Serial Communications Interface 68HC9G8GP26 System Integration Module SIM 68HC968GP26 Serial Peripheral Interface SPI 68HC988GP280 System and Memory Control SYS 68HC988GP280 Time Base Module TBH 68HC988GP28 Analog to Digital Convertor Figure 6 20 Register Block Window Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 138 ICSO8GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Reg
233. ing bit is clear Syntax V lt value gt Where lt value gt The value of the new symbol label Use with ICS08GPW and ICDOSSW Examples v O Clear the CCR V bit V1 Set the CCR V bit Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 314 Debugging Command Set MOTOROLA Display Variable Debugging Command Set Command Descriptions VAR The VAR command displays the specified address and its contents in the Variables window for viewing during code execution Variants of the command display a byte a word a long or a string As the value at the address changes the variables window updates the value The maximum number of variables is 22 In ASCII displays of variables control characters or other non printing characters appear as periods Byte word long or string variants determine the display format Byte B Hexadecimal and binary the default Word W Hexadecimal and decimal Long L Hexadecimal and decimal String S ASCII characters The optional n parameter specifies the number of string characters to be displayed the default value is 1 The n parameter has no effect for byte word or long values Syntax VAR B W L S address lt n gt Where lt address gt The address of the memory variable lt n gt Optional number of characters for a string variable default value is 1 does not apply to byte or word variables Use with ICSO8GPW a
234. ing file has this format file fields shown in the example are described in Table 5 4 AAAA CC VVVVVVVV LLLL Source Code Example 0202 05 1608 37 bset 3 tcsr clear timer overflow flag The listing file fields are described in Table 5 4 Table 5 4 Listing File Fields Field Contents Field Description The first field contains four hexadecimal digits indicating the AAAA address of the command in the target processor MCU memory The assembler generates this field The second field indicates the number of machine cycles used by the opcode The assembler generates this field Note that this value appears only if the cycle counter Cycle Cntr was turned on before assembly Also note that the CC value which always appears in brackets is a decimal value If a command has several possible cycle counts and the assembler cannot determine the actual number the CC field shows the best case lowest number An example of a command that may have several possible counts is a branch command The third field contains a label consisting of four hexadecimal digits indicating the values placed into that memory address and VVVVVVVV possibly the next several memory addresses Refer to this label in other commands The size of this field depends on the actual opcode The assembler derives this field from the source code The fourth field may contain up to four digits indicating the line DULE count The assembler derives this field from
235. instructions to be disassembled lt endrange gt Ending address for a range of instructions to be disassembled ICSOSGPW and ICD088W DASM 300 0300 A6E8 LDA 0E8 DASM 200 208 0200 5F CLRX 0201 A680 LDA 80 0203 B700 STA PORTA 0205 A6FE LDA FE 0207 B704 STA DDRA M68ICSO8GP In Circuit Simulator Rev 1 0 224 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Port A Direction Register DDRA The DDRA command assigns the specified byte value to the port A data direction register DDRA Bits assigned O denote input pins bits assigned 1 denote output pins Syntax DDRA n Where lt n gt The byte value to be placed into DDRA Use with ICSO8GPW only Examples DDRA FF Set all port A pins to be outputs DDRA 00 Set all port A pins to be inputs M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 225 Debugging Command Set DDRB Set Port B Direction Register The DDRB command assigns the specified byte value to the port B data direction register DDRB Bits assigned O denote input pins bits assigned 1 denote output pins Syntax DDRB lt n gt Where lt n gt The byte value to be placed into DDRB Use with ICSO8GPW only Examples DDRB 03 Set the lower two bits of port B pins as outputs set the others to be inputs DDRB FF Set all port B pins to be outputs Operator s Manual M681CS08GP In
236. ion on the data bus and asserts the write signal To read information from a memory location the CPU places the address of the location on the address bus and asserts the read signal In response to the read signal the selected memory location places its data onto the data bus N Abbreviation for negative a bit in the condition code register of the M68HCO8 In two s complement computer notation positive signed numbers have a 0 in their MSB most significant byte and negative numbers have a 1 in their MSB The N condition code bit reflects the sign of the result of an operation After a load accumulator instruction the N bit will be set if the MSB of the loaded value was a 1 object code file A text file containing numbers that represent the binary opcodes and data of a computer program An object code file can be used to load binary information into a computer system Motorola uses the S record file format for object code files operand An input value to a logical or mathematical operation opcode A binary code that instructs the CPU to do a specific operation in a specific way The M68HC08 CPU recognizes 210 unique 8 bit opcodes that represent addressing mode variations of 62 basic instructions OTPROM A non volatile type of memory that can be programmed but cannot be erased An OTPROM is an EPROM MCU that is packaged in an opaque plastic package It is called a one time programmable MCU because there is no
237. ircuit Simulator Rev 1 0 The starting memory address for display in the upper left corner of the memory window Display the contents of memory beginning at address 200 Display the contents of memory beginning at address 100 Operator s Manual MOTOROLA Debugging Command Set 267 Debugging Command Set MD2 Display Memory Window 2 at Address The MD2 command displays the contents of 32 emulation memory locations in the second memory window The specified address is the first of the 32 locations If a logfile is open this command also writes the first 16 values to the logfile Syntax MD2 address Where address Use with ICD08SW only Example MD2 1000 Operator s Manual The starting memory address for display in the upper left corner of the memory window Display the contents of 32 bytes of memory in the second memory window beginning at address 1000 M68ICSO8GP In Circuit Simulator Rev 1 0 268 Debugging Command Set MOTOROLA Modify Memory M68ICSO8GP In Circuit Simulator Rev 1 0 Debugging Command Set Command Descriptions MM or MEM The MM or MEM command directly modifies the contents of memory beginning at the specified address The optional variant specifies whether to fill the block in bytes B the default in words W or in longs L If however the command has only an address value the Modify Memory dialog see Figure 10 2 appears sh
238. is the keyboard equivalent of the Execute Reset Processor menu option Choose Step from the Execute menu to send the single step TRACE command to the MCU The Step command executes a single instruction beginning at the current PC address value The Step command does not execute instructions in real time so timer values cannot be tested using this command Alternative Press the F5 function key This is the keyboard equivalent to choosing the Execute Step menu option Choose Multiple Step from the Execute menu to send the STEPFOR command to the MCU The STEPFOR command begins continuous instruction execution beginning at the current PC address value and continuing until any key is pressed The Multiple Step command does not execute instructions in real time so timer values cannot be tested using this command Alternative Press the F6 function key This is the keyboard equivalent to choosing the Execute Multiple Step menu option Choose Go from the Execute menu to start execution of code in the ICSO8GPW at the current address Code execution continues until a stop command is entered a breakpoint is reached or an error occurs M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICSO8GPW In Circuit Simulator User Interface 149 ICS08GPW In Circuit Simulator User Interface 6 20 5 Stop Alternative Press the F7 function key This is the keyboard equivalent to choosing the Execute Go menu opti
239. ister Block Window If register files have been installed on the host computer selecting a block brings up the Register Files window Figure 6 21 which shows a list of the files their addresses and their descriptions This begins interactive setup of system registers such as I O timer and COP watchdog A 68HC908GP20 Serial Communications i E3 6613 SCCR1 SCI Control Register 1 6614 SCCR2 SCI Control Register 2 6615 SCCR3 SCI Control Register 3 6616 SCSR1 SCI Status Register 1 6617 SCSR2 SCI Status Register 2 6618 SCDR SCI Data Register 6619 SCBR SCI Baud Rate Figure 6 21 Register Files Window Selecting a file brings up the Register window Figure 6 22 which displays the values and significance for each bit in the register The registers can be viewed and their values modified and the values can be stored back into debugger memory Register Window Iof xi Raw Register Value Read Write 01001111 4F 079T Bits Description Current Value 67 TIE Transmit Interrupt 0 TDRE interrupts disabled TCIE Transmit Complete 1 SCI interrupt if TC 1 Receive Interrupt 0 RDRF DMA interrupts disabled Idle Line Interrupt 20 IDLE interrupts disabled Transmiter Enable 41 Transmission enabled Receiver Enable 1 Receiver enabled Receiver Wakeup 1 Standby state Send Break 1 Transmit break characters Mouse Left Button Select which Bit Field Key Up Down Select which Bit Field Mouse Double Click Cha
240. ix A S Record Information e HEX is the Intel 8 bit object code format In either case the object code file produced by the CASMOSW assembler is a text file containing numbers that represent the binary opcodes and data of the assembled program This object code file can be sent to the MCU using a programmer or bootstrap program at which time it is converted to the binary format required by the target CPU The object filename depends on the choice made in the command line of the Windows Program Item Properties By default the object filename is that of the file being assembled with the proper object file format extensions An existing file with the same name will be overwritten If a map file using the D parameter is specified the P amp E debug MAP file is created during the assembly P amp E Microcomputer Systems products such as the MMDS and the MMEVS use these map files during the source level debugging process Map files contain the directory path information under which they are created and cannot therefore be moved to a new directory If the map file must be used from a different directory place the file in the new directory and reassemble using the map file option D in the Windows command line M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO8W Assembler Interface 95 CASMO8W Assembler Interface 5 5 3 Listing Files Operator s Manual Listing files display each line of so
241. l Editor options General Editor Tab osse oes General Environment options General Environment Tab General Options eiii Give user option to save each file GO command o ooo o eee GOEXIT commadd o o o o ooo o o o GOMACRO command GONEXT command 0 Gotil Address at Cursor GOTIL command 0040 GOTOCYCLE command Hcommand 2 00 ee en hardware installati0M o oooooooo o DUO A ee hee EQUES E RP eee es requirements xed dubee e p REX T dees specifications 0 0 ee eee HELP command 0005 HEX format 0 0 0 0 0 0 0 ccc eee eee hexadecimal number format hexadecimal values field in listing file six s C eee toads HREG command lllesss humidity 25 eee eyed se beeadens RE HX command o M68ICSO8GP In Circuit Simulator Rev 1 0 Index Operator s Manual MOTOROLA Index 391 ICDOSSW siocinsatanerantsidernd rara cier daran 43 CONS WIBUDW sedat pita ae ace ipao OR Aa 177 Colors WindOW ios bkwak ERA ERES adn UR RR Da RR RR as 183 command recalls aia Aaa 186 CPU WindOW si X RA RO CN ROC RR ER ROCA ACRI CR EC QS 184 debugging commands 22 22ecs e carer snes oda rede dhe eA Rer RS 185 description a ou eser Emp ER AER 26 27 28 43
242. l M681CS08GP In Circuit Simulator Rev 1 0 294 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Display Code at PC Address SHOWPC The SHOWPC command displays code in the Code window starting from the address in the program counter PC The code window shows either source code or disassembly from the given address depending on which mode is selected for the window All values registers and code currently displayed are recorded in the logfile This command is often useful immediately after the SHOWCODE command Syntax SHOWPC Use with ICS08GPW and ICDOSSW Example SHOWPC Show code from the PC address value M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 295 SHOWTRACE Display Trace Window The SHOWTRACE command displays the trace window showing the last 1024 instructions that were executed after the TRACE command is used Syntax SHOWTRACE Use with ICSOSGPW only Example SHOWTRACE Open the trace window Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 296 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Switch Simulation Mode SIMO8 The SIMO8 command allows switching from in circuit simulation with the M68ICSO8GP20 hardware pod connected to the host computer to stand alone simulation without the pod connected Syntax SIMO8 Use with ICSOSGPW only Example
243. l with the ESC key Syntax MACS Use with ICDO8SW only Example MACS Displays a window with a list of macros M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 265 Debugging Command Set MAP Show Information in Map File The MAP command allows viewing of information from the current map file stored in memory All symbols defined in the source code used for debugging will be listed The debugger defined symbols defined with the SYMBOL command will not be shown The MAP and SHOWMAP commands are identical Syntax MAP Use with ICSO8GPW and ICDO8SW Example MAP Shows symbols from the loaded map file and their values Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 266 Debugging Command Set MOTOROLA Display Memory at Address Syntax Use MD with Use MD1 with Examples Debugging Command Set Command Descriptions MD or MD1 The MD command displays in the memory window the contents of memory locations beginning at the specified address The number of bytes shown depends on the size of the window and whether ASCII values are displayed If a logfile is open this command also writes the first 16 bytes to the logfile For ICSO8GPW the SHOW command is identical For ICD08SW the display is in the first memory window MD address Where address ICSOSGPW and ICD08SW ICD08SW only MD 200 SHOW 100 M681CS08GP In C
244. le SHOWBREAKS Open the breakpoint window Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 292 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Display Code at Address SHOWCODE The SHOWCODE command displays code in the Code window beginning at the specified address without changing the value of the program counter PC The Code window shows either source code or disassembly from the given address depending on which mode is selected for the window This command is useful for browsing through various modules in the program To return to code where the PC is pointing use the SHOWPC command Syntax SHOWCODE address Where address The address or label where code is to be shown Use with CSO8GPW and ICDOSSW Example SHOWCODE 200 Show code starting at location 200 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 293 Debugging Command Set SHOWMAP Show Information in Map File The SHOWMAP command allows viewing of information from the current map file stored in memory All symbols defined in the source code used for debugging will be listed The debugger defined symbols defined with the SYMBOL command will not be shown The MAP and SHOWMAP commands are identical Syntax SHOWMAP Use with ICSOSGPW and ICDO8SW Example SHOWMAP Show symbols from the loaded map file and their values Operator s Manua
245. le is a straight through cable supporting all nine pins of the serial port connection Make sure that no hardware security key or other devices are attached to the serial port or cable Make sure that the host PC supports the minimum speed requirements of the ICSO8GPW software Make sure to use the correct security code to access the MCU If the security bytes have been programmed previously the part will not unlock and enter monitor mode unless the correct security code is sent to the MCU M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 347 Technical Reference and Troubleshooting g Check for data at the pod end of the serial cable Pin 3 of this connector carries RS 232 data into the pod pin 2 carries RS 232 data out of the pod Pin 4 controls the socket power Pin 5 is ground While the ICSO8GPW software is trying to establish communications pins 3 and 4 should both toggle between 10 Vdc and 10 Vdc or 12 Vdc and 12 Vdc If these signals are not seen at the cable end the problem is on the PC and cable side of the system When connected to the pod a 10 Vdc signal on pin 4 should activate the socket power and socket power LED h Make sure the serial data is getting to the MCU s PTAO pin First exit any ICSO8GPW software that may be running on the host PC Then disconnect power from the SPGMR Ensure that the ICSO8GP20 board is installed on the SPGM
246. lect the Save Project As option from the Environment menu 2 Inthe dialog box enter a path and a descriptive project filename with the PPF extension Place the project file in the directory where the source files will be located 11 3 2 Create the Source Files Create new or edit existing source code files using the WinIDE editor 1 From the File menu choose the New File option to create a blank source window in which to enter source code or open an existing file using the Open File option All the source code files in the WinIDE editor can be worked on individually 2 After creating the new file or editing the existing file from the File menu choose the Save File option to assign a path and filename to the source file or choose the Save File As option to assign a new path and filename to an existing file 3 Create all the source code files required for the project The example project consists of 12 source code files created in the WinIDE editor The files are then assembled into ASM files using WinIDE ASSEMBLE COMPILE toolbar button The 12 files are then listed in a separate file MAIN ASM The MAIN ASM file consists of INCLUDE functions each followed by the filename for the source code file followed by an optional comment describing the function of the code in that file Using the INCLUDE function in a main file lets the user organize source code logically into a number of small files ultimately making it easier to
247. lock A square wave signal that is used to sequence events in a computer command set The command set of a CPU is the set of all operations that the CPU knows how to perform One way to represent an instruction set is with a set of shorthand mnemonics such as LDA meaning load A Another representation of an instruction set is the set of opcodes that are recognized by the CPU condition codes register The CCR have five bits H I N Z and C that can be used to control conditional branch commands The values of the bits in the CCR are determined by the results of previous operations For example after a load accumulator LDA instruction Z will be set if the loaded value was 00 CPU Central processor unit The part of a computer that controls execution of instructions CPU cycles A CPU clock cycle is one period of the internal bus rate clock Normally this clock is derived by dividing a crystal oscillator source by two or more so the high and low times will be equal The length of time required to execute an instruction is measured in CPU clock cycles CPU registers Memory locations that are wired directly into the CPU logic instead of being part of the addressable memory map The CPU always has direct access to the information in these registers The CPU registers in an M68HCOS8 are A 8 bit accumulator X 8 bit index register CCR condition code register containing the H I N Z and C bits SP stack p
248. logfile Syntax CYCLES lt n gt Where lt n gt Integer value for the cycles counter Use with ICSO8GPW only Examples CYCLES 0 Reset cycles counter CY 1000 Set cycle counter value to 1000 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 223 Debugging Command Set DASM NOTE Syntax Use with Examples Operator s Manual Disassemble Memory The DASM command disassembles machine instructions displaying the addresses and their contents as disassembled instructions in the debug window If the command includes an address value one disassembled instruction 1s shown beginning at that address If a command is entered without any parameter values the software finds the most recently disassembled instruction then shows the next instruction disassembled If the command includes startrange and endrange values the software shows disassembled instructions for the range If the DASM command is entered with a range sometimes the disassembled instructions scroll through the status window too rapidly to view In this case enter the LF command to record the disassembled instructions in a logfile or use the scroll bars in the status window DASM lt address gt lt startrange gt lt endrange gt Where lt address gt First address of three instruction opcodes to be disassembled lt startrange gt Starting address for a range of
249. logic should ie xis pioirecuonal be tied to this signal Held at 5 Vdc during reset 13 TGT_PTC1 Bidirectional Connect to user circuit that normally would be connected to PTC1 on the MCU TUMOR Connect to MCU PTC1 pin No other target system logic should M x Pidireetional be tied to this signal Grounded during reset Operator s Manual M68ICS08GP In Circuit Simulator Rev 1 0 330 Using the MONOS Interface MOTOROLA Using the MONOS Interface Connecting to the In Circuit Simulator Table 12 2 MONO8 Target System Connector P2 Continued Pin No ee Direction Target System Connection Connect to user circuit that normally would be connected to PTC3 15 TGT_PTC3 Bidirectional on the MCU Connect to MCU PTC3 pin No other target system logic should 18 be tied to this signal Grounded during reset Bidirectional P1 Figure 12 1 MONO8 Target System Connector Layout 12 4 Connecting to the In Circuit Simulator Using the 16 pin cable provided with the M68ICSOSGP20 kit connect one end of the cable to the ICSOSGP20 board at J6 Connect the other end to connector P2 on the target system board The pin 1 indicators on each cable end must correspond to the pin 1 indicators on the headers P1 is not used when connecting to the ICSO8GP20 board M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Using the MONOS Interface 331 Using the MONO8 Interface 12 5 Dis
250. lt gt 3D4 lt gt 4D4 lt gt 3D4 lt gt 4D4 lt gt 2C1 lt gt 3D4 lt gt 4D4 lt gt 3D4 lt gt 4D4 lt gt 3D4 lt gt 4D4 lt gt 2B1 lt gt 3D4 lt gt 2B1 lt gt 4D4 lt gt 2B1 gt 4D4 lt 2C1 4C4 lt 2A1 lt 4D4 gt 2A1 lt gt 4A4 lt gt 2A1 lt gt 4A4 lt gt T SIGNAL CROSS REFERENC meztizasuco Oma ON HATA SIZE DRAWING NO A er 63XAS Lr GEDABV SCH_1 Oq239W REV LAST MODIFIED Fri Sep 18 11 11 25 1998 SHEET 5 OF 6 2 1 C1 c2 ea c4 c5 C6 C7 c8 c9 C10 C11 C12 GRI J1 J2 J3 J5 J6 J7 J8 Q1 Q2 R1 R2 R3 R4 R5 R6 R7 UA U5 U6 u7 wi W2 W3 XUL XU2 XU3 Unit Cross Reference for the entire design MOT CAP 2D4 MOT TCAP 2C3 MOT CAP 2D3 MOT CAP 4C4 MOT CAP 4C4 MOT CAP 2D3 MOT CAP 4C3 MOT CAP 2D3 MOT CAP 2D3 MOT CAP X 2D3 MOT CAP 2D4 TCAP 2C2 MOT SCHTKY 2B4 HDR2 4B3 CON40 4B2 CON40 4D2 CON40 4C2 HDR2 4B3 HDR8_2 2B2 SKT10 1 2D2 SKT10 1 2C2 BS170 2B4 BS170 2B4 MOT RES 2D1 MOT RES 2D1 MOT RES 2C4 MOT RES 2B1 MOT RES 2B1 MOT RES 2B3 MOT RES 204 MAX394 2B2 HCO4A 2A3 2B3 2B3 2B4 2D4 HCO2A 2B3 2B4 2C3 2D4 MC74HC4040A 2C3 HDR2 4C4 HDR3_1 4D4 HDR2 4C4 HC908GP20 3B3 HC908GP20 3C3 HC908GP20 3D3
251. main1 asm List files of type Assembly files asm Figure 4 7 Open File Dialog Window Each file opens in its own client window within the main WinIDE window Alternatives Type CTRL O or click the OPEN button on the toolbar This is the keyboard equivalent to choosing the File Open File menu option M68ICSO8GP In Circuit Simulator Rev 1 0 60 WinlDE User Interface MOTOROLA 4 10 3 Save File 4 10 4 Save File As 4 10 5 Close File WinlDE User Interface WinlDE File Options Choose Save File from the File menu to save the file in the active source window e Ifthe file is saved for the first time that is it has not yet been named the Save As dialog appears Enter a new filename for the file and accept the current file type directory or folder and drive or choose new options Press the OK button to save the file to the selected drive directory e Ifthe file has been saved previously and has a name the file is saved with the filename in the directory and drive previously specified and the source window remains open Alternatives Type CTRL S or click the SAVE button on the toolbar This is the keyboard equivalent to choosing the File Save File menu option Choose Save File As from the File menu to save the contents of the active source window and assign a new filename The Save As dialog opens Enter a new filename in the File Name field and click the OK button to save the file and ret
252. mand is used in MACRO files to control when inputs come into the simulator If a WAIT command is encountered control is passed back to the keyboard Then the macro file execution waits for a command to be entered such as GO or STEP which starts MCU execution once again As soon as the number of cycles that pass is equal to the lt n gt value of the WAIT command the simulator resumes executing commands of the macro file until another WAIT is encountered or the two mentioned conditions happens again Syntax WAIT lt n gt Where lt n gt The hexadecimal number of cycles to wait Use with ICS08GPW only Example WAIT A Delay command execution for 10 MCU cycles Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 318 Debugging Command Set MOTOROLA Display Symbol Value Debugging Command Set Command Descriptions WHEREIS The WHEREIS command displays the value of the specified symbol Symbol names are defined through source code or the SYMBOL command Alternatively this command returns the symbol at a specified address Syntax WHEREIS lt symbol gt lt address gt Where lt symbol gt A symbol listed in the symbol table lt address gt Address for which a symbol is defined Use with ICSO8GPW and ICD08SW Examples WHEREIS START Display the symbol START and its value WHEREIS 0300 Display the value 0300 and its symbol name if any M68ICSO8GP In Circuit Simulator Rev 1 0 Operato
253. mes and then goes out the host PC is able to control the pod but communications may still not be being established with the MCU on the target system As the flickering of the socket power LED indicates the host PC is applying and removing power to the ICSO8GP20 board during this period Use an oscilloscope to view the voltages on J7 as the software tries to establish communication with the MCU Restart or retry the ICSO8GPW software while looking at the signals Using J7 pin 1 as the ground reference check for a signal that varies between 0 and 5 Vdc at J7 pin 10 pod Vcc and J7 pin 4 SP RESET If these voltages are present the pod power is good but the MCU is not being placed in monitor mode Continue with step 9 If the socket power LED comes on and stays on communication is probably established with the MCU Check for the following voltages at J7 on the ICSOSGP20 board using J7 pin 1 as the ground reference Approximately 8 5 Vdc at J7 pin 3 and J7 pin 9 Approximately 1 25 Vdc at J7 pin 6 5 Vdc at J7 pin 4 and J7 pin 10 If these voltages are present the pod power is good Continue with step 9 M68ICSO8GP In Circuit Simulator Rev 1 0 352 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Troubleshooting MONO8 Mode 9 Make sure the host PC can communicate with the MCU a The MCU s PTAO pin is used for host communications DDRA bit 0 should never be set to 1 as this inte
254. mmand Set 235 Debugging Command Set GOMACRO Execute Macro after Break The GOMACRO command executes the program in the simulator beginning at the address in the program counter PC Execution continues until a key is pressed until it arrives at a breakpoint or until an error occurs Afterward it runs the specified macro file just like the MACRO command Syntax GOMACRO filename Where filename The name of a script file to be executed with or without extension MAC or a pathname that includes an asterisk wildcard character When the asterisk is entered the command displays a list of appropriate files from which the required file can be selected Use with ICSO8GPW only Example GOMACRO AVCALC MAC Begin code execution at the current PC value at breakpoint execute macro AVCALC MAC Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 236 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Execute Until Address GOTIL The GOTIL command executes code beginning at the address in the program counter PC Execution continues until the program counter contains the specified ending address until a key or the STOP button on the ICSO8GPW toolbar is pressed until it reaches a breakpoint or until an error occurs Syntax GOTIL lt endaddr gt Where lt endaddr gt The address at which execution stops Use with ICS08GPW and ICD0SSW Example GOTIL 2F
255. mmand Set MOTOROLA Debugging Command Set Command Descriptions Set Port D Inputs INPUTD The INPUTD command sets the simulated inputs to port D The CPU reads this input value when port D is set as an input port NOTE Ifthe ICSO8GP circuit board is connected port D inputs come from the board so this command has no effect Syntax INPUTD n Where n Eight bit simulated value for port D Use with ICSOS8GPW only Example INPUTD 01 Simulate the input 01 on port D M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 247 Debugging Command Set INPUTE Set Port E Inputs The INPUTE command sets the simulated inputs to port E The CPU reads this input value when port E is set as an input port NOTE Ifthe ICSOSGP circuit board is connected port E inputs come from the board so this command has no effect Syntax INPUTE lt n gt Where n Eight bit simulated value for port E Use with ICSOS8GPW only Example INPUTE 01 Simulate the input 01 on port E Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 248 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Show Port Inputs INPUTS The INPUTS command shows the simulated input values to port A and B entered via the INPUTA or INPUTB commands NOTE Ifthe ICSOSGP circuit board is connected this command shows input values from
256. monic Schematic NET Direction Signal Description 29 PTD6 T2CHO Port D I O bit 6 timer 2 channel 0 30 PTD7 T2CH1 PTD lt 7 gt Bidirectional Port D I O bit 7 timer 2 channel 1 31 PTBO ADO PTB lt 0 gt Bidirectional Port B I O ADC input bit 0 32 PTB1 AD1 Port B 1 0 ADC input bit 1 33 PTB2 AD2 PTB lt 2 gt Bidirectional Port B I O ADC input bit 2 34 PTB3 AD3 PTB lt 3 gt Bidirectional Port B I O ADC input bit 3 35 PTB4 AD4 Port B 1 0 ADC input bit 4 36 PTB5 AD5 PTB lt 5 gt Bidirectional Port B I O ADC input bit 5 37 PTB6 AD6 PTB lt 6 gt Bidirectional Port B I O ADC input bit 6 38 GND Flex cable shield ground 39 PTB7 AD7 PTB lt 7 gt Bidirectional Port B I O ADC input bit 7 40 GND GND Flex cable shield ground M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 359 Technical Reference and Troubleshooting Table B 3 Target B Connector J4 Pin No Mnemonic Schematic NET Direction Signal Description 1 TGT VDD ADC analog power voltage reference high 2 NC No connection 3 NC No connection 4 m No connection 5 NC No connection 6 NC No connection 7 GND ADC analog ground voltage reference low 8 No connection 9 GND GND Flex cable shield ground 10 PTAO KBDO TGT PTA 0 Bidirection
257. mple the format consists of e An S0 header e Four S1 code data records e An S9 termination record Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 336 S Record Information MOTOROLA S Record Information S Record Example A 6 1 SO Header Record The SO header record is described in Table A 4 Table A 4 SO Header Record S Record m Field Description Type S record type SO indicating a header record Hexadecimal 06 decimal 6 indicating six eoo on character pairs or ASCII bytes follow Address 4 character 2 byte address field zeroes Code Data Descriptive information identified these S1 records ASCII H D and R HDR Checksum Checksum of SO record M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA S Record Information 337 S Record Information A 6 2 First S1 Record The first S1 record is described in Table A 4 S Table A 5 S1 Header Record Record Field Entry Description Tvpe Si S record type S1 indicating a code data record yp to be loaded verified at a 2 byte address Hexadecimal 13 decimal 19 indicating 19 Record length 13 character pairs representing 19 bytes of binary data follow 4 character 2 byte address field hexadecimal Address 0000 address 0000 indicates location where the following data is to be loaded Code Data Opcode Instruction 28 5F BHCC f0161 24 SF BCC 0163 22 12 BHI 0118 22 6
258. n circular buffer that contains all addresses that have been executed When the trace window displays instructions it disassembles instructions at the addresses stored in the trace buffer For this reason the tracing function cannot be used for self modifying code If a buffer slot does not have an address stored in it the trace window displays the phrase No Trace Available The number in the beginning of a trace line is the slot number in the trace buffer The slot number is an offset for the instruction in that slot compared to the current instruction executing slot number 0 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 134 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Breakpoint Window 6 14 Breakpoint Window Use the Breakpoint window Figure 6 18 to view all breakpoints currently set in the current debugging session and to add modify or delete breakpoints A maximum of 64 breakpoints can be set Breakpoint Window Address BreakA BreakX BreakSP Available Available Add Breakpoint Edit Breakpoint Delete Breakpoint Remove All Breakpoints Help Eee ERASE Figure 6 18 Breakpoint Window with Shortcut Menu To display the Breakpoint window enter the SHOWBREAKS command in the ICSOSGPW Status window command line If a breakpoint slot is empty the word available appears under the Address column M68ICSO8GP In Circuit Simula
259. n to two kinds of object code files the assembler produces MAP and or LST files as well Listing files show the original source code or mnemonics including comments as well as the object code translation Use this listing during the debugging phase of the development project It also provides a basis for documenting the program M68ICSO8GP In Circuit Simulator Rev 1 0 92 CASMO8W Assembler Interface MOTOROLA CASMO8W Assembler Interface CASMO8W Assembler User Interface 5 3 CASMO8W Assembler User Interface The assembler interface consists of a window that appears briefly in the WinIDE main window during assembly This window Figure 5 1 contains information about the file being assembled Main File Path and filename of the main file being assembled Current File Path and filename of the current file being assembled e Status Assembler status as the assembly proceeds Current Line Current line position of the assembler Total Lines Total number of lines in the file being assembled ae WIN IDE HCO8GP20 PPF File Edit Environment Search Window Help A 2 o e at as C PEMICROM PW GP20TMO as C PEMICRO ICSO8GPW HC20PWM1 ASM unbuffered PWM example A periodic waveform with specified duty cycle and period will bgoonorstod an gt cnacitind channal Assembled with In MIEL o x Register Equates Main File ICSOBGPWOHCAUPWHILASM TSC equ Te equ Current
260. nalyzing and programming microcontroller programs Use the commands to Initialize emulation memory e Display and store data e Debug user code Control the flow of code execution M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging with ICS08GPW 153 Debugging with ICSO8GPW 7 3 ICSO8GPW Debugging Command Syntax A command is a line of ASCII text entered from the computer keyboard For ICSO8GPW debugging commands enter the command and its arguments in the ICSO8GPW Status window command line Press ENTER to terminate each line and activate the command The typical command syntax is command lt argument gt Where command A command name in upper or lower case letters argument An argument indicator when arguments are italicized they represent a placeholder for the actual value entered when not italicized they indicate the actual value to enter Table 7 1 explains the possible argument values In command syntax descriptions Brackets enclose optional items A vertical line means or An ellipsis means the preceding item can be repeated Parentheses enclose items only for syntactical purposes Except where otherwise noted numerical values in debugging command examples are hexadecimal Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 154 Debugging with ICSOBGPW MOTOROLA 7 4 Command Set Summary Debugging with ICSO8GPW Command Set Summary
261. nd ICD08SW Examples VAR CO Show byte value of address CO hex and binary VAR B D4 Show byte value of address D4 hex and binary VAR W EO Show word value of address EO hex and decimal VAR S CO 5 Show the 5 character ASCII string at address CO M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 315 Debugging Command Set VERIFY Verify S Record File The VERIFY command compares the contents of program memory with an S record file The name of the file is prompted The comparison stops at the first memory location that differs from the file Syntax VERIFY Use with ICD08SW only Examples LOADALL Test s19 VERIFY Displays the message Verifying verified Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 316 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Display Software Version VERSION or VER The VERSION command displays the version and date of the software VER is an alternate form of this command Syntax VERSION Use with ICS08GPW and ICDO8SW Examples VERSION Display version and date of the software VER Display version and date of the software M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 317 Debugging Command Set WAIT Wait for n Cycles The WAIT command delays simulator command execution by the specified number of cycles This com
262. nd returns to Windows 8 4 13 RE REset Chip 8 4 14 HE HEIp This causes a hardware reset to the CPUOS chip This command can be used to recover from errors that cause the programmer not to be able to communicate with the processor through the MONOS monitor interface This command opens a window of help topics on the screen The user can then select a particular topic and page through its text description 8 5 Programming Example These programming steps illustrate a typical sequence for using the PROGOS8SW commands 1 Start the PROGO8SW software as described in 8 3 Startup and Parameters When PROGOSSW starts it performs an automatic REset see 8 4 13 RE REset Chip and brings up the Choose Module selection window 2 Select the 908 GP20 08P file from the Choose Module window 3 Execute the Blank Check Module command 8 4 1 BM Blank Check Module 4 Ifthe results from the BM command indicate that the module is not blank execute the Erase Module command see 8 4 3 EM Erase Module Then repeat the BM command which should now indicate that the module is blank M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA PROGO8SW FLASH Programmer 169 PROGO8SW FLASH Programmer 5 With the Specify S record command see 8 4 7 SS Specify S Record select the S record file to load into the module 6 Execute the Program Module command see 8 4 5 PM Program Module 7 To
263. nd to the file or Cancel the peration Append Cancel Figure 6 12 Logfile Already Exists Window e Status window messages are added to the logfile while logging is enabled To end logging choose the End Logfile option from the ICSO8GPW file menu or enter the LF command in the ICSOSGPW Status window command line 6 10 CPU Window The CPU window displays the current register values 6 10 1 Changing Register Values Use the CPU window Figure 6 13 or its shortcut menu options to view and modify the current state of registers within the CPU e Tochange CPU register values using the shortcut menu options position the cursor in the CPU window and click the right mouse button Choose the option from the shortcut menu shown on the right of Figure 6 13 Enter the new value in the dialog and press OK to close the dialog and save the new value Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 130 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface CPU Window a CPUO8 olx ACCA 22 Set Accumulator HREG 66 Ser HREG Index Reaister XREG 44 Set XREG Index Register PC 6186 Set PC CCR 11 I Set Condition Codes SP 88FF Help Figure 6 13 CPU08 Window with Shortcut Menu e To change CPU register value in the CPU window To change the CPU accumulator ACCA HREG index register XREG index register and program counter PC values from the
264. ndow Help saele EER e m e s a MENU na 2s C PEMICRO ICSO8GPW GP20_SCIASM TOOLBAR SOURCE WINDOWS t foonese wite adore BYTECOUNT number of bytes in buffer write a buffer mou Wbuffer inst addr save address at end of page write next page mou dimax pulse cnt inst addr inst addr write more pgm fdiu set pgm and fdiu bits flash control flash protect read flash protect register address inst addr 8t write_next write_mov 4 write mov buffer x inst addr check for end of page write next ipgm fdiu huen sta wait pgm fdiu margin t_150us sta_wait fdiv_margin MAIN WINDOW Sta ware 90 clr flash cntl address margin read STATUS BAR Exe Totat 250 Tog 173 Bytes 10835 Insert Figure 4 1 WinIDE Window Components M68ICSO8GP In Circuit Simulator Rev 1 0 Operators Manual MOTOROLA WinIDE User Interface 49 WinIDE User Interface 4 4 WinIDE Main Window 4 4 1 Main Window Functions When first starting the WinIDE editor the Main window opens without any source or project files As source files are opened or a project is created they appear as subordinate windows in the Main window Using standard Windows techniques and the WinIDE window menu options subordinate windows can be moved sized and arranged Use the WinIDE Main window to e Open create edit save or print source ASM LST MAP and 19 or project PPF file e Configure the desktop and environment settings for the edi
265. nents during monitor mode entry 9 When connecting to a target system observe the setting of W2 target RST direction W2 is provided to allow the user to select whether the target system can reset the MCU on the pod jumper between pins 2 and 3 or whether the target system receives a reset signal from the pod jumper between pins 1 and 2 RST is not a bidirectional open drain signal at the target connectors Removing the jumper leaves the RST_IN signal pulled up to 5 V 10 When connecting to a target system observe the setting of W3 target Vpp disconnect W3 is provided to allow the user to select whether the pod powers the target system s MCU and external circuitry W3 jumper on or whether the target provides the power for its MCU and circuitry W3 jumper off The only target system Vpp supported is 5 Vdc in either case CAUTION Remove the W3 jumper when the target system is powered by a source other than the pod Failure to remove the jumper in this case will cause the two power supply outputs to be connected together possibly causing large currents to flow over the target cable If the pod is to provide power to the target system ensure that the current drain on the target connector s Vpp pins is kept under 100 mA Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 350 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Troubleshooting MONO8 Mode B 5 Troubleshooting
266. nge current bit field value Key Left Right Change Current Bit Field Value Mouse Right Button Show all settings for bit field Key Space bar Show all settings for bit field Figure 6 22 Register Window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICSO8GPW In Circuit Simulator User Interface 139 ICS08GPW In Circuit Simulator User Interface 6 16 Entering Debugging Commands To enter commands in the ICSOSGPW Status window command line 1 Type the command and its options and or arguments in the text area the command line When the command is complete press the ENTER key to execute the command If the command has not been entered correctly the Status window will display a message such as Invalid command or parameter If the command has been entered correctly other prompts messages or data appropriate to the command entered are displayed in the Status window text area After the command has been executed a new blank line appears in the command line The ICSO8GPW maintains a command buffer containing the commands and system responses to the commands entered on the command line Use the mouse or keyboard commands to sequence forward or backward through the command buffer For more instructions on using the ICSO8GPW command set see Section 7 Debugging with ICSO8GPW 6 17 ICSO8GPW Toolbar Operator s Manual The ICSO8GPW toolbar Figure 6 23 provides a number of conv
267. nics to represent instructions Assembler directives provide additional information such as the starting memory location for a program Labels are used to indicate an address or binary value ASCII American Standard Code for Information Interchange A widely accepted correlation between alphabetic and numeric characters and specific 7 bit binary numbers breakpoint During debugging of a program it is useful to run instructions until the CPU gets to a specific place in the program and then enter a debugger program A breakpoint is established at the desired address by temporarily substituting a software interrupt SWI instruction for the instruction at that address In response to the SWI control is passed to a debugging program byte A set of exactly eight binary bits M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Glossary 377 Operator s Manual C Abbreviation for carry borrow in the condition codes register of the M68HC08 When adding two unsigned 8 bit numbers the C bit is set if the result is greater than 255 FF CCR Abbreviation for condition codes register in the M68HCO08 The CCR has five bits H I N Z and C that can be used to control conditional branch instructions The values of the bits in the CCR are determined by the results of previous operations For example after a load accumulator LDA instruction Z will be set if the loaded value was 00 c
268. ning instruction mnemonics labels comments and assembler directives The source file is processed by an assembler to produce a composite listing and an object file representation of the program stack pointer A CPU register that holds the address of the next available storage location on the stack Vpp The positive power supply to a microcontroller typically 5 volts dc Vss The 0 volt dc power supply return for a microcontroller Word A group of binary bits Some larger computers consider a set of 16 bits to be a word but this 1s not a universal standard M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Glossary 381 X Abbreviation for index register a CPU register in the M68HC08 Z Abbreviation for zero a bit in the condition code register of the M68HCO8 A compare instruction subtracts the contents of the tested value from a register If the values were equal the result of this subtraction would be zero so the Z bit would be set after a load accumulator instruction the Z bit will be set if the loaded value was 00 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 382 Glossary MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator Index Symbols PRFILE 1 ane HERES A HERR GES 55 56 70 76 79 324 A Accomimands rendida dens bb ee 197 ACC command 2b db e RUSSE ERR RES 197 Accumulator Valle 22 se lese et e ep a TR ee
269. nt Settings Eg General Editor EXE1 Debugger EXE2 Programmer EXE Path D 4PEMICRONWINIDES NCASMW cas Type PaE CASMWxx Assembler v Output Control Listing Options v Output 19 Object Iv Show Cycles in Listing v Output Debug File IV Expand Includes in Listing Y Output Listing File Y Expand Macros in Listing PE Preferences v Show Assembler Progress V Save Files Before Assembling Wait for Assembler Result J Sound Bell on Error Figure 4 15 Environment Settings Dialog Assembler Compiler Tab TYPE Click on the downward pointing arrow to the right ofthe Type list box to display the compiler types Click on the compiler type to select it The options in the Assembler Compiler tab change according to the compiler type chosen With the CASMOSW compiler selected a number of compiler options are available Ifa different compiler is selected options allow the user to specify the parameters to pass to the compiler M68ICSO8GP In Circuit Simulator Rev 1 0 74 WinlDE User Interface MOTOROLA WinlDE User Interface WinlDE Environment Options Output Control These options specify the output files that the assembler will create Output S19 Object Select this option to have the assembler output an 19 object file The S19 object file contains the compiled instructions from the program assembled The output 19 file has the same name as the assembl
270. nt by using the BR 22 command This is the same way that a hardware instruction breakpoint would be set Clear the hardware breakpoint by using the NOBR command 7 The LOADALL command in ICDO8SW is the same as LOAD in the ICSOSGPW simulator The LOAD command loads only the object information not the debug information 8 To debug from ROM and see source code while stepping use the LOADMAP command This loads source level information about the source file without loading the object file which should have been programmed into FLASH with PROGOSSW Files with the extension MAP are debug format map files 9 To write a byte to memory use the MM address n value command For example to write 00 to address 4 enter MM 4 0 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 173 ICDO8SW In Circuit Debugger 10 11 12 13 14 15 16 17 18 Operator s Manual The default base of the debugger is hexadecimal See HELP for prefixes and suffixes to override the default To create a variable use the VAR command To clear all variables use CLEARVAR CPU register values can be changed by entering a register name followed by a value For example to set the accumulator to 44 type either A 44 lt ENTER gt or ACCA 44 lt ENTER gt When the ICSO8GP20 board is reset by the debugger power to the microcontroller is turned off for a short duration Al
271. nual MOTOROLA List of Figures 21 List of Figures Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 22 List of Figures MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator List of Tables Table Title Page 1 1 MEOSUCSOBGP Specifications isse ereeru hr reirse 29 2 1 WI Configuration Header Oscillator Source 36 2 2 W2 Configuration Header Target Cable Reset Pin Function 36 2 3 W3 Configuration Header Target System Von 37 JJ ILSISOP Sole PIES ies door CER t SR ERG ERA Re ERES 44 4 Navigating Between External Programs 53 4 2 WinIDE Editor Substitution Parameters 000 56 4 3 WAND Toolbar DIOS oe echoes ens dc REREWEC A a 4 4 WinIDE Menus and Options Summary 04 58 Sl Change Base Prehxes uPHX8R soportes ri eses 99 d Assembler DCs Qu dS EREYCEe TUS REPPATEP WES PEE Ya PE 101 Ja Lisung DS uou aka SEV E EX da d OY RHET HHOPEN 104 pd Listina File PEE AR 105 5 5 Pseudo Operations Allowed by the CASMO8W 107 S5 Assembler Error Messages eseesesseetsekrrebesertesesri ene 110 6 1 Base Prone and SURES AA 123 6 2 ICSOSGPW Toolbar Buttons s sisiscssisisssscitisssidkas 141 6 3 ICS08GPW Menus and Options Summary 142 T Arment Types i eh ey acne rrr 155 7 2 ICSO8GPW Command Overview icoocosocesseuucEb RAE E VR 156 9 1 ICDO8SW Command Overview cesset E RR
272. o ground M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Hardware Installation 35 Hardware Installation 2 3 Configuring the In Circuit Simulator Board NOTE Operator s Manual Three configuration headers provide for jumper selectable hardware options Table 2 1 Table 2 2 and Table 2 3 describe these settings The factory default settings should be used when following the quick start procedure described in 1 8 Quick Start Instructions Table 2 1 W1 Configuration Header Oscillator Source Direction Signal Name Description SP OSC 4 9152 MHz SPGRM oscillator output acre OSC1 OSC1 on sockets and target connectors Jumper on pins 1 2 default The SPGMR oscillator is selected Jumper off Allows using an oscillator on the target system or injecting a different clock rate at W1 pin 2 Table 2 2 W2 Configuration Header Target Cable Reset Pin Function Pin Direction Signal Name Description Reset signal to target system 0 to 5 Vdc 1 oul REED output reflecting state of MCU RST signal 2 In or out TGT_RST To from target RST pins _ Reset signal from target system 0 to 3 In RST_IN 5 Vdc input to control state of MCU RST signal Jumper on pins 1 and 2 default The target system s RESET is not allowed to reset the ICSO8GP20 MCU M68ICSO8GP In Circuit Simulator Rev 1 0 36 Hardware Installation MOTOROLA Hardware Install
273. o not apply power to the target system at this time 6 Exit any ICSO8GPW software that may be running on the host PC Connect the serial cable between the host PC and the SPGMR Apply power to the pod by connecting the wall adapter s output jack to the SPGMR At this point the system power LED should be lit and the socket power LED should be off If the socket power LED is on there may be a problem with the host PC s serial port or the serial cable Refer to step 9 for information on host communications M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 351 Technical Reference and Troubleshooting Operator s Manual Apply power to the target system At this point the target MCU should be powered Check for 5 Vdc at the MCU s Vpp pin The pod should leave the target MCU in reset with approximately 0 Vdc at the MCU s RST pin Verify this at the target MCU s RST pin and at J6 pin 4 If RST floats too high the MCU may start up and begin executing code out of 1ts FLASH memory The pod should reset the MCU again in step 8 when the software is started Start the ICSOSGPW simulator software as described in sections 3 and 4 of the quick start instructions while watching the socket power LED If the socket power LED does not light at all there may be a problem with the host PC communicating with the pod Continue with step 9 If the socket power LED flickers a few ti
274. ock View data from the output buffer for SPI simulation Operator s Manual MOTOROLA Debugging Command Set 303 Debugging Command Set SPFREQ Set Input Clock for SPI Slave The SPFREQ command lets the user set the frequency of the SPI slave input clock If the SPI is configured for slave mode this command allows the user to enter the number of cycles n that the period of the input clock will be If no value is given a pop up window will appear and the user will be prompted for a value If this command is not used then clocking is assumed to be set by the SPI control register If the ICSOS circuit board is connected SPI inputs and outputs are directed from the board so this command has no effect Syntax SPFREQ lt n gt Where n The number of cycles for the period of the input clock Use with ICSOSGPW only Example SPFREQ 8 Set the period of the input slave clock to eight cycles total shift 8 8 64 cycles Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 304 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Execute Source Step s SS The SS command steps through a specified number of source code instructions beginning at the current program counter PC address value then halts All windows are refreshed as each instruction is executed This makes the SS command useful for high level language compilers such as C so that the user can step through
275. ocossasasasesaewasss 212 CAPTURE Capture Changed Data cscccrosrsuresirss 213 CAPTUREFILE or CF Open Close Capture File iicsscicegesaudvus 214 CCR Set Condition Code Register 215 CGMXCLK Set CGMXCLK to Bus Clock Relationship 216 CHIPMODE Choose Device for Simulation 218 CLEARMAP Low MAP AA 219 CLEARSYMBOL Clear User Symbols oo 220 CODE Show Disassembled Code 221 COLORS Set Simulator LOIDIS sues eee RERO RR 222 CYCLES orCY SetCycles Counter rr k RV EHA RAV 223 DASM Disassemble Memory 22552522 e rn Re 224 DDRA Set Port A Direction Register 225 DDRB Set Port B Direction Register 226 DDRC Set Port C Direction Register 4 40s 48s 4 227 DDRD Set Port D Direction Register socorro 228 DDRE Set Port E Direction Register 22 40 4246 220 DUMP Dump Memory to Screen 230 EVAL Evaluate Expression sor sssss boc e un RREER 231 EXIT or QUIT Exit Quit Application escitas 232 G GO or RUN Begin Program Execution 233 GOEXIT Execute Without Breakpoints Debugger 234 GONEXT Execute Past Subroutine Interrupt 235 GOMACRO Execute Macro after Break oooocironsn s 236 GOTIL Execute Until Addcesg cc ccissdcendeedcus 237 GOTOCYCLE Execute to Cycle Counter Value 238 H or HREG Set Clear Half Carry Bit lt i2424644 2244445 239 HELP Open MED PP rmm 240 HX Set FEX Index Register Pair coo oes s 241 I
276. oint to specified values or at cursor location C Set or clear the C bit of the CCR CCR Set the CCR in the CPU to the specified hexadecimal value CLEARMAP Remove the current MAP file from memory CLEARSYMBOL Remove all user defined symbols from memory Show disassembled code in the Code window starting at CODE address add Specifying an address in the middle of an intended instruction may cause improper results COLORS Set simulator colors Disassemble machine instructions display addresses and EASM contents as disassembled instructions in the Code window Send contents of a block of memory to the Status window in DUME bytes words or longs Evaluate a numerical term or expression and give the result in EVAL l hexadecimal decimal octal and binary format M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 187 ICDO8SW In Circuit Debugger Table 9 1 ICD08SW Command Overview Sheet 2 of 5 Operator s Manual Command Description EXIT Terminate the software and close all windows identical to QUIT command G Start execution of code at the current PC address or at an GO optional specified address The G GO and RUN commands are identical Similar to GO command except that the target is left running GOEXIT without any breakpoints and the debugger software is terminated Execute from the current PC address until the next inst
277. ointer and PC program counter cycles See CPU cycles M68ICSO8GP In Circuit Simulator Rev 1 0 378 Glossary MOTOROLA Glossary data bus A set of conductors that are used to convey binary information from a CPU to a memory location or from a memory location to a CPU in the M68HCOS the data bus is 8 bits development tools Software or hardware devices used to develop computer programs and application hardware Examples of software development tools include text editors assemblers debug monitors and simulators Examples of hardware development tools include simulators logic analyzers and PROM programmers An in circuit simulator combines a software simulator with various hardware interfaces EPROM Erasable programmable read only memory A non volatile type of memory that can be erased by exposure to an ultraviolet light source MCUs that have EPROM are easily recognized by their packaging a quartz window allows exposure to UV light If an EPROM MCU is packaged in an opaque plastic package it is termed a one time programmable OTP MCU since there is no way to erase and rewrite the EPROM H Abbreviation for half carry in the condition code register of the M68HCO8 This bit indicates a carry from the low order four bits of an 8 bit value to the high order four bits This status indicator is used during BCD calculations I Abbreviation for interrupt mask bit in the condition co
278. olling arrows to view all of the choices if necessary e Sample As Font options are chosen an example of the text that will result is shown in the Sample area Script If multilingual support is installed use this option to choose a non Western script 4 13 WinIDE Search Options This section describes the WinIDE Search menu options for specifying search criteria and entering a line number to go to in a source file To perform a search operation click once on the Search menu to open the menu Figure 4 19 Click on the option to execute Eind Ctrl F Replace Ctrl R Firiel riz FS Goto line Figure 4 19 Search Menu M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 81 WinIDE User Interface 4 13 1 Find Choose the Find option from the Search menu to open the Find dialog Figure 4 20 In the Find what box enter the string to search for The search will be performed in the active WinIDE editor source window Find Find what O ooo Match whole word only r Direction Cancel Match case CUp Down Figure 4 20 Find Dialog Window Enter the search string and choose from these options to refine the search Match whole word only Choose this option to limit the search to whole words and not character strings that are part of a longer word or string Match case Choose this option to perform a case sensitive search th
279. ome ed eee esas es 53 program counter SENE o ede descr dia uo eu th ee ede acd Qu add ae Ie agp arsed od dados 122 programming C devices A T 73 Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 398 Index MOTOROLA Index project environment 0 eee e res 52 66 M T 67 HiME Sarita ea bapti abo aded Quod nica ie tO dedo a 66 cup UIDI 323 n AMT 67 PRTA COMIDO cia Iac OL aa a Saha twee FR oes aie PRTB command 222 2x rara ada da 278 PRIC command 65 2 edu os ud Sek md eas 4 ean ERO dea a de s 279 PRTD command uae oss eerie ur ke A RO eee a e e gelo 280 PRTE command Sener Dae e 8 ado eae AE Cie ath eee 281 pseudo bpetdliOfiS atas s emere ES RREERESRRERRN PRESE sk os 107 Q quick Staff iode eek ROAD CEA RECROQC A ROLE SQUE Peri qaae cime 31 QUIET comma d 44a 404 6408 2 aic Reed o ds Rotor ea eod 282 QUIT coimthatid ui Cae eee Rr ea D XGA Ro do So RR CR Ee Re 232 R E COSA ou 2s du ep ead ees DA Oe hed ee AS ees 283 A 27 28 43 109 164 172 173 174 Real Tabs A A ORATE nE oo oud 74 r cord length AOOO UONn5NU505 CRMAMAMP e e aa a e T r 334 Record Macro 22i abaco dec eR XR EE da bacon de RR eA Kb tenes 145 POCO ype Se ce ne RECR EPRE PRA TI ENE E DIE PE VA TOP NE Edere 334 is AAA 145 Recover Error from Compiler 0 0 0 0 cece eee eee eee TI Redo NY NDE Pn hg aa iy ren irea i Beat ara E eee
280. on Choose Stop from the Execute menu to stop program execution and update the ICSOSGPW simulator windows with current data Alternative Press the F8 function key This is the keyboard equivalent to choosing the Execute Stop menu option 6 20 6 Repeat Command Choose Repeat command from the Execute menu to repeat the execution of the last command entered in the Status window command line Alternative Press the F9 function key This is the keyboard equivalent to choosing the Execute Repeat Command menu option 6 21 ICSO8GPW Window Options Operator s Manual Use the Window menu options to change the window displays in the ICSOSGPW simulator To make changes to the windows select Window in the menu bar to open the Window menu Figure 6 32 Click on an option to perform the operation Code j Cade 1 Marrery Mercer i e dl E Cope 1 e Baie oop tn T berryi Coke Brkini Deski Eine Diki Figure 6 32 ICS08GPW Window Menu M68ICS08GP In Circuit Simulator Rev 1 0 150 ICSO8GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface ICSO8GPW Window Options 6 21 1 Open Windows The Window menu options itemize the source file windows that can be opened in the ICSO8GPW A check beside the window name toggles that window display to on Uncheck the window name to close the window check the window name to open it For example Figure 6 32 indicates that all ICSO8GP
281. on register DDRE Bits assigned O denote input pins bits assigned 1 denote output pins Syntax DDRE n Where lt n gt The byte value to be placed into DDRE Use with ICSO8GPW only Examples DDRE 03 Set the lower two bits of port E pins as outputs set the others to be inputs DDRE FF Set all port E pins to be outputs M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 229 Debugging Command Set DUMP Dump Memory to Screen NOTE Syntax Use with Examples Operator s Manual The DUMP command sends contents of a block of memory to the status window in bytes words or longs The optional variant specifies whether to fill the block in bytes B the default in words W or in longs L Sometimes the DUMP command causes the memory contents to scroll through the debug window too rapidly to view In this case enter the LF command to record the memory locations in a logfile or use the scroll bars in the status window DUMP B W L lt startrange gt lt endrange gt lt n gt Where lt startrange gt Beginning address of the memory block lt endrange gt Ending address of the memory block range lt n gt Optional number of bytes words or longs to be written on one line ICSOSGPW and ICDO8SW DUMP CO CF Dump array of RAM values in bytes DUMP W 300 37S Dump ROM code in address 300 37S in words DUMP B 200 300 Dump con
282. ons 122 6 6 3 Code Window Keyboard Commands suus 123 6 7 Variables Window occ 64k d odd Lewd da ne UAE GRAN PEE eens 124 6 7 1 Displaying the Variables Shortcut Menu 124 6 7 2 Variables Shortcut Menu Options 004 124 ens Variable Window Keyboard Commands 126 6 8 e as ETE PEE 126 6 9 nu dil oon EET 128 6 10 CPU Window eee RR RR RR Ie 130 6I01 Changing Register Values 4 lt ccasetacecdesadeneveswaeas 130 6 10 2 CPU Window Keyboard Commands 132 SABES x oso arar arras 132 D ILZ ODE WW eR oe ee EN S techs Aa E E T ee Eqs 132 BILL o MI 133 6 12 2 Subroutine SACK esla ers adidas 133 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICSO8GPW In Circuit Simulator User Interface 113 ICS08GPW In Circuit Simulator User Interface Operator s Manual All Tree o A ERO EVE REP dE 134 6 14 Breakpoint Window sierra cis 135 GILL Addinga Breakpoint pais tens suma pude Fe t ded qd 136 6112 Editing a Breakpoint scccosircrrcccrrrr ranas 137 6 14 3 Deleting a Breakpoint s22scesi cots oie eesieoeedeceewss es 137 6 14 4 Removing All Breakpoints 22 occciecceciddwasedadinasees 138 amp lo Register Block WINdOwW escogiste eeu PERRA keen 138 616 Entering Debugging Commands occus 4o ws eR ERR AWEQUS 140 amp l ICM Tool a eee eos S E REPERI SE 140 GIS VOW BISIN a vUnE Debs dE qe a o eritip ev ee qb qs 142
283. ooooooooooooo 27 aka A 28 A os i gd Bato e p POR Der o ECKE 4 ODOT EK doe 29 Tyee Conventions AA 29 uisk Start Insuectiolli 504444060 ed RE REX EORR CP EY 31 MC6SHC908GP Security Feature iilos ru geeeers seas ren 34 This chapter provides an overview of the M68ICSO8GP in circuit simulator kit components and a quick start guide to setting up a development project The Motorola M68ICSO8GP in circuit simulator kit is a development toolkit for designers who develop and debug target systems that incorporate MC68HC908GP20 and MC68HC908GP32 microcontroller unit MCU devices The toolkit contains all of the hardware and software needed to develop and simulate source code and program Motorola s MC68HC908GP20 and MC68HC908GP32 microcontrollers M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Introduction 25 Introduction The toolkit consists of two main parts e Hardware pod an ICSO8GP20 circuit board mounted on an M68HC08 serial programmer SPGMR e CS08GP software package Together the pod and the ICSOSGP software form a complete simulator and non real time input output I O emulator for MC68HC908GP20 and MC68HC908GP322 devices When the pod is connected to a host PC and target hardware the actual inputs and outputs of the target system can be used during code simulation With the ICDO8SW software the SPGMR can be used as a limited real time emulator With the PROGOSSW software the SPGMR can be u
284. or s Manual M68ICSO8GP In Circuit Simulator 11 1 Contents 11 2 Introduction Section 11 Example Project EES TRON ira e ohn 9 one E 40 Ki ab ed de Rari o 323 112 eli Ue a Sans FOG ss sas crane cix REOR eases sande 323 11 34 Set Up the Environ ici a p AREE RE RR Ad aA RC ii 324 113 3 iid ie o TTC 325 113 3 ANOIMAS ANA 326 This section provides information to guide a user through a first time use of the ICSOSGPW software and through a typical setup of the WinIDE 11 3 Setting Up a Sample Project NOTE To demonstrate how source code to be assembled is handled using the ICSO8GPW simulator WinIDE editor and CASMOSW assembler software as an integrated development environment consider as an example the following typical project The sample files referred to here are referenced for illustration purposes only and are not provided with the software Create personal ASM files for projects using the ICSOSGPW software components For information about using files created by other assemblers see 5 5 5 Files from Other Assemblers M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Example Project 323 Example Project 11 3 1 Set Up the Environment To begin the project start the WinIDE editor and establish the desktop and environment settings for the project 1 Start the WinIDE editor by selecting the icon from the Windows 95 or later version Start menu 2 Inthe WinIDE editor choose
285. orms The format also provides for editing of the S records and monitoring the cross platform transfer process M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA S Record Information 333 S Record Information A 3 S Record Content Operator s Manual Each S record is a character string composed of several fields which identify e Record type e Record length e Memory address e Code data e Checksum Each byte of binary data is encoded in the S record as a 2 character hexadecimal number The first character represents the high order four bits of the byte The second character represents the low order four bits of the byte The five fields that comprise an S record are shown in the Table A 1 Table A 1 S Record Fields TYPE RECORD LENGTH ADDRESS CODE DATA CHECKSUM The S record fields are described in Table A 2 Each record may be terminated with a CR LF NULL Additionally an S record may have an initial field to accommodate other data such as line number generated by some time sharing systems Accuracy of transmission is ensured by the record length byte count and checksum fields M68ICSO8GP In Circuit Simulator Rev 1 0 334 S Record Information MOTOROLA S Record Information S Record Types Table A 2 S Record Field Contents Printable Field Characters Contents Type 2 S record type SO S1 etc Record length 2 Character pair count in the record e
286. orts reset and IRQ pins on the ICS08GPW board and the board version number Pod Assign the specified value to the port A output register latches aei Assign the specified value to the port B output register latches dis Assign the specified value to the port C output register latches ded Assign the specified value to the port D output register latches Pets Assign the specified value to the port E output register latches QUIET Toggles refresh of memory based windows QUIT Terminate the ICS08GPW application and close all windows identical to the EXIT command R Open window for Register files and start interactive setup of system registers such as I O timer COP M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual Debugging with ICS08GPW 159 Debugging with ICSO8GPW Table 7 2 ICS08GPW Command Overview Sheet 5 of 7 Operator s Manual Command Description REG Display contents of CPU registers in the Status window identical to the STATUS command REM Enter comments in a macro file Simulate a reset of the MCU and set the PC to the contents of RESET the reset vector Does not start execution of user code Simulate a reset of the MCU set PC to contents of the reset RESTOS vector and start execution from the PC address RUN Start execution of code at the current PC current or specified address identical to the G or GO command SAVED
287. ould be tied to this signal It will swing from 0 to 8 5 Vdc Table 12 2 MONO8 Target System Connector P2 Pin No eM Direction Target System Connection 1 HST OUT Out to target Connect to logic that is to receive the RST signal 2 GND Ground Connect to ground Vss 3 HST IN In from target Connect to all logic that generates resets IT Connect to MCU RS pin and P1 pin 1 No other target system 3 IRIS CUOI logic should be tied to this signal It will swing from 0 to 8 5 Vdc 5 In from target Connect to logic that generates interrupts Connect to MCU IRQ pin No other target system logic should be b Surto target tied to this signal It will swing from 0 to 8 5 Vdc Connect to user circuit that normally would be connected to PTAO 7 TGT_PTAO Bidirectional onthe MCU This circuit will not be connected to the MCU when the in circuit simulator is being used TE Connect to MCU PTAO pin No other target system logic should As Bidirectional be tied to this signal Host I O present on this pin 9 TGT PTA7 Bidirectional Connect to user circuit that normally would be connected to PTA7 on the MCU Connect to MCU PTA7 pin No other target system logic should 10 Bidirectional be tied to this signal Grounded during reset and for 256 cycles after reset 11 TGT PTCO Bidirectional Connect to user circuit that normally would be connected to PTCO on the MCU MM Connect to MCU PTCO pin No other target system
288. ow Keyboard Commands Use these keys to navigate in the Variable window 6 8 Memory Window NOTE Operator s Manual 1 2 Press the INSERT key to add a variable Press the DELETE key to delete a variable Press the up arrow T key to scroll the Variable window up one variable Press the down arrow J to scroll the Variable window down one variable Press the HOME key to scroll the Variable window to the first variable Press the END key to scroll the Variable window to the last variable Press the PAGE UP key to scroll the Variable window up one page Press the PAGE DOWN key to scroll the Variable window down one page Press the F1 key to shows the help contents topics Press the ESCAPE ESC key to move the cursor to the command line of the Status window Use the Memory window Figure 6 8 to view and modify the memory in ICSO8GPW View bytes by using the scrollbar on the right side of the window To modify a set of bytes Double click on the bytes to open the Modify Memory dialog for that address Enter the MM command in the command line of the Status window The value xx means that the memory location is uninitialized and indeterminate The value W means that it is unimplemented invalid memory M68ICSO8GP In Circuit Simulator Rev 1 0 126 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICS08GPW In Circuit Simulator User Interface Memory Window Memory Window Base Add
289. owing the specified address and its present value Use the dialog to enter a new value for the address or to modify the address type by selecting 8 bit bytes 16 bit words or 32 bit longs To modify several memory locations from this dialog enter the new value in the New Value text box and click the gt gt button to increment the current address the lt lt button to decrement the current address or the button to display the same address For the ICDO8SW the MEM command is identical Modify Memory x Address Present Value 5F Byte C Word C Long New Value B Y OK x Conce lt j Figure 10 2 Modify Memory Dialog Window If macro recording is on all the values written to memory are recorded and will be properly written to memory when the macro is played back See the MACROSTART command If the MM command includes optional data values the software assigns the values to the specified addresses sequentially then the command ends No window appears in this case Operator s Manual MOTOROLA Debugging Command Set 269 Debugging Command Set MM or MEM Syntax MM B W L Where lt address gt lt n gt Use with ICS08GPW and ICD08SW Examples MM 90 MM 300 00 MM 100 00 01 10 11 MM L 200 123456 Operator s Manual Modify Memory continued address n The address of the first memory location to be modified The value s to be stored
290. pen File dialog choose the files that will make up the project 1 Select the drive containing the files from the Drives list 2 Select the directory folder containing the files from the Folders list 3 Use the Filename text box to specify a filename or a wildcard extension to filter the list of filenames or choose a file type from the List files of type list The default file type is ASM but these are additional choices c Source code files Ist Listing files txt Text files All files Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 52 WinlDE User Interface MOTOROLA WinIDE User Interface Navigating in the WinIDE Editor To add more filter types change the environment settings with the General Editor tab in the Main menu When all of the project files have been selected click the OK button to open the files in the WinIDE Main window 4 6 Navigating in the WinIDE Editor To navigate among the several subwindows in which the project files are displayed in the WinIDE Main window 1 Choose the subordinate window s filename from the Window menu or click on the file s title bar to bring it to the front of the cascaded stack 2 When using a large screen or a few project files choose the Tile option from the Window menu to lay out all of the subwindows so that all are visible Or choose the Cascade option to arrange all windows so that only the top window is entirely visible
291. perator s Manual MOTOROLA Debugging with ICS08GPW 155 Operator s Manual Debugging with ICSO8GPW Table 7 2 ICS08GPW Command Overview Sheet 1 of 7 Command ACC ADCLR ADDI ASM BELL BF BR BREAKA BREAKHX BREAKSP C CAPTURE CAPTUREFILE CF CCR CGMXCLK CHIPMODE CLEARMAP CLEARSYMBOL COLORS CYCLES CY DASM DDRA Description Set the accumulator to specified value and display new value in CPU window identical to the ACC command Set the accumulator to specified value and display new value in CPU window identical to the A command Clear A D input buffer Enter input to A D Assemble M68HC08 instruction mnemonics and place resulting machine code in memory at the specified address Sound PC bell the specified number of times Fill a block of memory with a specified byte word or long value Display or set instruction breakpoint to specified values or at cursor location Set accumulator breakpoint to halt code execution when the accumulator value equals the specified value Set an HX register breakpoint to halt code execution when the value of the HX register equals the specified value Set stack pointer breakpoint to halt code execution when the SP equals the specified value Set or clear the C bit of the CCR Specify location to be monitored for changes in value Open a capture file to record changed values Set the CCR in the CPU to the specified hex
292. perator s Manual MOTOROLA Hardware Installation 37 Hardware Installation 3 Connect the SPGMR to the host PC Locate the 9 pin connector labeled HOST on the SPGMR Using the cable provided connect it to a serial COM port on the host PC Apply power to the pod Connect the 5 volt power supply to the round connector on the SPGMR Plug the power supply into an AC power outlet using one of the country specific adapters provided The system power LED on the SPGMR should light 2 5 Connecting to a Target System The two ways to connect the ICSO8GP20 simulator board to a target system are 1 Operator s Manual Using the MCU on the ICSO8GP20 break its processor signals out to the target system This method allows the ICSO8GP20 s MCU to control the target system s hardware Either an MC68HC908GP20 or MC68HC908GP32 MCU must be installed on the ICSO8GP20 board The target system s MCU must be removed The processor signals can be routed to the target system in two ways a A 40 pin DIP emulation cable is provided with the kit for use with the connector labeled DIP on the ICSO8GP20 board Attach the cable to an equivalent connector on the target system The pin assignments for this connector are given in Appendix B Technical Reference and Troubleshooting b Connectors A and B on the ICSOSGP20 board may be used with a flex emulation cable and target head adapter which are available separately Target head adapters are
293. perator s Manual M681CS08GP In Circuit Simulator Rev 1 0 362 Technical Reference and Troubleshooting MOTOROLA Pin No 10 11 12 13 14 15 16 Mnemonic RST OUT GND Technical Reference and Troubleshooting Connector Pin Assignments Table B 7 MONO8 Connector J6 Schematic NET RST_OUT GND ar a al A H z D BE X O D a aj A A z o JJ J O D O PTAO KBDO PTAO KBDO PTA7 KBD7 after reset PTA7 KBD7 PTCO after reset PTCO PTC1 after reset PTC1 PTC3 after reset PTC3 D O TGT_PTA lt 0 gt PTA lt 0 gt TGT_PTA lt 7 gt PTA lt 7 gt TGT_PTC lt 0 gt PTC lt 0 gt TGT_PTC lt 1 gt PTC lt 1 gt TGT_PTC lt 3 gt PTC lt 3 gt Direction Out In Bidirectional In Out Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional Bidirectional M681CS08GP In Circuit Simulator Rev 1 0 Signal Description Reset signal to target system 0 to 5 Vdc output reflecting state of MCU RST signal System ground Reset signal from target system 0 to 5 Vdc input to control state of MCU RST signal External reset Held at 8 5 Vdc out of reset Reset signal from target system 0 to 5 Vdc input to control state of MCU IRQ signal External interrupt Held at 8 5 Vdc in reset and when TGT IRQ not
294. ples SINCLUDE INIT ASM SINCLUDE C project init asm Iw M68ICSO8GP In Circuit Simulator Rev 1 0 102 CASMO8W Assembler Interface MOTOROLA 5 7 5 MACRO CASMO8W Assembler Interface Assembler Directives A macro is a named block of text to be assembled Similar in some ways to an included file the macro allows labels and parameter values The MACRO directive begins the macro definition The name of the macro is the parameter value for the MACRO directive All subsequent code until the assembler encounters the MACROEND directive is considered the macro definition Assembler directives may not be used within a macro nor does the definition require parameter names Instead the macro definition includes the sequential indicators n for the n parameter values of the macro call The assembler will ignore parameter values on the MACRO directive line so such values may be helpful for internal documentation Example This macro example illustrates a macro that divides the accumulator value by 4 SMACRO divide_by_4 Starts macro definition asr a divides accumulator by 2 asr a divides quotient by 2 SMACROEND ends macro definition This macro example illustrates a macro that creates a time delay SMACRO delay count ldaa 01 loop deca bne loop SMACROEND In this macro the CASMOSW assembler ignores the parameter count on the MACRO directive line The parameter count merel
295. r 3 03 enable pshh negate 10 usec tim con 1 sp Register Equates pulh TSC equ 20 Timer Status amp Control Register comx E TDMA equ 21 Timer DMA Select Register 21 aix m TCNTH equ 22 Timer Counter Register Hi 22 sthx address save negative TCNTL equ 23 Timer Counter Register Lo 23 ldhx fit 50us THODH equ 24 Timer Counter Modulo Register Hi 1da 5t THODL equ 25 Timer Counter Modulo Register Lo bsr qnul TSCO equ 26 Timer Channel 0 Status amp Control 1da 15t TCHOH equ 27 Timer Channel 0 Register Hi 27 bsr qnul TCHOL equ 28 Timer Channel 0 Register Lo 28 1da moot TSC1 equ 29 Timer Channel 1 Status amp Control bsr qnul TCH1H equ 28 Timer Channel 1 Register Hi 2a y ldhx 0 clear return egl 4 L fy 11 Totat125 Top 1 Bytes 6327 Insert Figure 4 25 WinIDE with Subordinate Windows Tiled If the contents of a source window cannot be displayed in their entirety use the scroll bars The tiled arrangement is practical to use when cutting and pasting from one window to another Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 86 WinlDE User Interface MOTOROLA WinIDE User Interface WinlDE Window Options 4 14 3 Arrange Icons Select the Arrange Icons option from the Window menu to rearrange the icons of minimized windows into columns and rows at the bottom of the WinIDE main window Figure 4 26 PRIS as File Edt Environment Se
296. r each included file will be seen not the source file Expand Macros in Listing Select this option to expand all macros into the listing file Each time the macro is used the listing will show the instructions comprising the macro If this option is not selected the user will see only the macro name not its instructions M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 75 WinIDE User Interface e Assembly Preferences Operator s Manual Show Assembler Progress Select this option to display a pop up window showing the current assembly status including Pass the assembler is currently on File currently being assembled Line currently being assembled If this option is not checked the user must wait for the assembly result to be displayed on the status bar at the bottom of the Environment window Wait for Assembler Result Select this option and the Show Assembler Progress option to cause a progress window displaying the assembly result to stay up when assembly is done The assembly result window will remain until it is dismissed by clicking the OK button In general do not select this option as the assembler results are shown in the status bar at the bottom of the WinIDE window Save files before Assembling Select this option to save all open files to disk before running the assembler This is important because the assembler compiler reads the file to b
297. r s Manual MOTOROLA Debugging Command Set 319 Debugging Command Set X or XREG Syntax Use with Examples Operator s Manual Set X Register Value The X command sets the index X register to the specified value The value entered with the command is displayed in the CPU window The X command is identical to the XREG command X lt value gt Where lt value gt The new value for the X register ICSO8GPW and ICDOSSW xX 05 Set the index register value to 05 XREG FO Set the index register value to FO M68ICSO8GP In Circuit Simulator Rev 1 0 320 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Clear Zero Bit Z The Z command sets or clears the Z bit in the condition code register CCR NOTE The CCR bit designators are in the lower portion 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 Z 0 1 Use with ICSOSGPW and ICD08SW Examples z 0 Clear the Z bit of the CCR Z 1 Set the Z bit of the CCR M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 321 Debugging Command Set Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 322 Debugging Command Set MOTOROLA Operat
298. racter strings that are part of a longer word or string e Match case Choose this option to perform a case sensitive search that is to find words with a specific uppercase and or lowercase arrangement Press the CANCEL button to close the Replace dialog Alternatives Press CTRL R This is the keyboard equivalent to selecting the Search Replace menu option 4 13 3 Find Next Select the Find Next option from the Search menu to find the next occurrence of the previous search string without displaying the Find dialog Alternatives Press F3 This is the keyboard equivalent to selecting the Search Find Next menu option M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 83 WinIDE User Interface 4 13 4 Go to Line Select the Go to Line option from the Search menu to open the Go to Line Number dialog Figure 4 22 Note line numbers in the status bar and use the dialog to navigate between points in the text Go to Line Number Enter Line Number 1 to 15 Y OK X Cancel Figure 4 22 Go to Line Number Dialog Window The dialog instruction includes the range of line numbers available in the active window Enter the line number to go to and press the OK button 4 14 WinIDE Window Options This section describes the WinIDE Window menu options for managing the arrangement of open client windows in the main WinIDE window To perform a Window operation cl
299. rameters separate them with spaces All parameters default to off Filename Required parameter specifying the path name and filename of the CASMOSW assembler executable S Optional parameter to generate Motorola S19 S record object file L Optional parameter to generate an LST listing file D Optional parameter to generate P amp E Microcomputer Systems Inc MAP debugging file H Optional parameter to generate Intel hex object file C Optional parameter to show cycle counts in listing file M Optional parameter to expand MACROS in listing file I Optional parameter to expand INCLUDE files in listing file Q Optional parameter to suppress screen writes except errors Example Operator s Manual C NCASMNCASMO8W EXE MYFILE S L D M68ICSO8GP In Circuit Simulator Rev 1 0 94 CASMO8W Assembler Interface MOTOROLA CASMO8W Assembler Interface Assembler Outputs 5 5 Assembler Outputs 5 5 1 Object Files 5 5 2 Map Files This section describes the assembler outputs When an object file in the command line in the Program Item Properties in Windows is specified using the S or H parameters the object file is created during assembly The object file has the same name as the file being assembled with the extension HEX or S19 depending on the specification given e Motorola uses the S record 8 bit object code file format for object files For more information see Append
300. rcuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface File Options 6 19 3 Play Macro Select the Play Macro option from the File menu to open the Specify MACRO File to Execute dialog Figure 6 26 to specify a macro filename and drive directory path to play Specify MACRO File to Execute 2 x File name Folders Cancel sample mac ed 3 pemicro Eq mmevsw List files of type Drives Macro Script File mac Sd Figure 6 26 Specify MACRO File to Execute Dialog Window Alternatives Press the CTRL P key combination or click the PLAY MACRO toolbar button These are the keyboard equivalents to choosing the File Play Macro menu option 6 19 4 Record Macro Select the Record Macro option from the File menu to open the Specify MACRO File to Record dialog Figure 6 27 and specify a macro filename and drive directory path to record File name Folders Cancel sample mac ey dv 3 pemicro mmevsw y List files of type Drives Macro Script File mac Sd J Figure 6 27 Specify MACRO File to Record Dialog Window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 145 ICS08GPW In Circuit Simulator User Interface 6 19 5 Stop Macro 6 19 6 Open Logfile Operator s Manual Debugger window will be recorded in the macro file and can be repeated by playing back the macro using the Fil
301. rent window for example when the window is edited the status will be modified Total number of lines in the active window Top Current line position in the file of the top of the active window Bytes Displays the total number of bytes in the active window nsert Overwrite mode Indicates the current typing mode The status fields expand and contract as client area contents change and files become active rea NE RN NUN NN Figure 4 2 WinIDE Status Bar M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinIDE User Interface 51 WinIDE User Interface 4 5 Getting Started 4 5 1 Prerequisites for Starting the WinIDE Editor Before starting the WinIDE editor the Windows operating environment must be running and the ICSOSGP software package must be installed on the host computer NOTE Remember that for the M68ICSOSGP in circuit simulator to run in simulation mode the asynchronous communications cable must connect the M6SICSOSGP hardware pod to the host computer and the power to the pod must be on 4 5 2 Starting the WinIDE Editor To start the editor select the WinIDE icon by selecting the ICSOSGPW PROGRAM GROUP icon from the Windows 95 Start menu 4 5 3 Opening Source Files When the WinIDE editor opens the Main window is empty To build the environment for the project choose the Open option from the File menu or click the FILE button on the WinIDE toolbar In the O
302. ress v Show as HEX and ASCII Show as HEX Only Help Figure 6 8 Memory Window with Shortcut Menu Use the options from the Memory Window Shortcut menu to perform these memory functions Set Base Address Choose this option to set the first memory address to display in the Memory window Show as Hex and ASCII Choose this option to display memory values in both hex and ASCII formats Show as Hex Only Choose this option to display memory values in hex format only allowing more bytes per row Use these keys to navigate in the Memory window e Press the up arrow T to scroll the Memory window up one line e Press the down arrow J to scroll the Memory window down one line e Press the HOME key to scroll the Memory window to memory address 0000 Press the END key to scroll the Memory window to the last address in the memory map e Press the PAGE UP key to scroll the Memory window up one page Press the PAGE DOWN key to scroll the Memory window down one page e Press the Fl key to show the help contents topic e Press the ESCAPE ESC key to move the cursor to the command line of the Status window M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 127 ICS08GPW In Circuit Simulator User Interface 6 9 Status Window Operator s Manual The Status window Figure 6 9 accepts ICSO8GPW commands entered on the command line executes th
303. rogram Module oiissc e rese ou iR E RP ees 167 8 4 6 DM Show Moduli o caer iia 167 8 4 7 de Specify S Bacgtl sossoscaaselbusedechseshicsrabkeds 168 8 4 8 UM Upload Module e cos RES EY REV OPEN SOR Y EROS 168 8 4 0 ES Upload BUM oz oae tend Vua Eae UA se dece Vio Rr 168 84 10 VM Vernfy Module i easeuesesa sh A eh bana 168 8 4 11 YR Verity Rang 305 e s repa siteye IMS b PAS 168 BAIE occ vno qi oT E We a iaa 169 54 1 RH BESM UB icuaxasasekzt kae du RR ESERAS A RAE 169 2515 WO sscsereee A SUFRE REN EAURR ees 169 8 5 Programming Example isses cenes Re rinaket RES DREAX EE 169 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual Section 8 PROGO8SW FLASH Programmer MOTOROLA PROGO8SW FLASH Programmer 163 PROGO8SW FLASH Programmer 8 2 Introduction Operator s Manual PROGOSSW is a programmer for FLASH memory internal to a CPUOS processor The programmer communicates with the processor in monitor mode MONOS using an M68HC08 serial programmer SPGMR which connects the serial port of a PC or compatible computer to a DB9 connector on the SPGMR The programmer software consists of three parts 1 PROGOS8SW EXE Executable that runs on the host PC 2 908 GP20 08P Programming algorithm file for the MC68HC908GP20 MCU 3 908 GP32 08P Programming algorithm file for the MC68HC908GP32 MCU PROGOSSW provides for a set of general interface functions and one user specif
304. rrupts monitor mode communications The MONOS pin TGT PTAO J6 pin 7 is never connected to the MCU s PTAO pin It is wired to J2 pin 15 J4 pin 10 and J6 pin 7 for probing purposes On the MONOS connector J6 pin 8 is wired to the MCU s PTAO pin Driving this signal with external logic on the target system will interrupt communications b Make sure that the MONOS cable is properly installed between the pod and the target system Pin 1 of each connector on the cable must go to pin of the headers on the pod and target system c Make sure that the serial cable is correctly attached to the pod and to the correct serial port on the host computer d Make sure that the cable is a straight through cable supporting all nine pins of the serial port connection e Make sure that no hardware security key or other device is attached to the serial port or cable f Make sure that the host PC supports the minimum speed requirements of the ICSO8GPW software g Make sureto use the correct security code to access the MCU If the security bytes are programmed already the part will not unlock and enter monitor mode unless the correct security code is sent to the MCU h Make sure the serial data is getting to the MCU s PTAO pin Re start the ICSOSGPW simulator software as described in sections 3 and 4 of the quick start instructions Probe the PTAO pin of the target MCU for the serial data Since the board power is turned off and on several times d
305. ruction is GONEXT reached Used to execute past a subroutine call or past intervening interrupts Execute code beginning at the PC address and continue until GOTIL the PC contains the specified ending address or until a keypress Stop Macro command from the toolbar breakpoint or error occurs Set or clear the H bit in the CCR HREG HELP Open the ICD08SW Help File HX Set both bytes of the concatenated index register H X to the specified value Set or clear the bit of the CCR INFO Display information about the line highlighted in the source window we Display the value of the IRQ pin IRQ p ay Pus LF Open a new or specified external file to receive log entries of LOGFILE commands and responses in the Status window identical to the LOGFILE command LOAD Load S19 object file and associated MAP file into the ICDO8SW LOADALL Execute both the LOAD and LOADMAP commands LOADDESK Load the desktop settings for window positions size and visibility Load a MAP file containing source level debug information into ASADAS the ICDO8SW LOADV Execute the LOAD command then automatically execute the VERIFY command M68ICSO8GP In Circuit Simulator Rev 1 0 188 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger Debugging Commands Table 9 1 ICD08SW Command Overview Sheet 3 of 5 Command Description LOAD BIN Loads a binary file of bytes starting at a specified
306. s Input values can be entered while the window is open An arrow points to the value that will be used next as input to the SPI The maximum number of input values is 256 bytes The input characters are shifted in after the proper number of cycles have elapsed for each character s reception If the ICSOS circuit board is connected SPI inputs and outputs are directed from the board so this command has no effect Syntax SPDI lt n gt Where n The value to be entered into the next location in the input buffer Use with ICSO8GPW only Examples SPDI 55 Set the next input value to the SPI to 55 SPDI Pull up the data window with all the input values Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 302 Debugging Command Set MOTOROLA View SPI Outputs Syntax Use with Example Debugging Command Set Command Descriptions SPDO The SPDO command displays the output circular buffer from the SPI A window is opened that shows all the data that the SPI has shifted out An arrow is used to point to the last output value transmitted The maximum number of output values that the buffer holds is 256 bytes If the ICSOS circuit board is connected SPI inputs and outputs are directed from the board so this command has no effect SPDO Where n ICSOSGPW only SPDO M681CS08GP In Circuit Simulator Rev 1 0 The number of cycles for the period of the input cl
307. s rn 242 Display Line Information 243 Ser PON A UI ioa scs Ges Roache ceeds 244 ser Pot B PIS AM 245 Set Pon C Dipile 2644 45seceseidewnsanacun 246 Sei Porn D Il irradia 247 car DOTE MIUS ida eh EA BHCHR 248 Show Port Dpuls 122244 xS abies kr dre 249 SEL IRO Pip AM 250 Open Close LoS Leve ORE EER dU RA 251 Turn Off Step LISUDR eos rea RE RE 252 Turn On Step Listing cscccdacnntaseccns 253 Lal S REGS Liz ash pridy tunteneeni 254 Load S Records and Map File 255 Load Desktop Settings isses ce rr Rs 256 Load Map PR Loses web ER ERES RA EAR ER TAA 257 Load aud Valida a es ends 258 Load Binary Ple aciolc odes Rbce ness ks 259 Load and Verify Binary File 260 Execute Butch File io aase sse ase 2504446 261 Stop Saving Commands to Batch File 263 Save Debug Commands to Batch File 264 List MARIUS 45 65 do ease ee napa 265 Show Information in Map File 266 Display Memory at Address 267 Display Memory Window 2 at Address 268 Modity Memory i sao crus E RERERT E REIR 269 Set Clear NECIO Bit ssoxawzesk RERO es 271 M68ICSO8GP In Circuit Simulator Rev 1 0 194 Debugging Command Set MOTOROLA NOBR NOMAP NOSYMBOL PC POD PORTA or PRTA PORTB or PRTB PORTC or PRTC PORTD or PRTD PORTE or PRTE QUIET R REG REM RESET RESETGO SCCLR SCDI SCDO SAVEDESK SHOWBREAKS SHOWCODE SHOW MAP SHOWPC SHOWTRACE SIMOS SNAPSH
308. s 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 BREAKHX command is to duplicate one of those 64 addresses If the BREAKA command is entered without an address value the halt in code execution clears the accumulator breakpoint To cancel the accumulator breakpoint before the halt occurs enter the BREAKA command without any parameter values If the BREAKA command is entered without an address value the accumulator breakpoint does not show in the BREAKPOINT WINDOW If the BREAKA command is entered with an address value the accumulator breakpoint may be cleared by one of these methods Enter the NOBR command Position the cursor on that address in the code window Then press the right mouse button and select Toggle Breakpoint at Cursor menu item M68ICSO8GP In Circuit Simulator Rev 1 0 206 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Accumulator Breakpoint continued BREAKA Syntax BREAKA lt n gt lt address gt Where lt n gt lt address gt Use with ICSOSGPW only Examples BREAKA 55 BREAKA BREAKA 55 300 M681CS08GP In Circuit Simulator Rev 1 0 Accumulator value that triggers a break in execution Optional address for the break in execution provided that the accumulator valu
309. se eR teehee ey SEXE REI S 125 conditional assembly directives llle 102 lab lS irana EE ER M ded pon Ge eles eee are Steps 107 listing table 12s ci kd MESE bead AAA 106 macro HITECDYO S Ladcze hber redi Ret resa due hier d het deca RE TR 103 AA AE RERFAQR AR SENCED AS VER RA R UE CR dde 336 EXE I In Circuit Simulator fabae rra 78 EXE 2 Programmer tab lt cs itd bo ac EV Roe E gr eap DO M aie s 78 EXE 3 Debugger tab 152i kzakur b RERBA AR RE RERY GA Rx RE 78 EXE Patt cocriteolisucshndtend E bb SR PLA hetb ree RCOR es he sane 79 executable Ops oct os eei eren AR de eX I b PR e ads 66 executing SOUECE CDU de pe op RR ERES ae X gogo a od NO ded 122 Ex ADBUCHIUGI us es dutebs cadet br x es dure RUE CE RIPE cages 70 BAIT command dr retirar 232 exiting applicatlOn i cieren c dama EP ER AXRE QE RE rd 70 WIDE str serio Eat 59 62 A eu code RP iC oom cedures E RED 70 Expand Includes in List 222225225 2eeesur sense See seen sees ees ees 75 Expand Macros in Listes asado Xo ex EV ei Po ERR EE 75 extended addressing mode 0 0 cece ee eee tenes 108 extension ducendi MORTE 25 External Program toolbar buttons 53 external TORTS pe oe ecesas ed riot FE APR E RUE aa d pd 78 configuring in WInIDE 3 och s eos ad eb RE ed eee rx ERE owas 74 DNNE essence redant aa RASA ROCOTRODR SE E AE RUE Cd and 13 M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Index 389 F FCB
310. se for the operands CASMOSW defaults to hexadecimal base M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO8W Assembler Interface 97 CASMO8W Assembler Interface 5 6 Assembler Options NOTE The CASMOSW assembler supports all Motorola opcode mnemonics Opcode mnemonics cannot start in column one If a label begins the line there must be at least one space between the label and the opcode 5 6 1 Operands and Constants Operator s Manual Operands are addresses labels or constants as defined by the opcode Assembly time arithmetic is allowed within operands Such arithmetic may use these operations multiplication division addition subtraction left shift right shift remainder after division bitwise and bitwise or bitwise xor Operator precedence follows algebraic rules Use parentheses to alter precedence If an expression contains more than one operator parenthesis or embedded space the entire expression must be put inside braces jmp star 3 start is a previously defined label jmp star jmp sta ES jump to location start 3 rt gt 2 Jump to location start divided by 4 Constants are specific numbers in assembly language commands The default base for constants is hexadecimal but it can be changed using the Change Base Address dialogs for the Memory and Code windows To temporarily override the default
311. sed CPU Toggles the CPU window open closed Change Colors Opens the Changes Windows Colors dialog Chip Window Show connection to hardware pod yes or no Reload Desktop Save Desktop Executes the LOADDESK command to load the desktop settings from a file Executes the SAVEDESK command to save the current desktop settings to a file M68ICSO8GP In Circuit Simulator Rev 1 0 142 ICSO8GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface File Options 6 19 File Options Use the ICSO8GPW File menu options to load reload open or close files play or record macros or exit the ICSO8GPW application To perform a File operation click once on the File menu Figure 6 24 title to open the menu Click on the option to execute LoadS19File F2 Reload Last 519 F3 Play Macro Ctrl P Record Macro Ctrl M Stop Macro Ctrl S Open Logfile Ctrl L Close Logfile Ctrl C Exit Ctrlex Figure 6 24 ICSO8GPW File Menu The following topics describe and explain the ICS08GPW File operations and dialogs M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 143 ICS08GPW In Circuit Simulator User Interface 6 19 1 Load S19File Select the Load S19 File option from the File menu to open the Specify S19 File to Load dialog Figure 6 25 If the S19 file is not in the default directory
312. sed to program MCU FLASH memory Use the M68ICSOSGP toolkit with computers with a serial port based on Windows 95 or later versions 1 3 Toolkit Components NOTE Operator s Manual The complete M68ICSO8GP toolkit contains e M68ICSO8GP hardware ICSOSGP20 in circuit simulator board Two MC68HC908GP32FB MCUs 40 pin DIP header ribbon cable for target connection 16 pin ribbon cable for MONOS monitor mode connection e M68SPGMR0O8 serial programmer hardware see note M08HCO8S serial programmer SPGMR AC DC power supply adapter SPGMR to host serial COM cable If the serial programmer hardware is not present in the toolkit it must be obtained separately Order the M 8SPGMROS serial programmer kit by contacting a local Motorola representative M68ICSO8GP In Circuit Simulator Rev 1 0 26 Introduction MOTOROLA Introduction Hardware and Software Requirements Windows optimized software components collectively referred to as the ICSO8GP software consisting of WINIDE EXE the integrated development environment IDE software interface into the MC68HC908GP20 and MC68HC908GP32 based hardware for editing and performing software or in circuit simulation CASMOSW EXE the CASMO8W command line cross assembler CS08GPW EXE the in circuit stand alone simulator software for the MC68HC908GP20 or MC68HC908GP32 MCU PROGO8SW EXE the FLASH memory programming software IC
313. selecting the device for simulation Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 218 Debugging Command Set MOTOROLA Clear MAP File Debugging Command Set Command Descriptions CLEARMAP The CLEARMAP command removes the current MAP file from memory forcing the debugger to show disassembled code in the Code windows instead of source code Symbols defined using the SYMBOL command are not affected by this command For the ICSO8GPW the NOMAP command is identical to CLEARMAP Syntax CLEARMAP Use with ICSO8GPW and ICD08SW Example CLEARMAP Clears symbols and their definitions M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 219 Debugging Command Set CLEARSYMBOL Clear User Symbols The CLEARSYMBOL command removes all the user defined symbols created with the SYMBOL command Debug information from MAP files used for source level debugging is not affected by the CLEARS YMBOL command NOTE List the current user defined symbols using the SYMBOL command Syntax CLEARSYMBOL Use with ICSO8GPW and ICD0SSW Example CLEARSYMBOL Clears user defined symbols Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 220 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Show Disassembled Code CODE The CODE command shows disassembled code in the Code window starting at address add Specifying an address
314. sequent debug commands to this file until closed by the MACROEND command during an active ICS08GPW session Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 158 Debugging with ICSO8GPW MOTOROLA Debugging with ICSO8GPW Command Set Summary Table 7 2 ICS08GPW Command Overview Sheet 4 of 7 Command Description MACS Bring up a window with a list of macros MAP View information from the current MAP file stored in memory identical to the SHOWMAP command MD Display the contents of memory locations in the Memory MDI window beginning at the specified address Display the contents of memory locations in Memory window 2 MD2 Mrd pa beginning at the specified address MM Modify contents of memory beginning at the specified address MEM and or select bytes words longs N Set or clear the N bit of the CCR NOBR Remove one or all of active breakpoints Remove the current MAP file from memory forcing the NOMAP ICSO8GPW to show disassembly in the code windows instead of user source code identical to the CLEARMAP command Remove all user defined symbols from memory symbols NOSYMBOL defined in a loaded MAP file are not affected by the NOSYMBOL command PC Assign the specified value to the MCU program counter Attempt to connect with the ICS08GPW circuit board through POD the specified COM port when successful the POD command returns the current status of p
315. ser Interface 6 1 NES 113 6 2 ils i ur a UE AAA 113 6 3 IC SURE ss orr qwe d so aW A 115 6 3 1 ICSOSUPW Simulation Speed iosekocensre cro khER T ER TEES 116 0 3 2 System Requirements for ICSOSCPW cs conde ita a 116 6 3 3 Pile Types and Formats cu niciees eb igeeeeedadewssaea sun 116 GE Starine It GDSOPNY escri a eke deen CEDE 118 6 5 ICSOSGPW WilOwS 546434 0505 AE AWATEREASVWT TERI ERE A Ad 120 6 6 PMA 121 6 6 1 To Display the Code Windows Shortcut Menus 121 6 6 2 Code Window Shortcut Menu Functions 122 6 6 3 Code Window Keyboard Commands lusus 123 6 7 Variables Window dra AA AAA AAA AA 124 6 7 1 Displaying the Variables Shortcut Menu 124 6 7 2 Variables Shortcut Menu Options 2 2 242 oo es 124 6 7 3 Variable Window Keyboard Commands 126 6 8 Memory Window vin xd cee ERA heen awa desde eka deen ACER 126 6 9 Slas TON boc abies des peed AAA 128 BID GP AAA 130 610 1 Changing Register Vales ec 900 130 6 10 2 CPU Window Keyboard Commands 132 Bill Lus OMNI AAA C ob do d d 132 Olo SOME COMBO Ga aa dod ROCA AR 132 Ol21 co o CUT 133 Glaz SOM SIER AM qye 133 Cel Trace i00 hac hok Pier ranean EIA dip oses cedeiaeon aes 134 M681CS08GP In Circuit Simulator Rev 1 0 Operators Manual MOTOROLA Table of Contents 9 Table of Contents 6 14 6 14 1 6 14 2 6 14 3 6 14 4 6 15 6 16 6 17
316. sh control Flash_protect address inst addr Eat urite most buffer x write mure read Flash protect wrlte mext write mo inst addr check For end of pag Figure 9 2 ICDO0O8SW Code Window 2 Code windows also give visual indications of the program counter PC and breakpoints Each code window is independent of the other and can be configured to show different parts of the user s code By pressing the right mouse button while the cursor is over the code window the user is given a pop up menu with these options Toggle Breakpoint at Cursor This option is enabled if the user has already selected a line in the code window by clicking on it with the left mouse button Choosing this option will set a breakpoint at the selected location or if there is already a breakpoint at the selected location will remove it Set PC at Cursor This option is enabled if the user has already selected a line in the code window by clicking on it with the left mouse button Choosing this option will set the program counter PC to the selected location Gotil Address at Cursor This option is enabled if the user has already selected a line in the code window by clicking on it with the left mouse button Choosing this option will set a temporary breakpoint at the selected line and start processor execution running mode When execution stops this temporary breakpoint is removed M68ICSO8GP In Circuit Simulator Rev 1 0
317. specified value and display in the CPU XREG window Z Toggle the Z bit in the CCR M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 191 ICDO8SW In Circuit Debugger Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 192 ICDO8SW In Circuit Debugger MOTOROLA Operator s Manual M68ICSO8GP In Circuit Simulator Section 10 Debugging Command Set 10 1 Contents A or ACC ADCLR ADDI ASCIIF3 and ASCIIF6 ASM BELL BF or FILL BR BREAKA BREAKHX BREAKSP C CAPTURE CAPTUREFILE or CF CCR CGMXCLK CHIPMODE CLEARMAP CLEARSYMBOL CODE COLORS CYCLES or CY DASM DDRA DDRB DDRC DDRD DDRE DUMP EVAL M681CS08GP In Circuit Simulator Rev 1 0 set Accumulator Value 2 oce 197 Clear A D Input Buffer iscccscees es 198 Input Data to A D Converter 199 Toggle ASCH DSpace 200 Assemble Instructions 222 22 22 sede 201 Samd PE Dell sonic rre 202 Block FUL MS uua uo on 9 uos ideis ks 203 Set Instruction Breakpoint 22 s6s 4 204 set Accumulator Breakpoint 22 eerie 206 Set HX Register Breakpoint 2024 3 e050 208 Set Stack Pointer Breakpoint 210 Soler Cry As 212 Capture Changed Data ocn consorcio 213 Open Close Capture File ocoroscicnirsord 214 Set Condition Code Register 2 cssc eres 215 Set CGMXCLK to Bus Clock Relationship 216 Choose Device for Simulation 218 Cie M
318. specified value to the stack pointer SP used by the CPU The value entered with the command should be reflected in the CPU window Syntax SP lt n gt Where lt n gt The new stack pointer value Use with ICS08GPW and ICDO8SW Example SP SEO Set the stack pointer value to SEO Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 300 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Clear SPI I O Buffers SPCLR The SPCLR command can be used to flush the input and output buffers for SPI simulation This will reset the circular buffers and clear out all values Notice that if the SPI is currently shifting a value this command will not prevent the SPI from finishing that transfer See SPDI and SPDO for accessing the input and output buffers of the SPI interface If the ICSOS circuit board is connected SPI inputs and outputs are directed from the board so this command has no effect Syntax SPCLR Use with ICSOS8GPW only Example SPCLR Clear input and output buffers for SPI simulation M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 301 Debugging Command Set SPDI Enter SPI Inputs The SPDI command allows the user to enter input data into the SPI If a data parameter is given the value is placed into the next slot in the circular input buffer If no parameter is given a window is displayed with the input buffer value
319. ssembler must keep a cross reference list where it stores the binary equivalent of each label When a label appears in the source program the assembler looks in this cross reference table to find the binary equivalent Each EQU directive generates an entry in this cross reference table An assembler reads the source program twice On the first pass the assembler just counts bytes of object code and internally builds the cross reference table On the second pass the assembler generates the listing file and or the S record object file as specified in the command line parameters for the assembler This two pass arrangement allows the programmer to reference labels that are defined later in the program EQU directives should appear near the beginning of a program before their labels are used by other program statements If the assembler encounters a label before it has been defined the assembler has no choice but to assume the worse case and assign the label a 16 bit address value This would cause the extended addressing mode to be used in places where the more efficient direct addressing mode could have been used In other cases the indexed 16 bit offset addressing mode may be used where a more efficient 8 bit or no offset indexed command could have been used 5 9 2 Form Constant Byte FCB Operator s Manual The arguments for this assembler directive are labels or numbers separated by commas that the assembler can convert into a single
320. ssociated map file is also loaded When used with ICDOSSW the map file is not loaded use the LOADALL or LOADMAP command for this purpose LOAD lt filename gt Where lt filename gt The name of the S19 file to be loaded The S19 extension can be omitted The filename value can be a pathname that includes an asterisk wildcard character If so the command displays a window that lists all files in the specified directory having the S19 extension ICSO8GPW and ICDO8SW LOAD PROG1 S19 Load file PROGI S19 and its map file into the simulator at the load addresses in the file LOAD PROG2 Load file PROG2 S19 and its map file into the simulator at the load addresses in the file LOAD A Display the names of the S19 files on the diskette in drive A for user selection LOAD Display the names of the S19 files in the current directory for user selection M68ICSO8GP In Circuit Simulator Rev 1 0 254 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Load S Records and Map File LOADALL The LOADALL command loads both the 19 object file and the map file into the debugger It is equivalent to executing both the LOAD and LOADMAP commands Syntax LOADALL lt filename gt Where lt filename gt Filename of the user source code Use with ICD08SW only Example LOADALL myprog Loads both the 19 object file and the map file M68ICSO8GP In Circuit Simulator
321. stalled on printed circuit boards are extremely sensitive to electrostatic discharge ESD Wear a grounding wrist strap whenever handling any printed circuit board This strap provides a conductive path for safely discharging static electricity to ground B 3 Functional Description The M68ICSO8GP hardware pod consists of two components e ICSO8GP20 board e SPGMROS serial programmer base unit B 3 1 ICS08GP20 Board Operator s Manual The core component of the board is the MCU either the MC68HC908GP20 or MC68HC908GP32 This MCU resides either on the ICSO8GP20 board or on a target system When the MCU resides on the board the pod may be used as an in circuit emulator or simulator for the MC68HC908GP20 For this configuration a target cable is run from the pod to the target system The ICSO8GP20 supports two kinds of target cables e A 40 pin ribbon cable Motorola part number 01 RE91138W01 terminating in a 40 pin male DIP dual in line package header A flexible target head adapter cable Motorola part number M68CBLOS5C terminating in connectors for one of two target head adapters Two target head adapters THAs are available for use with the flex cable Fora 40 pin DIP package MCU on the target system use Motorola THA part number M68TCO8GP20P40 Fora 44 pin QFP package quad flat pack MCU on the target system use Motorola THA part number M68TCO8GP20FB44 M68ICSO8GP In Circuit Simulator Rev 1 0
322. sure that the target circuitry does not interfere with the monitor mode communications When connecting target circuitry to the MCU be sure to connect the circuits through the pod by connecting to the RST_OUT RST_IN TGT_IRQ TGT_PTAO TGT_PTA7 TGT_PTCO TGT_PTC1 and TGT_PTC3 pins of the MONOS connector These signals will be connected by the pod to the corresponding pins of the MCU through the corresponding MONOS connector pins RST IRQ PTA7 PTCO PTCI and PTC3 after monitor mode is established TGT_PTAO is never connected to PTAO as the PTAO signal is being used for host communications B 6 Connector Pin Assignments The tables in this section describe the pin assignments for the connectors on the ICSO8GP20 board M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 355 Technical Reference and Troubleshooting Table B 1 Target DIP Connector J2 Pin No Mnemonic Schematic NET Direction Signal Description 1 PTA7 KBD7 TGT_PTA lt 7 gt Bidirectional Port A I O keyboard interrupt bit 7 2 VDDA TGT_VDD PLL analog power 3 PTA6 KBD6 PTA lt 6 gt Bidirectional Port A I O keyboard interrupt bit 6 4 Vssa cie PLL analog ground 5 PTA5 KBD5 Port A I O keyboard interrupt bit 5 6 CGMXFC CGMXFC Analog External filter capacitor 7 PTA4 KBD4 PTA lt 4 gt Bidirectional Port A I O keyboard interrupt bit 4 8 OS
323. t 4 GND GND Flex cable shield ground 5 OSC1 Crystal amplifier input 6 RST External reset 7 PTCO TGT_PTC lt 0 gt Bidirectional Port C I O bit O 8 PTC1 TGT_PTC lt 1 gt Bidirectional Port C I O bit 1 9 PTC2 Port C I O bit 2 10 PTC3 TGT_PTC lt 3 gt Bidirectional Port C I O bit 3 11 PTC4 PTC lt 4 gt Bidirectional Port C I O bit 4 12 PTC5 Port C I O bit 5 13 PTC6 PTC lt 6 gt Bidirectional Port C I O bit 6 14 PTEO TxD PTE lt 0 gt Bidirectional Port E I O bit O SCI transmit data 15 PTE1 TxD Port E O bit 1 SCI receive data 16 IRQ TGT_IRQ External interrupt 17 PTDO SS PTD lt 0 gt Bidirectional Port D I O bit O SPI slave select 18 PTD1 MISO Port D O bit 1 SPI master in slave out 19 GND GND Flex cable shield ground 20 PTD2 MOSI PTD lt 2 gt Bidirectional Port D I O bit 2 SPI master out slave in 21 PTD3 SPSCK Port D I O bit 3 SPI serial clock 22 NC None No connection 23 Vss MCU ground 24 GND Flex cable shield ground 25 NC No connection 27 PTD4 T1CHO PTD lt 4 gt Bidirectional Port D I O bit 4 timer 1 channel 0 28 PTD5 T1CH1 PTD lt 5 gt Bidirectional Port D I O bit 5 timer 1 channel 1 M68ICSO8GP In Circuit Simulator Rev 1 0 358 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Connector Pin Assignments Table B 2 Target A Connector J3 Continued Pin No Mne
324. t Quit Application The EXIT command terminates the software and closes all windows The QUIT command is identical to EXIT Syntax EXIT Use with ICS08GPW and ICDO8SW Example EXIT Finish working with the program Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 232 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Begin Program Execution G GO or RUN The identical G GO and RUN commands start execution of code at the current program counter PC address or at an optional specified address If only one address is entered that address is the starting address Execution continues until a key is pressed until it arrives at a breakpoint or until an error occurs If a second address is entered execution stops at that address In the ICSO8GPW simulator this command causes the host computer to simulate instructions as fast as it can However execution will be much slower than real time execution In the ICD08W debugger this command starts real time execution by the MC68HC908GP20 or MC68HC908GP32 processors MOTOROLA NOTE To see the windows updated with information during execution of code use the STEPFOR command Syntax G startaddr endaddr GO startaddr endaddr Where lt startaddr gt Optional execution starting address If the command does not have a lt startaddr gt value execution begins at the current PC value lt endaddr gt Optional
325. tallation and Initialization Installing the ICS08GP Software 3 4 2 Starting the ICSO8GP Software Depending on the operating system used choose the appropriate method for starting the WinIDE software From the Windows 95 Start menu select the WINIDE and or ICSOSGPW icon s The other ICSO8GP programs may be started alone or from within the WinIDE editor If CASMOSW is started alone a list of command line options appears The first time an attempt is made to connect to the pod after installing the ICSOSGPW simulator software the user is prompted to select the chip from the Pick Device dialog Figure 3 1 2 Pick Darei HOG PAD Figure 3 1 Pick Device Dialog Window 3 4 3 Pod to Host Communication When the ICSO8GP software is started it attempts to communicate with the pod using the specified COM port baud rate and default parameters When connection with the pod is established the status bar contains the message Contact with pod established If the pod is not installed or if the software cannot establish communications with the pod through the specified COM port the Can t Contact Board dialog appears Figure 3 2 with options for changing the COM port or baud rate and retrying the connection or running the simulator in stand alone mode with no input or output from the pod M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Software Installation
326. tents of addresses 200 300 in rows of eight bytes M68ICSO8GP In Circuit Simulator Rev 1 0 230 Debugging Command Set MOTOROLA Evaluate Expression Debugging Command Set Command Descriptions EVAL The EVAL command evaluates a numerical term or simple expression giving the result in hexadecimal decimal octal and binary formats In an expression Spaces must separate the operator from the numerical terms NOTE Octal numbers are not valid as parameter values Operand values must be 16 bits or less If the value is an ASCII character this command also shows the ASCII character as well The parameters for the command can be a number or a sequence of number space operator space and number Supported operations are addition subtraction multiplication division logical AND amp and logical OR Syntax EVAL lt n gt lt op gt lt n gt Where lt n gt Alone the numerical term to be evaluated otherwise either numerical term of a simple expression lt op gt The arithmetic operator amp or of a simple expression to be evaluated Use with ICS08GPW and ICDOSSW Examples EVAL 45 32 0077H 119T 0001670 00000000011101110 EVAL 100T 0064H 100T 0001440 00000000011001000 M681CS08GP In Circuit Simulator Rev 1 0 ui WwW mAT Operator s Manual MOTOROLA Debugging Command Set 231 Debugging Command Set EXIT or QUIT Exi
327. ter SPI PUS 25 46 pesU RP ERR ES AR P PARS 302 View SPIOUMUS PR 303 Set Input Clock for SPI Slave 4 24 6022s0 4 4 304 Execute Source DIES Lade ke be rra 305 Execute SIE DIN eric vostre 306 Show Stack Window seeds rs 307 Show AA 308 Sep PEE eae REC ARA 309 Operator s Manual MOTOROLA Debugging Command Set 195 STEPTIL SYMBOL TRACE UPLOAD_SREC V VAR VERIFY VERSION or VER WAIT WHEREIS X or XREG Z 10 2 Command Descriptions Debugging Command Set Step Until Address o cc cectsaoe edsinbedada 310 Add Buil AAA 311 Enable Disable Tracing 2 9s lt s4266 312 Upload S Record to Screen Loses soos e Rn ake 313 Set or Clear V Bit CCR ciar irs 314 Display Variable ciar in aia 315 Verity s Reootd File sso cscrrtosravsrsosrs 316 Display Software Version 317 bi of gres m 318 Display Symbol Value 319 oer X Rezistor Vale oii uaocos o ERR E EVA 320 neu lear Zerg Bil cerrar deca EE 9408 321 The debugging command set is arranged alphabetically by command name in this section The entries describe the commands in detail Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 196 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Accumulator Value A or ACC The ACC command sets the accumulator to a specified value The value entered with the command is shown in the CPU window The ACC and A commands are identical S
328. terface MOTOROLA WinlDE User Interface WinlDE Environment Options Real Tabs Select this option to use actual tab characters Pressing the tab key insets a tab character The tab character is displayed as a number of spaces determined by the tab size but is really a tab character Changing the tab size affects the display of all tabs in the file present and future Smart Tabs Select this option to enable smart tabs i If the previous line contains text pressing the TAB key advances the cursor to the same column as the beginning of the next character group on the previous line ii Ifthe previous line does not contain text smart tabs behave as fixed tabs Tab Size Enter the number of spaces in a tab This setting affects how all tabs operate fixed real or smart tabs This number is the default display size of all tab characters and the size in spaces of a tab in both fixed and smart modes If the tab size is N the tab stops are atl N 1 2N 1 3N 1 and so on Filename Types As part of the Environment Settings General Editor options WinIDE allows a default file type to be set by using the file filter This is useful when working primarily with one type of file although a filter may also include a group of extensions A list of the filter descriptions and their corresponding extensions is displayed to the left To select a filter use the Default File Type pull down box on the right to choos
329. the stack pointer value equals n e With n and address values the BREAKSP command forces a halt 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 The maximum number of breakpoint addresses is 64 Each BR BREAKA BREAKSP or BREAKHX 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 BREAKHX command is to duplicate one of those 64 addresses If the BREAKSP command is entered without an address value the halt in code execution clears the stack pointer breakpoint To cancel the stack pointer breakpoint before the halt occurs enter the BREAKSP command without any parameter values If the BREAKSP command is entered without an address value the stack pointer breakpoint does not show in the Breakpoint window If the BREAKSP command is entered with an address value the stack pointer breakpoint may be cleared by one of these methods Enter the NOBR command e Position the cursor on that address in the code window Then press the right mouse button and select Toggle Breakpoint at Cursor menu item M68ICSO8GP In Circuit Simulator Rev 1 0 210 Debugging Command Set MOTOROLA Debugging Comm
330. the board so this command has no effect Syntax INPUTA lt n gt Where lt n gt Eight bit simulated value for port A Use with ICSO8GPW only Example INPUTA AA Simulate the input AA on port A Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 244 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Set Port B Inputs INPUTB The INPUTB command sets the simulated inputs to port B The CPU reads this input value when port B is set as an input port NOTE Ifthe ICSO8GP circuit board is connected port B inputs come from the board so this command has no effect Syntax INPUTB lt n gt Where n Eight bit simulated value for port B Use with ICSO8GPW only Example INPUTB 01 Simulate the input 01 on port B M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 245 Debugging Command Set INPUTC Set Port C Inputs The INPUTC command sets the simulated inputs to port C The CPU reads this input value when port C is set as an input port NOTE Ifthe ICSO8GP circuit board is connected port C inputs come from the board so this command has no effect Syntax INPUTC n Where n Eight bit simulated value for port C Use with ICSOS8GPW only Example INPUTC 01 Simulate the input 01 on port C Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 246 Debugging Co
331. the simulator When using the ICD08SW debugging software the user s code can be run directly out of the MCU s internal FLASH at real time speeds NOTE The ICSOSGP20 s emulation of the on board MCU is limited Port A bit 0 PTAO is used for host to MCU communication The port bit is not available for connection to a target system Setting DDRA bit 0 to 1 will stop communications with the simulation or debugger software and will require a system reset to regain communication with the MCU Port bits PTA7 PTCO PTCI and PTC3 are temporarily disconnected from the target system during reset Emulation of the MC68HC908GP s RST signal is also limited in that the signal is not a bi directional open drain signal It is emulated as either an input or an output determined by jumper header W2 when using the target connectors or as two pins one input and one output when using the MONOS cable M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 343 Technical Reference and Troubleshooting When using the PROGO8SW programming software the MCU s FLASH memory can be programmed Socket XU3 supports the 44 pin QFP version of the MC68HC908GP20FB or MC68HC908GP32PB and socket XU1 supports the 40 pin DIP version of the MC68HC908GP20P or MC68HC908GP32P Only one part may be programmed at a time The pod also supports in circuit programming of either version of the part through the MONOS
332. though much of RAM may look the same some values may have changed To verify code that was loaded prior to the reset use the VERIFY command All windows have right button mouse menus which allows access to much of the debugger s functionality To open place the mouse over the window and click the right mouse button If a GO command is entered without setting a breakpoint the only way to regain control of the processor is to reset it The watchdog is not active while running ICD08SW When a device is programmed and powered without the debugger for example on a target board the watchdog is active by default If the security bytes see 1 9 MC68HC908GP Security Feature are programmed with the PROGOSSW programmer the ICDO8SW debugger automatically knows the security bytes In this way ICDO8SW is able to reset the processor even if it has been programmed All security information is stored in the file SECURITY INI To save the ICDO8SW desktop settings use the SAVEDESK command Retrieve them by using the LOADDESK command The desktop settings are retrieved automatically upon startup M68ICSO8GP In Circuit Simulator Rev 1 0 174 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger Startup and Parameters 9 4 Startup and Parameters The ICDO8SW debugger may be started and parameters may be passed to it in either of two ways e From the WinIDE editor as described in 4 12 5 4 Executable Tabs EXE 1
333. tion Choose Close Logfile from the File menu to stop logging and close the active logfile Alternatives Type CTRL C or click the CLOSE LOGFILE button on the toolbar or enter the LF command in the Status window command line These are the keyboard equivalents to choosing the File Close Logfile menu option Choose Exit from the File menu to close the debugger application Alternative Type CTRL X to exit the debugger application and close the subordinate and main windows This is the keyboard equivalent to choosing the File Exit menu option 6 20 ICSO8GPW Execute Options Operator s Manual Use the ICSO8GPW Execute menu options to reset the emulation microcontroller and perform debugger routines To perform an execute operation select Execute in the menu bar to open the Execute menu Figure 6 31 Click on an option to perform the operation Reset Processor Fa Step F5 Multiple Step FE Go Fr F8 Stop Figure 6 31 ICS08GPW Execute Menu M68ICSO8GP In Circuit Simulator Rev 1 0 148 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface ICSO8GPW Execute Options 6 20 1 Reset Processor 6 20 2 Step 6 20 3 Multiple Step 6 20 4 Go NOTE NOTE Choose Reset Processor from the Execute menu to send the RESET command to the emulation MCU and reset the PC to the contents of the reset vector Alternative Press the F4 function key This
334. to display different parts of the source code or different assembly modes See Figure 6 3 uninitialized uninitialized uninitialized uninitialized uninitialized Figure 6 3 Code Window 2 in Disassembly Mode with Breakpoint Toggled 6 6 1 To Display the Code Windows Shortcut Menus To display the Code 1 or Code 2 Windows Shortcut menu Figure 6 4 position the cursor in either the Code 1 or Code 2 window and click the right mouse button Toggle Breakpoint at Cursor Set PC at Cursor Gotil Address at Cursor Set Base Address Set Base Address to PC Select Source Module Show Source Disassembly gt Help Figure 6 4 Code Window Shortcut Menu M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICS08GPW In Circuit Simulator User Interface 121 ICS08GPW In Circuit Simulator User Interface 6 6 2 Code Window Shortcut Menu Functions The Code Window Shortcut menu Figure 6 4 offers these options Toggle Breakpoint at Cursor Choose this option to set or remove the breakpoint at the current cursor location This option is enabled only if the user has clicked on a line of code to select it Set PC at Cursor Choose this option to set the program counter PC to the current cursor location This option is enabled only if the user has clicked on a line of code to select it Gotil Address at Cursor Choose this option to execute the source code until the PC gets to the line
335. tor Rev 1 0 Operator s Manual MOTOROLA ICSO8GPW In Circuit Simulator User Interface 135 ICS08GPW In Circuit Simulator User Interface 6 14 1 Adding a Breakpoint To add a breakpoint with the cursor in the Breakpoint window click the right mouse button to open the Breakpoint Shortcut menu Select the Add Breakpoint option from the shortcut menu In the Edit Breakpoint dialog Figure 6 19 enter the address for the new breakpoint in the Address text box Press the OK button to close the dialog and save the new breakpoint Edit Breakpoint Address Count 7 avae S E xvaue seva OZ O O Y OK X Cancel Figure 6 19 Edit Breakpoint Dialog Window Qualify the breakpoint using these qualifiers Count Enter the number of times the address will be reached before breaking for instance break after n times the default is n 1 e Accumulator value Enter the number the accumulator value must reach before breaking for instance break if address and A n e X index register value Enter the number the index register value must reach before breaking for instance break if address and X n e Stack pointer value Enter the number the stack pointer value must reach before breaking for instance break if address and SP n Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 136 ICS08GPW In Circuit Simulator User Interface MOTOROLA
336. tor assembler compiler debugger and other programs Launch the in circuit simulator compiler debugger programmer or another program 4 4 2 Main Window Components Figure 4 1 shows how the WinIDE Main window might look during a typical editing project and labels the standard window components Title bar The title bar appears at the top edge of the Main window and contains Application title Name of the currently open project file Windows control buttons for closing minimizing or maximizing the window Menu bar The menu bar appears immediately below the title bar and contains the names of the WinIDE menus Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 50 WinlDE User Interface MOTOROLA WinIDE User Interface WinIDE Main Window Toolbar The WinIDE toolbar appears just below the menu bar and contains shortcut buttons for frequently used menu options Main window The Main window area is the inside portion of the Main window which contains the open subordinate windows that can be resized repositioned minimized or maximized using standard Windows techniques or Window menu options e Status Bar The status bar Figure 4 2 appears along the bottom edge of the Main window and contains a number of fields depending on the project that show Source file line and column numbers of the blinking insertion point cursor System status or progress of the cur
337. tor fo p 207628 N KEMET Electronics Corporation C2 C12 tantalum 1N5817 Schottky power rectifier CR1 BS170 Transistor TMOS FET switching Motorola Q1 Q2 MF 25 B 10 7K Resistor 10 7 K 1 1 4 W Magoo Corporation Digikey R2 Corporation MF 25 B 61 9K Resistor 61 9 K 1 1 4 W A I Poro DAE R1 Corporation CR 25 B 3 3K Resistor 3 3 K 5 1 4 W fagao Comporelon Pigiksey R3 R7 Corporation M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 367 Technical Reference and Troubleshooting Table B 10 ICS08GP20 BOard Parts List Continued ae Reference Part Number Description Manufacturer Designator CR 25 B 47K Resistor 47 K 5 1 4 W q eorpore tian ID ey R4 R6 Corporation IC low voltage quad SPST MAX394CPP CMOS analog switch Maxim Integrated Products Inc U4 MC74HC04AN IC hex inverter Motorola U5 MC74HC02AN IC quad 2 input NOR gate Motorola U6 MC74HC4040AN IC 12 stage binary ripple counter U7 69192 640 Connecter 20 pin header Berg Electronics Inc J2 J4 straight retentive leg 69192 616 Connector 16 pin header Berg Electronics Inc J6 dual row straight SSW 110 01 G S connector T0 pin gold header EA J7 J8 single row straight 24 872 Connector shunt 2 position Krista S Connector 2 pin header J1 J5 69192 602 straight retentive leg Berg Electronics Inc Wi W3 69190 603 Connector apin header Berg Electronics
338. tructions starting at the current program counter address then halt identical to the ST and T commands STEPFOR STEPTIL SYMBOL Execute instructions continuously one at a time starting at the current PC address and continuing until reaching an error condition breakpoint or keypress Step through instructions starting at current PC address and continue until PC value reaches the specified address or until keypress breakpoint or error occurs View current symbols or create new symbols UPLOAD SREC V Step through a specified number of assembly instructions starting at the current PC address then halt identical to the ST and STEP commands Upload the content of the specified memory block range in 19 file format display the contents in the Status window and enter information into the current logfile Set or clear the V bit in the condition code register CCR Operator s Manual M68ICSO8GP In Circuit Simulator Rev 1 0 190 ICDO8SW In Circuit Debugger MOTOROLA ICDO8SW In Circuit Debugger Debugging Commands Table 9 1 ICD08SW Command Overview Sheet 5 of 5 Command Description VAR Display specified address and contents in the Variables window for viewing during code execution VERIFY Compare the contents of program memory with an S record file ERE Display program version and date WHEREIS Display value of the specified symbol X Set the X register to the
339. ual M681CS08GP In Circuit Simulator Rev 1 0 348 Technical Reference and Troubleshooting MOTOROLA Technical Reference and Troubleshooting Troubleshooting the Quick Start described in 1 8 Quick Start Instructions and verify that the signal is approximately 8 5 Vdc when RST rises If IRQ is not at 8 5 Vdc there may be a problem with the ICSO8GP20 board s IRQ circuit Check R3 Q2 U6 R6 and US for the proper signals to keep IRQ at 8 5 Vdc during the period where RST is low b At the rising edge of RST PTAO PTA7 PTCO PTCI and PTC3 must be held at logic values 1 0 1 O and O respectively The logic levels are 5 volt CMOS logic levels Using a dual trace oscilloscope trigger channel 1 on the rising edge of RST XUI pin 6 or XU3 pin 1 and read the corresponding MCU pin with channel 2 PTAO XUI pin 33 or XU3 pin 32 is the serial data pin to and from the host PC and should be around 5 Vdc at the rising edge of RST PTA7 XUI pin 40 or XU3 pin 39 PTCO XUI pin 7 or XU3 pin 2 PTC1 XUI pin 8 or XU3 pin 3 and PTC3 XUI pin 10 or XU3 pin 5 are controlled by analog switch U4 and should be approximately 0 V 5 V 0 V and 0 V respectively at the rising edge of RST Port pins PTA7 PTCO PTC1 and PTC3 are connected to the target connector pins after the rising edge of RST and are then available for target system connections The MCU s PTAO pin is never connected to the target pins as it is used for host communication c
340. uires To calculate the timing of code for a device take the number of cycles shown in the window and multiply by the amount of time that a cycle represents in the target system For a 4 MHz HCOS the time per cycle is 250 ns Cycles oO xi CYCLES 666666686 Figure 6 15 Cycles Window 6 12 Stack Window Use the Stack window Figure 6 16 to view e Values that have been pushed on the stack e The stack pointer value e CPU results if an RTI return from interrupt or RTS return from subroutine instruction 1s executed at that time To display the stack window enter the STACK command in the ICSOSGPW Status window command line Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 132 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Stack Window Stack Window x WER REGES Stack Ptr SP FF RTS Return PC XXXX RTI Return PC XXXX A XX X XX CCR XX Figure 6 16 Stack Window NOTE The value xx means that the memory location is uninitialized and indeterminate The value W means that it is unimplemented invalid memory 6 12 1 Interrupt Stack During an interrupt the Stack window displays e The interrupt stack e Data values in the stack e Values of the condition code register CCR accumulator A and index register X This information indicates the restored state of the stack upon the return from the
341. uno OPER Mr 67 Saying die Projecti scd cu red eee med ene PRX R EdxU PEERS S 70 SCCLE command os scere P RRDSeRPERERERRRER REC es ere hens Se 288 SEDI comand ovulo EE RE REDE 289 SCDO comimnand icscbbe e Ra E RE KEEPER EATER TEASER 290 scratch pad files cnor smdr uber eezaBeteeseshere bes4 be teadaa deii 117 q dua Dara eda ees eure erra d ed RES eid RENE pU qui adden 117 security feature REDI 34 security feature M 8HC908GP20 1 2 eee 34 Select Source Module issuer dh RENTRER OEERESASCRNERSAR REA 122 s l cting TEX eC 65 serial port CONNEC COL ae ee bead ie See bo eal es reds 31 37 38 A a a a a aaa aa doaa aa aia 27 Serial Programmer See SPOMR 2c ciceenie bane and cierro rre rd canes 25 Sel Base Addr sS ou d 2 4540 00 C 122 M68ICSO8GP In Circuit Simulator Rev 1 0 400 Index MOTOROLA Set PC at Cursor setting base address breakpoints markers program counter Setup setup ICSO8GP software Show as HEX and ASCII Show as HEX Only Show Assembler Progress Show Cycles in Listing Show Disassembly Show Source Disassembly SHOWBREAKS command SHOWCODE command SHOWMAP command SHOWTRACE command SIMGS command 222r 44440400944 simulator SLD map files Smart Tabs SNAPSHOT command socket power LED 242 2004 84e4s0doe4 software CASMOSW assembler See CASMO8W ICDO8SW in circuit debugger See ICDO8SW ICSO8GP See specific programs ICSOSGPW in
342. urce code and the resulting assembled or compiled object code Listing files show exactly how and where each code was assembled If a listing file in the environment settings is specified it is created during assembly The listing file will have the same name as the file being assembled with the LST extension and will overwrite any previous file with the same name Listing files contain these fields in the following format AAAA CC VVVVVVVV LLLL Source Code Where AAAA The first four hexadecimal digits are the address of the command in the target processor memory CC The number of machine cycles used by the opcode This value which always appears in brackets is a decimal value If an instruction has several possible cycle counts as would be the case when the assembler encounters a branch instruction and the assembler cannot determine the actual number of cycle counts the CC field will show the best case lowest number VVVVVVVV Hexadecimal digits the number of digits depends on the actual opcode represent values put into that memory address LLLL Line count Source code The actual source code The symbol table listing every label and its value is at the end of the listing file If a listing file using the L parameter in the Windows command line is specified a file with the same name as the file being assembled and the extension LST can be produced by the assembler This file serves as a program listing showing
343. uring the connecting phase the data observed at the MCU s PTAO pin is also affected 10 Make sure that the target MCU has a good clock source with a clock rate that gives a 9600 baud serial communications rate for monitor mode on the target system Use an oscilloscope to check the OSC2 output at the MCU M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Technical Reference and Troubleshooting 353 Technical Reference and Troubleshooting 11 Make sure that the MCU can enter and remain in monitor mode For this to happen the following conditions must occur a Operator s Manual At the rising edge of RST the target MCU s IRQ pin must be at Verst 8 5 Vdc Using a dual trace oscilloscope trigger channel 1 on the rising edge of the MCU s RST pin and read the IRQ pin with channel 2 Start the ICSO8GPW software as described in 1 8 Quick Start Instructions and verify that the IRQ signal is approximately 8 5 Vdc when RST rises At the rising edge of RST PTAO PTA7 PTCO PTC1 and PTC3 on the MCU must be held at logic values 1 0 1 0 and 0 respectively The logic levels are 5 volt CMOS logic levels Using a dual trace oscilloscope trigger channel 1 on the rising edge of RST and read the corresponding MCU pin with channel 2 PTAO is the serial data pin to and from the host PC and should be around 5 Vdc at the rising edge of RST MCU pins PTA7 PTCO PTC1 and PTC3 are controlled by analog switch U4
344. urn to the source window To save the file with the name of an existing file select the filename in the File Name list and click the OK button A confirmation dialog will ask for confirmation to overwrite the existing file Choose Close File from the File menu to close the file in the active source window If the Give user option to save each file option in the General Environment tab in the Environment Settings dialog is chosen the Information dialog will display reminding the user to save changes to the ASM file Alternatives Type Ctrl D or click the CLOSE toolbar button This is the keyboard equivalent to choosing the File Close File menu option M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinlDE User Interface 61 WinIDE User Interface 4 10 6 Print File NOTE 4 10 7 Print Setup 4 10 8 Exit Operator s Manual Choose Print from the File menu to open the Print dialog Figure 4 8 and choose options for printing the active source window The Print dialog for the operating system and printer capabilities opens with options for Print range Print quality and open the Print Setup dialog to change printer settings Printer Default Printer Apple Laserw riter Pro 600 on LPT1 Cancel Setup Print range Print quality 600 dpi Copies fi Collate copies Figure 4 8 Print Dialog Window The Print option is active when at least one source window
345. used although it is possible for multiple header records to occur M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA S Record Information 335 S Record Information Table A 3 S Record Types Record Type Description Header record for each block of S records The code data field may S0 contain any descriptive information identifying the following block of S records The address field is normally zeroes Code data record and the 2 byte address at which the code data is to 9 reside S2 S8 Not applicable to ICS08GPW Termination record for a block of S1 records Address field may optionally contain the 2 byte address of the instruction to which S9 control is to be passed If not specified the first interplant specification encountered in the input will be used There is no code data field A 5 S Record Creation S record format programs may be produced by dump utilities debuggers cross assemblers or cross linkers Several programs are available for downloading a file in the S record format from a host system to an 8 or 16 bit microprocessor based system A 6 S Record Example A typical S record format as printed or displayed is shown in this example Example 00600004844521B 1130000285F245F2212226A00042429008237C2A 11300100002000800082529001853812341001813 113002041E900084 42234300182342000824A952 107003000144ED492 S9030000FC In the exa
346. user can view any of the registers modify their values and store the results back into memory An alternate way to bring up the register files window is to press the REGISTER FILES speed button Syntax R Use with ICS08GPW and ICD08SW Example R Start interactive system register setup M681CS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 283 Debugging Command Set REG Show Registers The REG command displays the contents of the CPU registers in the Status window The STATUS command is identical to the REG command This command is useful for capturing the CPU state to an open logfile Syntax REG Use with ICS08GPW and ICDOSSW Example REG Displays the contents of the CPU registers Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 284 Debugging Command Set MOTOROLA Debugging Command Set Command Descriptions Place Comment in Batch Macro File REM The REM command lets the user display comments in a macro file When the macro file executes the text comment appears in the status window The text parameter does not need to be enclosed in quotes This command is useful for recording comments in a logfile Syntax REM lt text gt Where lt text gt A comment to be displayed when a macro file is executing Use with ICS08GPW and ICDOSSW Example REM Program executing Display the message Program executing during macro file execution M681
347. using the LOAD command in the ICSO8GPW Status window The object file has the same name as the file assembled with the extension HEX or S19 and contains the actual assembled or object code to debug If an object file in the environment settings is specified it is created during assembly Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 116 ICS08GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface ICSO8GPW Description The CASMO8W and some other assemblers product object files in the S19 format The Motorola S19 object code format is described in detail in Appendix A S Record Information Hex files are the Intel 8 bit object code format Map files contain source level debugging information To debug symbolic or source code in the code window one or more P amp E map files must also be loaded The MAP source level map file can be generated by specifying the map files option on the command line when running the CASMO8W assembler or loaded using the LOADMAP command in the ICSO8GPW Status window If a map file is specified in the environment settings it is created during assembly NOTE Map files contain directory information so they cannot be moved To place map files in another directory move map files to the new directory and reassemble the file in the new directory so the new map files will contain the correct directory information If a third party assem
348. verify that the S record file has been loaded correctly execute the Verify Module command see 8 4 10 VM Verify Module which compares the S record file with the contents of the module Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 170 PROGO8SW FLASH Programmer MOTOROLA User s Manual M681CS08GP In Circuit Simulator Section 9 ICD08SW In Circuit Debugger 9 1 Contents 9 2 Introduction 2 008 9 3 MONOS Debugging Limitations and Tips 9 4 Startup and Parameters osse ees 9 3 User DUMP AAA 95 1 Status WIndOW iliioseoscsusses eeuus gSA Pop Up MEMU uude s E EY ERES 95 12 o A 9 5 2 Code Witty assu ovd b xy Ed ash 95 4 1 Pop Up Menu 32 84 2240 eR EE EAE 935214 o A E RW Od EAE MS 9 5 3 Variables Window 2 66 s usecase 9 5 3 1 Pop Up Menu s osintocsiasis s pie ts Bs Re es Coo Lesd LAT CES ES 9 5 4 Memory Window isis use d aras 9 5 4 1 Pop Up MEMI 2 casara ri 9 5 4 2 A A 9 5 5 Colors Window 225 242 2 9 x 25 0 LPUDO WIDOWLAa CRexe s se hg ei Rda 45 5 1 Pop Up Memi aa Led rica RC 9 5 6 2 es is he odes ivan daw 9 6 Debugging Commands 9 6 1 Syntax and Nomenclature 9 6 2 Command Recall sicarios 9 6 3 Command Set Summary M68ICS08GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA ICDO8SW In Circuit Debugger 171 ICDO8SW In Circuit Debugger 9 2 Introduction This chapter describes the use of the ICDOSSW in circuit
349. vironment Settings tabs choose options by marking option buttons sometimes called radio buttons check boxes and entering information in text boxes 4 12 5 1 General Environment Tab Click the General Environment tab in the Environment Settings dialog Figure 4 13 to change options for saving the project files exiting the WinIDE editor and storing a filename to be passed to an external program as a parameter Environment Settings x Assembler Compiler EXE1 Debugger EXE2 Programmer Upon Exiting WIN IDE v Auto Save the current project v Auto Save All Files Ask user Exit Application Saving the project v Also saves all open editor files ZFILE Parameter passed to external programs is Currently edited filename C Main filename gt NEED Mif modified files exist just prior to external program execution gt v Give user option to save each file Figure 4 13 Environment Settings Dialog General Environment Tab NOTE Clicking the OK button on any tab saves all changes made in the Environment Settings dialog and closes the dialog M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA WinIDE User Interface 69 WinIDE User Interface The General Environment tab offers these options Upon Exiting the WinIDE Editor Auto Save the Current Project Select this option to save the currently open project automatically with the file extension
350. w e Programmer windows e Register Block window CS00GF n ro Sa Vernon 100 Ee Execute windows Heb e alas LF gt 9 lE wl 0 ml 2 MELLE AECA 22 j ARE BE URTE 329 er H2 XX 00 00 BH CO 00 XX HB BD REG hh PORTO l minitialized Memory RE Mi DRTE 503 PE man uvueumvmu CER 113 T SP W rF Pod Detected Hn lajs pU ee REEL EEUU REIS A PROGRAM SEQUENCE BUEFPTA buffer pointer i ADDRESS write address BWTECIMIHT numer of bytes in buffer Lade Mandos 1 gt Source 90H gpl asm write a bel Pers mpi LITTERE APR atir ke next pagecmou max pulse cnt lda inst addr HAt add sta mU E 1da ding map file with 164 entries HAP fili po enable po write a buffer Dhr write more Flash_control Lda Flash pratect Ldhx address inst_ addr Figure 6 2 ICS08GPW Windows Default Positions Operator s Manual M681CS08GP In Circuit Simulator Rev 1 0 120 ICSO8GPW In Circuit Simulator User Interface MOTOROLA ICSO8GPW In Circuit Simulator User Interface Code Windows 6 6 Code Windows The Code windows Code 1 and Code 2 can be set to display source code in either source or disassembly modes Code windows also give visual positions of the current program counter PC and all breakpoints within the source code Display both code windows simultaneously Each code window is independent The user can configure each window
351. w instruction Enter the new instruction in the New Instruction text box Press the ENTER key to assemble the new instruction store and display the resulting machine code then move to the next memory location where the user will be prompted for another instruction If there is an error in the instruction format the address stays at the current address and an assembly error flag appears To exit assembly press the EXIT button Syntax ASM lt address gt Where lt address gt Address where machine code is to be generated If an lt address gt value is not specified the system checks the address used by the previous ASM command then uses the next address for this ASM command Use with ICSO8GPW and ICD08SW Example With an address argument ASM 100 The Assembly window with the ASM command and no argument is shown in Figure 10 1 Assembly Window Of x Address 0100 Current Instruction CLRX New Instruction CLR Figure 10 1 Assembly Window ASM Command M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 201 Debugging Command Set BELL Sound PC Bell Syntax Use with Example Operator s Manual The BELL command sounds the PC bell the specified number of times With no argument the bell sounds once To turn off the bell as it is sounding press any key BELL lt n gt Where lt n gt The number of times to sound the bell ICSOSGPW and ICDO8SW
352. way to expose the EPROM to a UV light M68ICSO8GP In Circuit Simulator Rev 1 0 380 Glossary MOTOROLA Glossary PC Abbreviation for program counter CPU register of the M68HCO8 program counter The CPU register that holds the address of the next instruction or operand that the CPU will use RAM Random access memory Any RAM location can be read or written by the CPU The contents of a RAM memory location remain valid until the CPU writes a different value or until power is turned off registers Memory locations that are wired directly into the CPU logic instead of being part of the addressable memory map The CPU always has direct access to the information in these registers The CPU registers in the M68HCOS8 are A 8 bit accumulator X 8 bit index register CCR condition code register containing the H I N Z and C bits SP stack pointer and PC program counter Memory locations that hold status and control information for on chip peripherals are called I O and control registers reset Reset is used to force a computer system to a known starting point and to force on chip peripherals to known starting conditions S record A Motorola standard format used for object code files simulator A computer program that copies the behavior of a real MCU source code See source program SP Abbreviation for stack pointer CPU register in the M68HC08 MCU source program A text file contai
353. window INPUTA Set the simulated inputs to port A INPUTB Set the simulated inputs to port B INPUTC Set the simulated inputs to port C INPUTD Set the simulated inputs to port D INPUTE Set the simulated inputs to port E INPUTS Show the simulated input values to ports A and B INT IRQ View or assign the state value of the MCU IRQ pin LF Open a new or specified external file to receive log entries of commands and responses in the Status window identical to the LOGFILE command LISTOFF Turn off screen listing of stepping information LISTON Turn on screen listing of stepping information LOAD Load S19 object file and associated MAP file into the ICS08GPW LOADALL Execute both the LOAD and LOADMAP commands LOADDESK Load the desktop settings for window positions size and visibility LOADMAP Load a MAP file containing source level debug information into the ICS08GPW LOADV Execute the LOAD command then automatically execute the VERIFY command LOGFILE Open a new or specify an existing external file to receive log entries of commands and responses from the Status window identical to the LF command MACRO Execute a macro file containing debug command sequences MACROEND Close the macro file in which the debug command sequences are being saved MACROSTART Open a macro file and save all sub
354. with the R1 R2 voltage divider on the ICSO8GP20 board Check the ICSO8GP20 board s VSW_OUT and Vrgr power with the host connected First exit any ICSO8GPW software that may be running on the host PC Then disconnect power from the SPGMR Ensure that the ICSO8GP20 board is installed on the SPGMR and that it is configured for the factory default settings Ensure that there is an MCU in either XU1 or XU3 and that it is inserted correctly Connect the serial cable between the host PC and the SPGMR Apply power to the pod At this point the system power LED should be lit and the socket power LED should be off If the socket power LED is on there may be a problem with the host PC s serial port or the serial cable See step 5 for communications problems If the socket power LED is off start the ICSOSGPW simulator software as described in sections 3 and 4 of the quick start instructions while watching the socket power LED If the socket power LED does not light at all there may be a problem with the host PC communicating with the board Refer to step 5 If the socket power LED flickers a few times and then goes out the host PC is able to control the power to the ICSO8GP20 board but communications may still not be established with the MCU As the flickering of the socket power LED indicates the host PC is applying and removing power to the ICSO8GP20 board during this period Use an oscilloscope to view the voltages on J7 as the software tries
355. xcluding the type and record length Address 4 6 0r 8 2 3 or 4 byte address at which the data field is to be loaded into memory From 0 to n bytes of executable code memory loadable data or descriptive information For Code Data 0 2n compatibility with teletypewriter some programs may limit the number of bytes to as few as 28 56 printable characters in the S record Least significant byte of the one s complement of the sum of the values represented by the pairs of characters making up the record length address and the code data fields Checksum 2 A 4 S Record Types NOTE Eight types of S records have been defined to accommodate the several needs of the encoding transport and decoding functions The various Motorola upload download and other record transport control programs as well as cross assemblers linkers and other file creating or debugging programs utilize only those S records which serve the purpose of the program For specific information on which S records are supported by a particular program consult the user manual for the program The ICSOSGPW supports only the SO S1 and S9 record types All data before the S1 record is ignored Thereafter all records must be Sl type until the S9 record which terminates data transfer An S record format may contain the record types in Table A 3 Only one termination record is used for each block of S records Normally only one header record is
356. xisting contents R the default or to append the log entries A If this parameter is omitted a prompt window asks whether to overwrite the existing file or append information to the existing file While logging is in effect any line appended to the Status window is also written to the logfile Logging continues until another LOGFILE or LF command is entered without any parameter values This second command disables logging and closes the logfile Data can be captured by opening a logfile executing a command that dumps data to the Status window and then closing the logfile The command interpreter does not assume a filename extension Syntax LF filename lt R A gt Where filename The filename of the logfile or logging device to which the log is written Use with ICSO8GPW and ICDO8SW Examples gt LF TEST LOG R Start logging Overwrite file TEST LOG in the current directory with all lines that appear in the status window gt LF TEMP LOG A Start logging Append to file TEMP LOG in the current directory all lines that appear in the status window gt LOGF ILE If logging is enabled Disable logging and close the logfile M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 251 Debugging Command Set LISTOFF Turn Off Step Listing The LISTOFF command turns off the screen listing of the step by step information for stepping Register values and pro
357. xtension then save the current edited copy over the editing filename The default and recommended setting for this option is on giving the user the option to return or review the previous version of the file If this option is not selected the currently edited file will be saved but no backup will be made Word Wrap Wrap to Window Select this option to have the cursor wrap to the left when it reaches the far right side of the window This lets the user see all the text in the file without scrolling the line If this option is not selected text wraps only when the ENTER key is pressed Wrap to Column Select this option to wrap text to the left side when the cursor reaches a specified column This lets the user see all the text in the file without scrolling the line Set the column number at which text wrapping should occur in the edit box to the right of this option Word Wrap OFF Select this option to turn text wrapping off To view or edit text which does not fit horizontally in the window use the scroll controls In general this option should be on when writing or editing code Tab Settings Fixed Tabs Select this option to use spaces to emulate tabs Pressing the tab key inserts a number of spaces to bring the cursor to the position of the next tab stop Changing the tab size affects only future tab spacings Past tabs remain unchanged M68ICSO8GP In Circuit Simulator Rev 1 0 72 WinlDE User In
358. y file but with the S19 extension Appendix A S Record Information gives more information about the 19 file format Output Debug File Select this option to have the assembler produce a debug MAP file The debug MAP file contains symbol information as well as line number information for source level debugging from the program assembled The output debug file has the same name as the assembly file but with the MAP extension Output Listing File Select this option to have the assembler produce a listing file The listing file shows the source code as well as the object codes that were produced from the assembler Listing files are useful for debugging as they let the user see exactly where and how the code assembled The output listing file has the same name as the assembly file but with the L ST extension Listing Options These options specify how the assembler generates the listing file Show Cycles in Listing Select this option to include cycle information for each compiled instruction in the listing LST file View the cycle information to see how long each instruction takes to execute The cycle count appears to the right of the address enclosed in brackets Expand Includes in Listing Select this option to expand all include files into the current listing file This lets the user view all source files in a main listing file If this option is not checked only the SInclude statement fo
359. y indicates the role of the parameter value passed to the macro That value is substituted for the sequential indicator 1 The first time this macro is called the CASMO8W assembler changes the label loop on lines 3 and 4 to Loop 0001 If the calling line delay 100t invokes this macro the loop would occur 100 times The suffix t represents the decimal base M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA CASMO8W Assembler Interface 103 CASMO8W Assembler Interface The CASMOSW assembler ignores extra parameter values sent to a macro If the macro does not receive enough parameter values the assembler issues an error message Labels change automatically each time they are used Labels used within macros may not be longer than 10 characters because the assembler appends a 4 digit hexadecimal number to the label to ensure label uniqueness Although code may not jump into a macro it may jump out of a macro Macros cannot be forward referenced 5 8 Listing Directives Listing directives are source code keywords that control output to the LST listing file These directives pertain only to viewing the source code output the directives which may be interspersed anywhere in source code do not affect the actual code assembled Table 5 3 summarizes the listing directives Table 5 3 Listing Directives Directive Action EJECT OR PAGE Begins a new page Specifies a header on listing pages the head
360. yntax ACC lt n gt Where lt n gt The value to be loaded into the accumulator Use with ICSOSGPW and ICDOSSW Example A 10 Set the accumulator to 10 M68ICSO8GP In Circuit Simulator Rev 1 0 Operator s Manual MOTOROLA Debugging Command Set 197 Debugging Command Set ADCLR Clear A D Input Buffer The ADCLR command can be used to flush the input buffer for A D simulation This will reset the circular buffer and clear all values Notice that if the A D is using a value currently this command will not prevent the A D from using it See ADDI for accessing the input buffer of the A D interface If the ICSOS8 circuit board is connected A D inputs are received from the board so this command has no effect Syntax Al DCLR n Where n The value to be loaded into the accumulator Use with ICSOSGPW only Example Al Operator s Manual DCLR Clear the input buffer for A D simulation M68ICSO8GP In Circuit Simulator Rev 1 0 198 Debugging Command Set MOTOROLA Input Data to A D Converter Syntax Use with Example Debugging Command Set Command Descriptions ADDI The ADDI command allows the user to input data into the A D converter Ifa data parameter is given the value is placed into the next slot in the circular input buffer Otherwise if no parameter is given a window is displayed with the input buffer values Input values can be entered while the window is op

Download Pdf Manuals

image

Related Search

M68ICS08GP

Related Contents

SMC Networks SMC EZ Connect g SMCWUSB-G User's Manual  Advanced Bash-scripting Guide  miniVE - GE Healthcare Life Sciences  Huffy M881104 User's Manual  Barco MDNC-3121  Curtiss-Wright / VMETRO PBT-515 / PBTM  USER MANUAL S34 Pixi - HeartWay Medical Products Co., Ltd.  Pregão Eletrônico 38/2009 - Aquisição de Equipamentos  APC Vertical Cable Organizer AR7502  Connecting to the Internet  

Copyright © All rights reserved.
Failed to retrieve file