NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
ZGP323ICE02ZEMG ZGP323 UM019606-0408 III/500 II/233 RS-232 RS232 28-PDIP - Datasheet Archive
Z8 GPTM ZGP323 In-Circuit Emulator User Manual UM019606-0408 Copyright ©2008 by Zilog®, Inc. All rights reserved.
ZGP323ICE02ZEMG ZGP323ICE02ZEMG Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual UM019606-0408 UM019606-0408 Copyright ©2008 by Zilog®, Inc. All rights reserved. www.zilog.com Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual ii Revision History Each instance in the Revision History table reflects a change to this document from its previous revision. For more details, refer to the corresponding pages and appropriate links in the following table. Date Revision Level April 2008 06 February 2008 05 December 2007 04 September 2007 03 July 2007 02 Updated document with latest company address and implemented Zilog Style Guide. All November 2005 01 Original Issue All UM019606-0408 UM019606-0408 Page Number Description Replaced Figure 5 and 8 and 16 Figure 11. Updated Connecting ZGP323 ZGP323 5 and 34 ICE to the Target Pod and Z8 GP Package Support and Ordering Information. Updated System Requirements, 2, 23, 20, Debugger instructions, trace/ and 24. event procedure, and Figure 12 Updated System Requirements, 2, 20, and Figure 12, and Burn Code from 25 the Current Project. Revision History Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual iii Table of Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Kit Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Software Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Hardware Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Connecting Target Pod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Connecting ZGP323 ZGP323 ICE to the Target Pod . . . . . . . . . . . . . . . . 5 Connecting ZGP323 ZGP323 ICE to OTP Programming Module (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Connecting ZGP323 ZGP323 ICE to a PC . . . . . . . . . . . . . . . . . . . . . . . . 6 Ethernet Port Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 USB Port Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Sample Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Collecting a Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using an Event to Stop Execution . . . . . . . . . . . . . . . . . . . . . . Collecting Trace After an Event . . . . . . . . . . . . . . . . . . . . . . . . OTP Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Burn Code from the Current Project . . . . . . . . . . . . . . . . . . . . . Burn Code from an Existing Hex File . . . . . . . . . . . . . . . . . . . . LED Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . External Interface Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using J5 Pin 3, External Trigger Out . . . . . . . . . . . . . . . . . . . . Using J5 Pin 1, External Trigger In . . . . . . . . . . . . . . . . . . . . . . Z8 GP Package Support and Ordering Information . . . . . . . . . . . . 18 21 22 24 25 25 29 32 32 33 33 34 Appendix AZGP323 ZGP323 ICE Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Customer Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 UM019606-0408 UM019606-0408 Table of Contents Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 1 Introduction Zilog's Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator (ICE) provides Z8 GP chip family emulation with a Trace and Event system for program debugging using Zilog Developer Studio II (ZDS II) development tools. Once your code is complete, use the included OTP programming module to burn your design on to OTP devices. Kit Features The kit includes the following features: · · · · · · · · · · · UM019606-0408 UM019606-0408 Emulation and OTP Programming support for the Z8 GP Family Emulation Pod for 20- and 28- Pin PDIP Packages Z8 GP ZGP323 ZGP323 Evaluation Board Trace and Event System Ethernet and USB Interface Up to 8 MHz Clock Frequency 2.03.6 V VDD ZDS II Assembler and Full ANSI C Compiler Documentation Sample OTP Devices Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 2 System Requirements Table 1 lists the system requirements for running ZDS II. Table 1. ZDS II System Requirements Recommended Configuration Minimum Configuration PC running MS Windows XP Pro PC running MS Windows 98 SE/ Windows2000-SP4/Windows XP Pro Pentium III/500 III/500 MHz processor Pentium II/233 II/233 MHz processor 128 MB RAM 96 MB RAM 65 MB hard disk space 25 MB hard disk space (documentation not included) Super VGA video adapter Super VGA video adapter CD-ROM drive CD-ROM drive Ethernet port Ethernet or USB port USB high-speed or full-speed port One or more RS-232 RS-232 communications ports1 Internet browser (Internet Explorer or Netscape) Internet browser (Internet Explorer or Netscape) Note: 1 RS232 RS232 communication port is not necessary when using USB or default Ethernet IP Software Installation Follow the steps below to install ZDS II with ANSI C-Compiler: 1. DemoShield program available in the ZDS II installation CD launches automatically. Otherwise, go to the root of the CD-ROM and double-click the file launch.exe. UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 3 2. DemoShield provides several installation options to install ZDS II, select Install ZDS II. You can install other software and accompanying documentation later. 3. Follow the instructions on the screen to complete the installation. Hardware Installation The ZGP323 ZGP323 ICE features an Ethernet interface, a USB interface, and an RS-232 RS-232 serial port. Hardware installation consists of the following: · · · · Connecting Target Pod Connecting ZGP323 ZGP323 ICE to the Target Pod Connecting ZGP323 ZGP323 ICE to OTP Programming Module (Optional) Connecting ZGP323 ZGP323 ICE to a PC You have to reconfigure network settings on the PC or on the ZGP323 ZGP323 ICE before using the emulator. Connecting Target Pod Use an appropriate target pod and pin converter to connect the ZGP323 ZGP323 ICE to the target board. Figure 1 on page 4 illustrates the ZGP323 ZGP323 ICE top panel connectors and Figure 2 on page 4 illustrates the ZGP323 ZGP323 evaluation board included with the kit. The 20- and 28-PDIP 28-PDIP target pods plug into the associated PDIP sockets on the target board. For example, if your target board has a 20-SOIC 20-SOIC socket, mate the 20-PDIP 20-PDIP target Pod onto the 20-PDIP 20-PDIP to 20-SOIC 20-SOIC converter. Then install the target pod and converter assembly into the board's 20-SOIC 20-SOIC socket UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 4 P9 P17 OTP Programming Target Interface J5 J9 J4 J8 1 1 Out In Target Trigger J7 1 Int Target CLK Source GND D1 P10 P16 Target Interface Figure 1. ZGP323 ZGP323 ICE Top View 20-PDIP 20-PDIP Socket 28-PDIP 28-PDIP Socket Figure 2. ZGP323 ZGP323 Evaluation Board UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 5 Connecting ZGP323 ZGP323 ICE to the Target Pod After installing the appropriate target pod (and converter, if required) onto the target development board, connect the ZGP323 ZGP323 ICE to the target pod as follows: · For 40-PDIP 40-PDIP and 48-SSOP 48-SSOP target pods: Connect the 20-circuit cable from P9 on the emulator to P2 on the 40-PDIP 40-PDIP target pod. (The 20-circuit cable is included in the 40/48-pin accessory kit, ZLP323ICE01ZAC ZLP323ICE01ZAC, ordered separately). Note: ZLP323ICE01ZAC ZLP323ICE01ZAC has been replaced by an improved version, ZCRMZNICE02ZACG ZCRMZNICE02ZACG. Connect the 34-circuit cable from P10 on the emulator to P1 on the 40-PDIP 40-PDIP target pod. · For 20-PDIP 20-PDIP and 28-PDIP 28-PDIP target pods: Connect the 34-circuit cable from P10 on the emulator to P16 on the target pod. (Emulator connector P9 is not used). Connecting ZGP323 ZGP323 ICE to OTP Programming Module (Optional) After developing and debugging your software, follow the steps below to connect the ZGP323 ZGP323 ICE to the OTP programming module so that you can burn your code onto the OTP chip: 1. Connect the 40-circuit ribbon cable from the ZGP323 ZGP323 ICE OTP Programming connector to connector P1 on the OTP programming module. 2. The 40-PDIP 40-PDIP ZIF socket on the OTP programming module is designed to accept 40-PDIP 40-PDIP OTP chips. The OTP programming adapters supplied with the ZGP323 ZGP323 ICE allow you to adapt the ZIF UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 6 socket to accept 20/28-PDIP 20/28-PDIP chip packages.Other adapters are available separately, see Z8 GP Package Support and Ordering Information on page 34 for more information. After installing the OTP chip into the ZIF socket (or programming adapter), you can program the chip using the instructions provided in OTP Programming on page 25. Connecting ZGP323 ZGP323 ICE to a PC You can connect the ZGP323 ZGP323 ICE to a host PC using either an Ethernet or USB port. To connect the ZGP323 ZGP323 ICE to a host PC using Ethernet, see Ethernet Port Connection. To connect the ZGP323 ZGP323 ICE to a host PC using USB port, see USB Port Connection on page 15. Ethernet Port Connection Follow the steps below to connect the ZGP323 ZGP323 ICE to a host PC using Ethernet: 1. Connect a CAT-5 crossover cable from the PC to the Ethernet port on the ZGP323 ZGP323 ICE, see Figure 3. Note: You can connect the ICE to an Ethernet hub using a CAT-5 patch cable. 2. Connect the serial COM port on the PC to the SETUP serial port on the ZGP323 ZGP323 ICE using the DB9-to-DB9 serial cable, see Figure 5 on page 8. UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 7 CAT-5 Crossover Cable PC DB9-to-DB9 Cable ZGP323 ZGP323 ICE Figure 3. Connecting a PC to the ZGP323 ZGP323 ICE Figure 4. ZGP323 ZGP323 ICE Rear Panel Caution: Ensure the target board is not powered ON. 3. Connect a 5 V DC power supply to the ZGP323 ZGP323 ICE. The 3.3 V DC and 1.8 V DC power LEDs must illuminate, see Figure 5. Contact Zilog® support at www.zilog.com if there is any problem. UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 8 ICE Fail LED ICE Run LED Figure 5. ZGP323 ZGP323 ICE Front Panel Setting Up Ethernet Communications The default IP address and subnet mask of the ZGP323 ZGP323 ICE are 192.168.1.50 and 255.255.255.0, respectively. To enable communication between the PC running ZDS II and the ZGP323 ZGP323 ICE, you must either change the PC's Ethernet settings to match those of the ZGP323 ZGP323 ICE or vice versa. If using the PC in a stand-alone configuration, set the PC's IP address to 192.168.1.21 and its subnet mask to 255.255.255.0. For more details, see Changing the PC's Settings to Match the ZGP323 ZGP323 ICE. In a networked environment, set the ZGP323 ZGP323 ICE IP address and subnet mask to match the network setup. For more details, see Changing ZGP323 ZGP323 ICE Settings on page 13. UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 9 Changing the PC's Settings to Match the ZGP323 ZGP323 ICE Follow the steps below to change the PC's Ethernet settings: Note: The following instructions are for MS Windows XP. If your Windows OS is different, refer to your MS Windows OS online help for details. 1. Open the Windows Control Panel and double-click the Network Connections icon, see Figure 6 on page 9. Figure 6. Network Connections UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 10 2. In the panel labeled LAN or High-Speed Internet, double-click the Local Area Connection icon. The Local Area Connection Status window appears, see Figure 7. Figure 7. Local Area Connection Status Window UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 11 3. In the Local Area Connection Status window, click Properties button. The Local Area Connection Properties dialog box appears, see Figure 8. Figure 8. Local Area Connection Properties Dialog Box UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 12 4. Select Internet Protocol (TCP/IP) from the scroll down list, and click Properties button. The Internet Protocol (TCP/IP) Properties dialog box appears, see Figure 9. Figure 9. Internet Protocol Properties Dialog UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 13 5. Enter the IP address and subnet mask to match those shown in Figure 9 on page 12. Leave the remaining fields blank. In this example, an IP address of 192.168.1.21 and a subnet mask of 255.255.255.0 are being assigned to the PC. These values connect the PC to the same network as the ZGP323 ZGP323 ICE unit. 6. Click OK and restart the PC. Note: To execute a sample project, see Sample Project on page 18. Changing ZGP323 ZGP323 ICE Settings Follow the steps below to change the ZGP323 ZGP323 ICE Settings: 1. Connect the serial port of the PC to the ZGP323 ZGP323 ICE serial port using the DB9-to-DB9 serial cable. 2. Launch HyperTerminal on the PC by selecting Start > Programs > Accessories > Communications > HyperTerminal. The Connection Description dialog box appears. 3. Enter the name for a new connection in the Connection Description dialog box, and click OK to open the Connect To dialog box. 4. In the Connect To dialog, set the Connect Using drop-down menu to match the COM port to which the ZGP323 ZGP323 ICE is connected. Click OK. 5. A COM Properties dialog appears. Enter the following port settings and click OK. HyperTerminal should automatically attempt a connection. Otherwise, select Call > Connect. Bits per second 57600 Data bits 8 Parity None Stop bits 2 Flow control None UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 14 6. When the emulator is turned on or reset, a ZGP323 ZGP323 ICE console bootup message appears in the HyperTerminal. A typical boot-up message is shown below: ZiLOG Z8 LXM ICE Firmware Version 2.0, Build (Aug 22 2005 08:14:37) Copyright (C) 2005 ZiLOG, Inc. All Rights Reserved. Adding emac driver. Attempting to establish Ethernet connection. 10 Mbps Half-Duplex Link established IP Address: 10.1.7.95 IP Subnet: 10.1.0.0/255.255.0.0 IP Gateway: 10.1.1.254 Press 'Ctrl-Z' to enter configuration mode 7. Press Ctrl-z. The emulator command prompt appears: Z8 LXM ICE % Note: The emulator console prompt is not case-sensitive. Type help or ? at the emulator command prompt to see a list of available commands. For information on the description of the complete ZGP323 ZGP323 ICE commands, see Appendix AZGP323 ZGP323 ICE Commands on page 35. 8. When you have finished configuring the emulator, type exit to exit the command shell. 9. Press Alt+F4 to exit HyperTerminal. 10. Type reboot and press Return or cycle the power on the ZGP323 ZGP323 ICE for the new settings to take effect. 11. The hardware is now configured and ready for application development. Note: To execute a sample project, see Sample Project on page 18. UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 15 USB Port Connection To connect the ZGP323 ZGP323 ICE to your PC using a USB port, load the appropriate driver from the ZDS II installation directory or CD-ROM provided with your emulator. ZDS II software is available for download from www.zilog.com. The procedure of loading the appropriate driver, depends on your Windows OS version and is explained below: Windows XP Follow the steps below to connect the ZGP323 ZGP323 ICE to a host PC using USB Connection for Windows XP OS version: 1. Connect the ZGP323 ZGP323 ICE to the host PC using the supplied USB cable, see Figure 10 for ZGP323 ZGP323 ICE rear panel connection. Figure 10. ZGP323 ZGP323 ICE Rear Panel Caution: Ensure the target board is not powered ON. 2. Connect a 5 V DC power supply to the ZGP323 ZGP323 ICE. The 3.3 V DC and 1.8 V DC power LEDs should illuminate, see Figure 5 on page 8. Contact Zilog® support at www.zilog.com if there is any problem. In Windows, the Found New Hardware wizard should activate automatically. UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 16 ICE Fail LED ICE Run LED Figure 11. ZGP323 ZGP323 ICE Front Panel 3. In the wizard, select Install from a list or specific location (Advanced); click Next. Note: If the Windows Logo testing dialog appears, select Continue Anyway. 4. Select Search for the best driver in these locations and include those locations in the search. 5. Browse to one of the following driver directories: \device drivers\USB \Device Drivers\USB 6. Click Next. 7. Select the appropriate driver, and click Next. UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 17 8. Click Finish to complete the installation. Windows 2000/Windows 98SE Follow the steps below to connect the ZGP323 ZGP323 ICE to a host PC using USB Connection for Windows 2000/Windows 98SE OS version: 1. Connect the ZGP323 ZGP323 ICE to the host PC using the supplied USB cable, see Figure 10 on page 15 for ZGP323 ZGP323 ICE rear panel connection. Caution: Ensure the target board is not powered ON. 2. Connect a 5 V DC power supply to the ZGP323 ZGP323 ICE. The 3.3 V DC and 1.8 V DC power LEDs should illuminate, see Figure 5 on page 8. Contact Zilog® support at www.zilog.com if there is any problem. In Windows, the Found New Hardware wizard must activate automatically. 3. In the wizard, click Next. 4. Select Search for a suitable driver for my device (Recommended); click Next. 5. Select Specify a location, click Next. 6. Browse to one of the following driver directories: \device drivers\USB \Device Drivers\USB 7. Click Next. 8. Select the appropriate driver, and click Next. 9. Click Finish to complete the installation. UM019606-0408 UM019606-0408 Introduction Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 18 Sample Project After installing the ZDS II software and setting up the hardware, you are ready to execute the sample software project to verify proper emulator operation and to test with the Trace and Event system. This section describes how to run the emulator in the in-circuit mode. Notes: 1. If you run the emulator with a target attached, the emulator's voltage comparator is designed to serve as a target power sensor, and not as a precision voltage measurement device. If you set the Target VCC to match your target and the target's voltage drifts downward, the power sensor may no longer detect it. The emulator may therefore not connect to the target. In such cases, set the Target VCC voltage progressively lower until a proper connection is established. 2. If the ZGP323 ZGP323 evaluation board supplied with the kit is used, refer to Z8 GPTM ZGP323 ZGP323 Evaluation Board User Manual (UM0180 UM0180), for technical details and board jumper settings. The sample project ledblink_c.zdsproj is included in the ZDS II sample directory, located in: c:\Program Note: An assembler version of the sample program is located in the ledblink_asm\src subdirectory. Start ZDS II for the ZGP323 ZGP323 ICE Emulator by selecting Start >ZiLOG ZDS II -Crimzon+GP Emulator Kit and follow the instructions below to run ledblink_c.zdsproj, the sample project. 1. Ensure that ZGP323 ZGP323 ICE and the target board are powered ON. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 19 2. Use File > Open Project menu option to open the sample project file located at the following path: c:\Program Files\ZiLOG\ZDSII_CrimzonGP_Emulator_ \samples\ZGP323 ZGP323_ledBlink\ledblink_c\src 3. To open the source file, double-click on irmain.s file in the Project Files Window. 4. Select Project > Settings. 5. In the General tab, set the CPU Family field to ZGP323 ZGP323 and the CPU field type to ZGP323XXX2832 ZGP323XXX2832. 6. Follow either of the below options to connect the emmulator and the PC: · · UM019606-0408 UM019606-0408 If you are using Ethernet communications between the emulator and the PC: In the Debugger tab, see Figure 12 on page 20, select EthernetEmulator from the debug tool area and click Setup button. The Ethernet Configure Driver dialog box appears. The IP Address field displays a default IP address, 192.168.1.50. Enter the ZGP323 ZGP323 ICE IP address if it has been modified. Leave the Port setting at 4040. Click OK. If you are using USB communications between the emulator and the PC: In the Debugger tab, see Figure 12 on page 20, USBEmulator from the debug tool area and click Setup button. The USB Configure Driver dialog box appears. The Serial Number field displays a serial number for the USB interface. Click OK. Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 20 Figure 12. Project Settings, Debugger Tab 7. In the Debugger tab, click Setup button, Configure Target window appears. 8. Set the Voltage drop-down menu to Standalone if the emulator is not connected to a target. If the emulator is connected to a target, set the Voltage drop-down menu to the voltage appropriate for the connected target. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 21 9. In Clock Source section, select Internal radio button if the emulator is not connected to a target, and set the Clock Frequency to 7.5 MHz. If the emulator is connected to a target, select External radio button. 10. In the Programming Option Bits section, ensure that none of the options are selected. 11. Click OK. 12. Click OK in the Project Settings window and when prompted to rebuild the affected files, click Yes to rebuild the project. (You can also rebuild later by pressing F7.) 13. Click Go 14. Click Break sion. button to connect to the target and start debugging. button and Stop Debugging, to exit the debug ses- Note: The following steps describe two ways to use the Trace and Event system. For details on executing the Trace and Event system, refer to ZDS II online help and ZDS II-Z8 GPTM Family User Manual (UM0178 UM0178), located in the docs directory of the ZDS II CD-ROM. Collecting a Trace Follow the steps below to obtain a sample trace: 1. Collect a simple trace by starting the program, stopping it, and viewing the trace buffer. Click Go button in the toolbar, wait a moment, and then click Break button. The Trace buffer acts as a ring buffer that continuously fills and then overwrites itself until you stop execution. 2. Select the Trace window by selecting View > Debug Windows > Trace and click Get Frames to display the trace information. 3. To view the disassembled trace, click Options button in the Trace window and select Show Disassembled Trace. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 22 Using an Event to Stop Execution Events allow you to stop execution based on more complex conditions than a simple instruction address. The following events are available: · · · · · Program counter position, with mask Data on Port0 (state of its pins), with mask Data on Port2 (state of its pins), with mask Data on Port3 (state of its three input pins), with mask External Trigger In (0 or 1) The following steps setup and execute an event: 1. Select Tools > Trace and Event System. The Trace and Event System window appears, see Figure 13 on page 23. 2. Check Enable Event System check box and in the Then: section, check Break radio button. 3. In the When: section, check Program Counter check box and set Program Counter to 0044 and Mask to FFFF. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 23 Figure 13. Trace and Event System Window 4. Click OK. 5. Open the Trace window by selecting View > Debug Windows > Trace. 6. In the Trace window, click Clear Trace button. 7. To reset the Debugger click the Reset button in the toolbar, or select Debug > Reset. 8. Click the Go button or select Debug > Go to run the Debugger. When the program counter reaches 0044, execution stops on event match. 9. Click Get Frames to display the trace information. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 24 Collecting Trace After an Event The Trace and Event System is also used to capture trace data after an event. Set up the events as described in Using an Event to Stop Execution on page 22. In the Then: section, check Event Position in Buffer radio button instead of Break. Use the slider bar to select the number of cycles from the 64K buffer to be captured after the event. When the event is detected, the selected number of cycles after the event are collected. Execution stops after the cycles are collected. After the event, selected number of cycles are left in the trace buffer. Single-Stepping Through a Program ZDS II provides a simple mechanism for single-stepping through a program. Follow the steps below to single-step through a program: 1. Reset the program to main() by either clicking Reset icon or by selecting Debug > Reset. Set the Reset to main() option by selecting Tools > Options. In the Options window, select the Debugger tab and select the Reset to symbol `main' check box. 2. To step through the program one instruction at a time, use F11 or click Go button in the Debug toolbar or select Debug > Step Into. Peek/Poke Registers Follow the steps below to read the emulator register contents: 1. ZDS II makes it easy to set and read emulator register contents. With the ledblink_c.zdsproj project open and ZDS II connected to the emulator (target), select View > Debug Windows > Registers. 2. In the Registers window, double-click the value of any register and type in a new value. 3. Press Enter. The new value is displayed in red. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 25 For more information on setting and reading register values, refer to ZDS II User Manual (UM0164 UM0164) on the ZDS II CD-ROM and the ZDS II online help. Peek/Poke Memory Follow the steps below to set and read the peek/poke memory contents: 1. With the ledblink_c.zdsproj project open and ZDS II connected to the emulator (target), select View > Debug Windows > Memory. 2. In Memory window, double-click the value to be changed and type in a new value. (Values begin in the second column after the Address column.) 3. Press Enter. The new value is displayed in red. For more information on setting, filling, and reading memory, refer to ZDS II User Manual (UM0164 UM0164) on the ZDS II CD-ROM and the ZDS II online help. OTP Programming Use the ZGP323 ZGP323 ICE OTP Programming Module to burn your program onto a Z8 GP family chip. There are two ways to burn an OTP chip: 1. Burn Code from the Current Project 2. Burn Code from an Existing Hex File Note: Do not connect to the emulator when programming windowed CDIP parts, see Burn Code from an Existing Hex File on page 29 when CDIP programming windowed CDIP parts. Burn Code from the Current Project Note: If you are currently in debugging mode, click Debug > Stop Debugging or press Shift-F5 to stop debugging. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 26 Follow the steps below to burn code from the current project built in ZDS II (loaded in emulator RAM): 1. Connect the OTP programming module to the emulator as described in Connecting ZGP323 ZGP323 ICE to OTP Programming Module (Optional) on page 5. 2. Select the OTP chip to be burned and the appropriate package converter. 3. Install the package converter, if used, into the ZIF socket on the OTP programming module. 4. Install the OTP chip to be burned into the ZIF socket on the OTP programming adapter. Match pin 1 of the chip with pin 1 of the ZIF socket. 5. In ZDS II, open the project for the code to be burned onto the chip. In the Project>Settings >Debugger Page>Target>Setup · Choose the appropriate voltage level according to your device product specification from the voltage dropdown menu · Choose between external or internal clock source from the clock source · · Choose appropriate frequency level from the clock frequency Configure the programming option bits from Tools>OTP Programming 6. In ZDS II, click Connect to Target lator. button to connect to the emu- 7. Select Tools > OTP Programming to open the OTP window, see Figure 14. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 27 Figure 14. OTP Programming Window (ZDS II Current Project Example) 8. Click Ram Checksum button to calculate the checksum of the data in emulator RAM. Use this to compare with the OTP checksum after burning. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 28 9. Select the option bits to be programmed in the Programming Option Bits area. 10. Select None button in the Method panel of Device Serialization to leave the serial number blank. 11. To load a serial number: · Select Sequential or Pseudorandom button in the Method panel. This determines how the serial number is incremented on subsequent burns. · Select the size of the serial number (1, 2, 3, or 4 bytes) in the Serial Number Size area. · · Enter the starting serial number in the Serial Number field. In the Address field, enter the address of the serial number. 12. Click Blank Check to verify that the OTP chip is actually blank. 13. Click Burn to program the OTP chip with the contents of emulator RAM. The OTP chip content value is also verified. 14. When the burn is complete, click OTP Checksum to calculate the checksum of data on the OTP chip and compare it to the RAM checksum calculated earlier. 15. Click Close to close the OTP Programming window. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 29 Burn Code from an Existing Hex File Follow the steps below to load an existing hex file into emulator RAM and burn an OTP chip: 1. Connect the OTP programming module to the emulator as described in Connecting ZGP323 ZGP323 ICE to OTP Programming Module (Optional) on page 5. 2. Select the OTP chip to be burned and the appropriate package converter. 3. Install the package converter, if used, into the ZIF socket on the OTP programming module. 4. Install the OTP chip to be burned into the ZIF socket on the OTP programming adapter. Match pin 1 of the chip with pin 1 of the ZIF socket. Note: Stop any current debugging process by selecting Debug > Stop Debugging or press Shift-F5 to stop debugging. 5. In ZDS II, open the project for the code to be burned onto the chip. 6. Select Tools > OTP Programming to open the OTP window, see Figure 15 on page 30. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 30 . Figure 15. OTP Programming Window (Hex File Example) 7. Select the appropriate target device from the Device drop-down menu. 8. In the Hex File: section, click burned on to the OTP chip. button and select the hex file to be 9. If you do not want to pad the hex file, select the None button in the Pad File With panel. Otherwise, select FF, 00, or Other button. If UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 31 you select the Other button, type the hex value to pad the file with in the text field provided with Other. 10. Click Load File to load the hex file into emulator RAM. 11. Click Ram Checksum to calculate the checksum of the data in emulator RAM. Use this to compare with the OTP checksum after burning. 12. Select the option bits to program in the Programming Option Bits area. 13. Select None button in the Method panel of Device Serialization to leave the serial number blank. 14. To load a serial number: · Select Sequential or Pseudorandom button. This determines how the serial number is incremented on subsequent burns. · Select the size of the serial number (1, 2, 3, or 4 bytes) in the Serial Number Size area. · · Enter the starting serial number in the Serial Number field. In the Address field, enter the address of the serial number. 15. Click Blank Check to verify that the OTP chip is actually blank. 16. Click Burn to program the OTP chip with the contents of emulator RAM. The OTP chip contents is also verified. 17. When the burn is complete, click OTP Checksum to calculate the checksum of data on the OTP chip and compare it to the RAM checksum calculated earlier. 18. Click Close to close the OTP Programming window. UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 32 LED Indicators There are three sets of dual LED indicators on the ZGP323 ZGP323 ICE, as described below: 1. The dual ICE RUN LED on the front panel, see Figure 5 on page 8, indicates emulator status. If the top LED is ON, the emulator is executing your system code. When the top LED is off, emulation has stopped. If the bottom LED is ON, the emulator is not functioning properly, contact technical support for assistance. 2. The dual 3.3 V DC/1.8 V DC LED on the rear panel, see Figure 4 on page 7, indicates the status of internal voltages. Both LEDs are normally illuminated when power is connected. 3. The dual LAN/LINK LED on the rear panel, see Figure 4 on page 7, indicates Ethernet status. The LINK LED indicates that the Ethernet connection is live. The LAN LED indicates that data is being transferred across the connected network. External Interface Connectors There are five external interface connectors (P8, P9, P10, J4, and J5) on the ZGP323 ZGP323 ICE as explained below: · · The OTP Programming connector P8 is used to connect the emulator to the OTP programming module. · Connector J4 on the emulator front panel, see Figure 1 on page 4 and Figure 5 on page 8, provides a ground connection on all three pins. · UM019606-0408 UM019606-0408 Connectors P9 and P10 are used to connect the emulator to the target pod and adapter board assembly, see Figure 1 on page 4. Connector J5 on the emulator front panel, see Figure 1 on page 4, provides access to the following functions: Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 33 Pin 3 provides a HIGH external trigger out for use in triggering a device such as a logic analyzer or oscilloscope. Pin 3 is under software control, and can be activated through the ZDS II Trace and Event system. The trigger can be set to toggle or pulse. Pin 1 provides an input for an external HIGH or LOW trigger in, allowing use of an external trigger as an event for the ZDS II Trace and Event system. Using J5 Pin 3, External Trigger Out The ZGP323 ZGP323 ICE external trigger out feature is always enabled. Set the Trace and Event system parameters, before executing the code. When the set up event occurs, pin 3 of connector J5 goes HIGH and stays HIGH as long as the event is active. Longer the event window, longer the trigger out stays HIGH. Using J5 Pin 1, External Trigger In The ZGP323 ZGP323 ICE external trigger in feature can be enabled as follows: · · In the Trace and Event System window, select an Event entry. In the When section, check Trigger In checkbox. · Select either 0 or 1 to trigger on LOW or HIGH, respectively (edge-triggering not supported). · UM019606-0408 UM019606-0408 With the ledblink_c.zdsproj project open in ZDS II as described in Sample Project on page 18, select Tools > Trace and Event System. Click OK to set the Trace and Event System parameters. If you set trigger=1 in the Trace and Event System window, then a HIGH on pin 1 of connector J5 generates an event in the ZDS II Trace and Event System. If you set trigger=0, then a LOW on pin 1 of connector J5 generates an event. Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 34 Z8 GP Package Support and Ordering Information Table 2 lists the packages supported by ZGP323 ZGP323 ICE. Table 2. Z8 GP Package Support Chip Package For OTP Programming order: For In-Circuit Emulation, order: 20 SSOP ZGP32302010ZDH ZGP32302010ZDH 20-PDIP 20-PDIP to 20-SSOP 20-SSOP adapter from Ironwood, P/N: SOIC20-09 SOIC20-09 28 SSOP ZGP32302810ZDH ZGP32302810ZDH 28-PDIP 28-PDIP to 28-SSOP 28-SSOP adapter from Ironwood, P/N: SOIC28-08 SOIC28-08 48 SSOP ZLP323ICE01ZAC ZLP323ICE01ZAC* ZLP323ICE01ZAC ZLP323ICE01ZAC* 20 PDIP Included in ZGP323ICE02ZEM ZGP323ICE02ZEM kit Included in ZGP323ICE02ZEM ZGP323ICE02ZEM kit 28 PDIP Included in ZGP323ICE02ZEM ZGP323ICE02ZEM kit Included in ZGP323ICE02ZEM ZGP323ICE02ZEM kit 40 PDIP Included in ZGP323ICE02ZEM ZGP323ICE02ZEM kit ZLP323ICE01ZAC ZLP323ICE01ZAC* 20 SOIC ZGP32302010ZDS ZGP32302010ZDS 20-PDIP 20-PDIP to 20-SOIC 20-SOIC adapter from Ironwood, P/N: SOIC20-02 SOIC20-02 28 SOIC ZGP32302810ZDS ZGP32302810ZDS 28-PDIP 28-PDIP to 28-SOIC 28-SOIC adapter from Ironwood, P/N: SOIC28-02 SOIC28-02 Note: *ZLP323ICE01ZAC ZLP323ICE01ZAC has been replaced by an improved version, ZCRMZNICE02ZACG ZCRMZNICE02ZACG. Note: For information on Ironwood adapters, visit http://www.ironwoodelectronics.com/ UM019606-0408 UM019606-0408 Sample Project Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 35 Appendix AZGP323 ZGP323 ICE Commands Table 3 lists the ZGP323 ZGP323 ICE Commands. Table 3. ZGP323 ZGP323 ICE Commands Command Description and Options ? Displays available emulator command shell options bpool Displays buffer pool date Displays current date debugport Configures the TCP port usage: debugportdisplays current settings debugport tcp_portsets debugport to specified TCP port Example: debugport 4040 sets debugport to TCP port 4040 devs Not used echo Echoes arguments typed into the command line exit Exits the command shell hang Not used help Displays available emulator commands UM019606-0408 UM019606-0408 Appendix AZGP323 ZGP323 ICE Commands Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 36 Table 3. ZGP323 ZGP323 ICE Commands (Continued) Command Description and Options ifconfig Configures the emulator network interface. Entering ifconfig with no options lists current configuration. The following command options are available: · · · · ispecifies IP address sspecifies subnet mask gspecifies a network gateway address dhcpconfigures the emulator network interface to look for a dhcp host to obtain network settings Example: ifconfig i 192.168.1.1 s 255.255.255.0 g 192.165.1.254 configures the emulator to use IP address 192.168.1.1 on subnet 255.255.255.0 with gateway address 192.168.1.254 ifconfig dhcp on configures the emulator to use DHCP kill Not used mem displays memory usage information password Not used port Displays port information ps Displays a list of processes running on the ICE by process id number reboot Reboots the emulator restore Restores factory default network interface settings sem Displays semaphore information sleep Not used time Displays current time and date UM019606-0408 UM019606-0408 Appendix AZGP323 ZGP323 ICE Commands Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual 37 Customer Support For answers to technical questions about the product, documentation, or any other issues with Zilog's offerings, please visit Zilog's Knowledge Base at http://www.zilog.com/kb. For any comments, detail technical questions, or reporting problems, please visit Zilog's Technical Support at http://support.zilog.com. UM019606-0408 UM019606-0408 Customer Support Z8 GPTM ZGP323 ZGP323 In-Circuit Emulator User Manual Warning: DO NOT USE IN LIFE SUPPORT LIFE SUPPORT POLICY ZILOG'S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION. As used herein Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user. A critical component is any component in a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness. Document Disclaimer ©2008 by Zilog, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZILOG ALSO D O E S N O T A S S U M E L I A B I L I T Y F O R I N T E L L E C T U A L P R O P E RT Y INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE.The information contained within this document has been verified according to the general principles of electrical and mechanical engineering. Crimzon and Z8 GP are the trademarks or registered trademarks of Zilog, Inc. All other product or service names are the property of their respective owners. UM019606-0408 UM019606-0408