User's Manual QB-78K0SKX1MINI In-Circuit Emulator Target Devices 78K0S/KU1+ 78K0S/KY1+ 78K0S/KA1+ 78K0S/KB1+ Document No. U17272EJ1V0UM00 (1st edition) Date Published September 2004 N CP(K) (c) Printed in Japan [MEMO] 2 User's Manual U17272EJ1V0UM Windows is either a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries. PC/AT is a trademark of International Business Machines Corporation. * The information in this document is current as of September, 2004. The information is subject to change without notice. For actual design-in, refer to the latest publications of NEC Electronics data sheets or data books, etc., for the most up-to-date specifications of NEC Electronics products. Not all products and/or types are available in every country. Please check with an NEC Electronics sales representative for availability and additional information. * No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Electronics. NEC Electronics assumes no responsibility for any errors that may appear in this document. * NEC Electronics does not assume any liability for infringement of patents, copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this document or any other liability arising from the use of such products. No license, express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of NEC Electronics or others. * Descriptions of circuits, software and other related information in this document are provided for illustrative purposes in semiconductor product operation and application examples. The incorporation of these circuits, software and information in the design of a customer's equipment shall be done under the full responsibility of the customer. NEC Electronics assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits, software and information. * While NEC Electronics endeavors to enhance the quality, reliability and safety of NEC Electronics products, customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely. To minimize risks of damage to property or injury (including death) to persons arising from defects in NEC Electronics products, customers must incorporate sufficient safety measures in their design, such as redundancy, fire-containment and anti-failure features. * NEC Electronics products are classified into the following three quality grades: "Standard", "Special" and "Specific". The "Specific" quality grade applies only to NEC Electronics products developed based on a customerdesignated "quality assurance program" for a specific application. The recommended applications of an NEC Electronics product depend on its quality grade, as indicated below. Customers must check the quality grade of each NEC Electronics product before using it in a particular application. "Standard": Computers, office equipment, communications equipment, test and measurement equipment, audio and visual equipment, home electronic appliances, machine tools, personal electronic equipment and industrial robots. "Special": Transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster systems, anti-crime systems, safety equipment and medical equipment (not specifically designed for life support). "Specific": Aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems, life support systems and medical equipment for life support, etc. The quality grade of NEC Electronics products is "Standard" unless otherwise expressly specified in NEC Electronics data sheets or data books, etc. If customers wish to use NEC Electronics products in applications not intended by NEC Electronics, they must contact an NEC Electronics sales representative in advance to determine NEC Electronics' willingness to support a given application. (Note) (1) "NEC Electronics" as used in this statement means NEC Electronics Corporation and also includes its majority-owned subsidiaries. (2) "NEC Electronics products" means any product developed or manufactured by or for NEC Electronics (as defined above). M8E 02. 11-1 User's Manual U17272EJ1V0UM 3 GENERAL PRECAUTIONS FOR HANDLING THIS PRODUCT 1. Circumstances not covered by product guarantee * If the product was disassembled, altered, or repaired by the customer * If it was dropped, broken, or given another strong shock * Use at overvoltage, use outside guaranteed temperature range, storing outside guaranteed temperature range * If power was turned on while the AC adapter, USB interface cable, or target system connection was in an unsatisfactory state * If the AC adapter cable, USB interface cable, target cable, or the like was bent or pulled excessively * If an AC adapter other than the supplied product was used * If the product got wet * If the product and target system were connected while a potential difference existed between the GND of the product and the GND of the target system * If a connector or cable was removed while the power was being supplied to the product * If an excessive load was placed on a connector or socket 2. Safety precautions * If used for a long time, the product may become hot (50C to 60C). Be careful of low temperature burns and other dangers due to the product becoming hot. * Be careful of electrical shock. There is a danger of electrical shock if the product is used as described above in 1 Circumstances not covered by product guarantee. 4 User's Manual U17272EJ1V0UM Regional Information Some information contained in this document may vary from country to country. Before using any NEC Electronics product in your application, pIease contact the NEC Electronics office in your country to obtain a list of authorized representatives and distributors. They will verify: * Device availability * Ordering information * Product release schedule * Availability of related technical literature * Development environment specifications (for example, specifications for third-party tools and components, host computers, power plugs, AC supply voltages, and so forth) * Network requirements In addition, trademarks, registered trademarks, export restrictions, and other legal issues may also vary from country to country. [GLOBAL SUPPORT] http://www.necel.com/en/support/support.html NEC Electronics America, Inc. (U.S.) NEC Electronics (Europe) GmbH NEC Electronics Hong Kong Ltd. Santa Clara, California Tel: 408-588-6000 800-366-9782 Duesseldorf, Germany Tel: 0211-65030 Hong Kong Tel: 2886-9318 * Sucursal en Espana Madrid, Spain Tel: 091-504 27 87 * Succursale Francaise Velizy-Villacoublay, France Tel: 01-30-67 58 00 * Filiale Italiana Milano, Italy Tel: 02-66 75 41 * Branch The Netherlands Eindhoven, The Netherlands Tel: 040-244 58 45 * Tyskland Filial NEC Electronics Hong Kong Ltd. Seoul Branch Seoul, Korea Tel: 02-558-3737 NEC Electronics Shanghai Ltd. Shanghai, P.R. China Tel: 021-5888-5400 NEC Electronics Taiwan Ltd. Taipei, Taiwan Tel: 02-2719-2377 NEC Electronics Singapore Pte. Ltd. Novena Square, Singapore Tel: 6253-8311 Taeby, Sweden Tel: 08-63 80 820 * United Kingdom Branch Milton Keynes, UK Tel: 01908-691-133 J04.1 User's Manual U17272EJ1V0UM 5 INTRODUCTION Readers This manual is intended for users who wish to perform debugging using the QB78K0SKX1MINI. The readers of this manual are assumed to be familiar with the device functions and usage, and to have knowledge of debuggers. Purpose This manual is intended to give users an understanding of the basic specifications and correct usage of the QB-78K0SKX1MINI. Organization This manual is divided into following parts. * General * Setup procedure * Settings at product shipment * Restrictions How to Read This Manual It is assumed that the readers of this manual have general knowledge in the fields of electrical engineering, logic circuits, and microcontrollers. This manual describes the basic setup procedures and how to set switches. To understand the overall functions and usages of the QB-78K0SKX1MINI Read this manual according to the CONTENTS. To know the manipulations, command functions, and other software-related settings of the QB-78K0SKX1MINI See the user's manual of the debugger (supplied with the QB-78K0SKX1MINI) to be used. Conventions Note: Footnote for item marked with Note in the text Caution: Information requiring particular attention Remark: Supplementary information Numeric representation: Binary ... xxxx or xxxxB Decimal ... xxxx Hexadecimal ... xxxxH Prefix indicating power of 2 (address space, memory capacity): K (kilo): 210 = 1,024 M (mega): 220 = 1,0242 6 User's Manual U17272EJ1V0UM Terminology The following terms are used in this manual. Target device This is the device to be emulated. Target system This is the system to be debugged (user-specified system). It includes the target program and the user-specified hardware. Emulation CPU This is the CPU that executes the user program in the emulator. On-chip debugging On-chip debugging is a method by which a microcontroller is debugged while it is mounted in the target system so as to realize a debugging environment that is the same as the actual environment. Related Documents When using this manual, also refer to the following manuals. The related documents indicated in this publication may include preliminary versions. However, preliminary versions are not marked as such. Documents related to development tools (user's manuals) Document Name Document No. QB-78K0SKX1MINI In-Circuit Emulator RA78K0S Assembler Package Ver. 1.40 or Later CC78K0S C Compiler Ver. 1.50 or Later ID78K0S-QB Ver. 2.81 Integrated Debugger This manual Operation U16656E Language U14877E Structured Assembly U11623E Operation U16654E Language U14872E Operation U17287E PM plus Ver. 5.10 U16569E PG-FPL2 U17307E Caution The related documents listed above are subject to change without notice. Be sure to use the latest version of each document for designing. User's Manual U17272EJ1V0UM 7 CONTENTS CHAPTER 1 GENERAL............................................................................................................................. 9 1.1 Features............................................................................................................................................................ 9 1.2 Functional Specifications ..............................................................................................................................11 1.3 System Configuration ....................................................................................................................................12 1.3.1 AC adapter ............................................................................................................................................13 1.4 Package Contents ..........................................................................................................................................14 CHAPTER 2 SETUP PROCEDURE ....................................................................................................... 15 2.1 Names and Functions of Hardware...............................................................................................................16 2.1.1 Names of parts in QB-78K0SMINI.........................................................................................................16 2.1.2 Names of parts in QB-78K0SKX1-DA ...................................................................................................18 2.2 Clock Settings.................................................................................................................................................19 2.2.1 Clock settings on QB-78K0SMINI side ..................................................................................................20 2.2.2 Mounting a clock ...................................................................................................................................21 2.2.3 Clock settings on QB-78K0SKX1-DA side.............................................................................................23 2.3 Target Device Selection .................................................................................................................................23 2.4 Software Settings ...........................................................................................................................................23 2.5 Connecting QB-78K0SKX1-DA to Target System ........................................................................................23 2.6 Connection and Startup Procedures ............................................................................................................26 2.6.1 Connecting QB-78K0SMINI to related devices......................................................................................26 2.6.2 Disconnecting QB-78K0SMINI from related devices .............................................................................31 CHAPTER 3 SETTINGS AT PRODUCT SHIPMENT........................................................................... 32 CHAPTER 4 RESTRICTIONS ................................................................................................................. 33 APPENDIX A TARGET INTERFACE EQUIVALENT CIRCUIT ........................................................... 34 8 User's Manual U17272EJ1V0UM CHAPTER 1 GENERAL The QB-78K0SKX1MINI is an in-circuit emulator that incorporates the QB-78K0SMINI and QB-78K0SKX1-DA and is used to efficiently debug the hardware and software of the target device (78K0S/KU1+, 78K0S/KY1+, 78K0S/KA1+, or 78K0S/KB1+). 1.1 Features { Emulation using background monitoring method * No user resources are used { Debug functions equivalent to on-chip debug emulator * Access break function: Provided * RRM (real-time RAM monitor) function: Provided { Host interface is USB 2.0 compliant { USB power supply is used for QB-78K0SMINI { Power supply for QB-78K0SKX1-DA (AC adapter) supplied * ACIN: 100 to 240 V supported { Target cable supplied * Single-wire cables: Target interface of up to 30 pins supported { Includes integrated debugger (ID78K0S-QB) { Includes flash memory programmer (PG-FPL2) { Compact and lightweight * The dimensions of the QB-78K0SMINI and the QB-78K0SKX1-DA are shown below. Table 1-1. Dimensions of QB-78K0SKX1MINI Item External dimensions Weight QB-78K0SMINI QB-78K0SKX1-DA Height 26.1 mm 36.6 mm (spacer height: 25 mm) Width 56.5 mm 120 mm Depth 84.5 mm (88.5 mm including screws) 120 mm Approximately 60 g Approximately 100 g { Can operate as an on-chip debug emulator just by using QB-78K0SMINI (under study) { Commercial IDE cable can be used as target interface cable User's Manual U17272EJ1V0UM 9 CHAPTER 1 GENERAL Figure 1-1. External Dimensions of QB-78K0SKX1MINI 26.1 mm 84.5 mm (including screws: 88.5 mm) 56.5 mm Figure 1-2. External Dimensions of QB-78K0SKX1-DA 36.6 mm (spacer height: 25 mm) 120 mm 120 mm 10 User's Manual U17272EJ1V0UM CHAPTER 1 GENERAL 1.2 Functional Specifications Table 1-2. Product Specifications Item Specification 78K0S/KU1+: PD78F9200GR, PD78F9201GR, PD78F9202GR Target device 78K0S/KY1+: PD78F9210GR, PD78F9211GR, PD78F9212GR 78K0S/KA1+: PD78F9221MC, PD78F9222MC 78K0S/KB1+: PD78F9232MC, PD78F9234MC Operating power supply QB-78K0SMINI: 5 V power supply via USB cable Maximum current consumption: 500 mA Since the maximum current consumption is 500 mA, be sure to use a self-powered hub when using a USB hub. QB-78K0SKX1-DA: 15 V power supply via AC adapter (supplied; supports 100 to 240 V) Internal voltage: 1.8 to 5.5 V Current consumption: 150 mA Target interface power supply voltage (EVDD) Power is supplied from target device 2.0 to 5.5 V (same level as target device) System clock Main clock 5 MHz is supplied internally. Oscillator or oscillator circuit can be mounted in QB-78K0SMINI Ring-OSC High-speed Ring-OSC: 8 MHz is supplied from oscillator circuit on QB-78K0SKX1-DA Low-speed Ring-OSC: 250 kHz is supplied from oscillator circuit on QB-78K0SKX1-DA System clock operating range Same level as target device Target host machine PC-98NX Series, IBM PC/AT Host interface Mini B connector for USB 2.0 (USB 1.1 compatible) Supervisor V850ES/KG1+, 20 MHz operation Temperature characteristics 0 to 40C Storage temperature -15 to 60C (no condensation) TM compatible Table 1-3. List of Debug Functions Item Specification Event-triggered break functions No breaks before execution (if using software breaks) One access break Software break functions 2000 points Forced break functions Included Peripheral break functions Included Execution functions Step execution, execution from cursor position, etc. Slow motion Included RRM function Enabled (16 bytes/implemented as instantaneous break.) Register manipulation functions Included Forced reset functions Included Mask functions Reset SP setting overlook protection function Included Execution time measurement Not included Trace functions Not included User's Manual U17272EJ1V0UM 11 CHAPTER 1 GENERAL Table 1-4. List of Peripheral Break Functions Target Macro Name Peripheral macro whose peripheral emulation functions stop when a break occurs (Peripheral Break: When Break is set) Remark 16-bit timer/event counter 00 8-bit timer 80 8-bit timer H1 The watchdog timer stops operating during a break regardless of the Peripheral Break setting. Peripheral macros other than those described above continue operating during a break. See the ID78K0S-QB Ver. 2.81 Integrated Debugger User's Manual (U17287E) for Peripheral Break setting details. 1.3 System Configuration The system configuration when using the QB-78K0SKX1MINI is shown below. When executing debugging by connecting the QB-78K0SMINI and QB-78K0SKX1-DA, do not connect the device to the target system. However, be sure to connect the device when writing to the flash memory using the PG-FPL2. See the PG-FPL2 User's Manual (U17307E) to confirm the system configuration when writing to the flash memory. Figure 1-3. System Configuration (For Emulation) <2> CD-ROM <10> Device file <6> QB-78K0SKX1-DA <10> Target system <5> OCD I/F cable or OCD I/F board <9> Target cables (Single-wire cables x 30) correspond to pins 8, 16, 20 and 30 or <1> Host machine <3> USB interface cable <7> Spacer <8> AC adapter <4> QB-78K0SMINI <1> Host machine (sold separately): Includes USB port. PC-98NX series, PC/AT compatible can be used <2> CD-ROM (supplied): Integrated debugger ID-78K0S-QB, USB drivers, and user's manual <3> USB interface cable (supplied): Cable connecting QB-78K0SKX1MINI to host machine <4> QB-78K0SMINI: This product <5> OCD I/F cable, OCD I/F board (supplied): I/F cable, I/F board connecting QB-78K0SMINI and QB-78K0SKX1-DA 12 <6> QB-78K0SKX1-DA: This product <7> Spacer (supplied): 25 mm in height User's Manual U17272EJ1V0UM CHAPTER 1 GENERAL <8> AC adapter (supplied): Can support 100 to 240 V by replacing AC plug <9> Target cable (supplied): I/F cable connecting QB-78K0SKX1-DA and target system. <10> Device file: Download from the NEC Electronics Website. (URL: http://www.necel.com/micro/index_e.html) <11> Target system (sold separately): Target board based on user's specifications. When using the QB-78K0SKX1MINI connected to the target system, do not connect the device. 1.3.1 AC adapter By replacing the AC plug, this product can support 100 to 240 V. The following three types are included. User's Manual U17272EJ1V0UM 13 CHAPTER 1 GENERAL 1.4 Package Contents The following packaging is used with the QB-78K0SKX1MINI. Make sure all of these items are included. If any items are missing or damaged, please contact an NEC Electronics sales representative or distributor. Also, be sure to fill out and return the enclosed user registration form. Figure 1-4. Package Contents <1> QB-78K0SMINI <4> AC adapter <3> Spacer <2> QB-78K0SKX1-DA <5> USB interface cable (MINI B A) <7> OCD I/F board <6> OCD I/F cable <11> Pin header (CN1) cover for QB-78K0SKX1-DA <8> Target cable (single-wire cables: 30) <12> Setup manual <10> CD-ROM <14> Packing list <13> PG-FPL2 <1> QB-78K0SMINI: 1 <2> QB-78K0SKX1-DA: 1 <3> Spacer for QB-78K0SKX1-DA: 4 <4> AC adapter: 1 <5> USB interface cable (MINI B A) (length: 2m): 1 <6> OCD I/F cable (length:20 cm): 1 <7> OCD I/F board: 1 <8> Target cable: 1 set (single-wire cables: 30) <9> User registration form: <10> CD-ROM: 14 <9> User registration form 1 1 <11> Pin header (CN1) cover for QB-78K0SKX1-DA: 1 <12> Setup manual: 1 <13> PG-FPL2: 1 <14> Packing list: 1 User's Manual U17272EJ1V0UM CHAPTER 2 SETUP PROCEDURE This chapter explains the QB-78K0SKX1MINI hardware setting and function setup procedure. Setup can be completed by performing installation and setup in the order in which it appears in this chapter. Perform setup according to the following procedure. See 2.1 Names and Functions of Hardware for clock and jumper positions. See 2.5 Connecting QB-78K0SKX1-DA to Target System for how to connect the QB-78K0SKX1-DA to the target system. Clock settings The QB-78K0KX1MINI operates on the QB-78K0SMINI internal clock of 5 MHz. If modification of the frequency is necessary, see 2.2 Clock Settings. High-speed Ring-OSC: 8 MHz (fixed) Low-speed Ring-OSC: 250 kHz (fixed) Target device selection The target device is set as the 78K0S/KA1+ or 78K0S/KB1+ at shipment. To emulate the 78K0S/KU1+ or 78K0S/KY1+, see 2.3 Target Device Selection. Software settings See 2.4 Software Settings. Connection and Startup Procedures See 2.6 Connection and Startup Procedure. User's Manual U17272EJ1V0UM 15 CHAPTER 2 SETUP PROCEDURE 2.1 Names and Functions of Hardware 2.1.1 Names of parts in QB-78K0SMINI Figure 2-1. Main Unit (Top View) S U AT ST ET G R TA ER W PO Screw LED Figure 2-2. Main Unit (Side Views) (a) Left side USB1 (USB connector) 16 (b) Right side Screw User's Manual U17272EJ1V0UM CN1 (10-pin connector) CHAPTER 2 SETUP PROCEDURE Figure 2-3. External View of Board CLK1 USB1 CN1 LED1 LED2 LED3 (1) USB1 This is a MINI B-compatible connector supporting USB 2.0. This connector is used to connect the QB78K0SMINI to the host machine via a USB cable. (2) CN1 This is a double-row 2.54 pitch type 10-pin connector with a groove for preventing reverse insertion. This connector is used to connect the QB-78K0SKX1-DA via an OCD I/F cable or using an OCD I/F board. (3) LEDs Three LEDs are included as status display devices. Name LED1 Display Function Remark STATUS RUN: Blinking (slow) (RUN, BREAK, DOWNLOAD) After break or debugger start: ON DOWNLOAD: Blinking (fast) Before starting debugger: OFF LED2 LED3 TARGET POWER Before starting When target voltage is 1.8 V or higher: ON debugger When target voltage is lower than 1.8 V: OFF After starting When target voltage = POC voltage or higher: ON debugger When target voltage is lower than POC voltage: OFF With power supplied from host machine: ON Without power supplied from host machine: OFF (4) CLK1 A 14-pin DIP socket is mounted here. This socket can be used for a 14-pin type oscillator (5 V) or to configure an oscillator circuit. User's Manual U17272EJ1V0UM 17 CHAPTER 2 SETUP PROCEDURE 2.1.2 Names of parts in QB-78K0SKX1-DA Figure 2-4. Diagram of QB-78K0SKX1-DA Main Unit SW1 VDD1 JK1 CN1 OCD1 HALT STOP POC RMCE POWER SW2 FPGA (1) OCD1 This is a double-row 2.54 pitch type 10-pin connector with a groove for preventing reverse insertion. This connector is used to connect the QB-78K0SKX1-DA to the QB-78K0SMINI via an OCD I/F cable or OCD I/F board. (2) LEDs These LEDs indicate the status of the QB-78K0SKX1-DA. Name Function When ON Function When OFF POWER Power supply of QB-78K0SKX1-DA is ON Power supply of QB-78K0SKX1-DA is OFF FPGA Configuration of FPGA for emulation is complete Configuration of FPGA for emulation is not complete HALT Normal operation STOP System is in STOP mode Normal operation POC When the target system is connected: Internal When the target system is connected: Normal reset due to POC has occurred operation When the target system is not connected: VDD = 0 When the target system is not connected: Does V is detected not turn off During the RMCE bit is being used as P34 pin, RMCE bit of option byte is being used as RESET reset is masked pin RMCE 18 System is in HALT mode User's Manual U17272EJ1V0UM CHAPTER 2 SETUP PROCEDURE (3) Switch settings SW1: Power supply switch. Set to OFF at shipment. SW2: Target device selection switch. Set to 78K0S/KA1+, 78K0S/KB1+ at shipment. (4) VDD1 VDD1 is a service pin. It outputs 3.3 V. (5) CN1 This is a male 40-pin pin header. * Pin header specifications: 0.64 mm x 0.64 mm (height: 5.84 mm) This header supports an IDE connector and is used to connect the QB-78K0SKX1-DA to the target system via the target cable. 2.2 Clock Settings The setting of the clock to be used differs depending on whether an oscillator or oscillator circuit (clock) is mounted in CLK1 of the QB-78K0SMINI. Clock Setting QB-78K0SKX1MINI Clock Is Not Mounted in CLK1 of QB-78K0SMINI Clock Is Mounted in CLK1 of QB-78K0SMINI (Setting at Shipment) Selection of system "System" is automatically selected as Main Clock "Clock Board" is automatically selected as Main clock source in the Configuration dialog box of the debugger Clock in the Configuration dialog box of the Crystal/ceramic Internal clock of QB-78K0SMINI (5 MHz) Clock on CLK1 (500 kHz to 10 MHz) debugger oscillation clock External clock input High-speed Ring- High-speed Ring-OSC clock (8 MHz) OSC clock Low-speed Ring- Low-speed Ring-OSC clock (250 kHz) OSC clock User's Manual U17272EJ1V0UM 19 CHAPTER 2 SETUP PROCEDURE 2.2.1 Clock settings on QB-78K0SMINI side The clock socket (CLK1) of the QB-78K0SMINI does not mount an oscillator or an oscillator circuit at shipment. The socket specifications are shown in (a) to (d) below. Note that an oscillator circuit can also be configured by mounting a parts board such as the 160-90-314 (product of PRECI-DIP) in the socket. The capacitors and resistors mounted on the parts board should be used at the constants recommended by the resonator manufacturer. A diagram of the parts board mounted in CLK1 is shown in (e). Caution Be sure to mount the clock in and remove it from the socket with the power supply to the emulator switched off. (a) Equivalent circuit (b) Mounted parts 1 M HCU04 5 Rx 10 4 3 CA 12 Pin Number HCU04 98 CLOCK OUT 11 13 CB 2 (c) Example of mounting parts board (oscillator Connected Part 2-13 Capacitor CB 3-12 Capacitor CA 4-11 Ceramic resonator/crystal resonator 5-10 Resistor RX 8-9 Shorted (d) Supported clock module pin assignment circuit parts) 1 14 2 13 3 12 4 11 5 10 6 9 7 8 8 CLOCK OUT GND 7 Top view Top view (e) Parts board mounted in CLK1 20 14 VCC NC 1 User's Manual U17272EJ1V0UM CHAPTER 2 SETUP PROCEDURE 2.2.2 Mounting a clock Mount an oscillator or oscillator circuit in the clock socket of the QB-78K0SMINI according to the procedure shown below. Caution Be sure to mount the clock in and remove it from the socket with the power supply to the emulator switched off. (1) Loosen the QB-78K0SMINI's screw. (2) Remove the cover. Use the interface connector side as a reference point when lifting the USB connector side. The product appears as shown below when the cover has been removed. Clock socket User's Manual U17272EJ1V0UM 21 CHAPTER 2 SETUP PROCEDURE (3) Insert an oscillator or oscillator circuit. Insert the oscillator or oscillator circuit to be used into the clock socket (the figure shows an oscillator). (4) Replace the cover. Make sure that the cover is aligned with the two tabs on the interface connector side. Tabs (5) Close the cover and tighten the screw. This completes the clock mounting procedure. 22 User's Manual U17272EJ1V0UM CHAPTER 2 SETUP PROCEDURE 2.2.3 Clock settings on QB-78K0SKX1-DA side (1) High-speed Ring-OSC operation An 8 MHz clock supplied from the oscillator circuit on the QB-78K0SKX1-DA is used for high-speed Ring-OSC emulation. (2) Low-speed Ring-OSC operation A 250 kHz clock supplied from the oscillator circuit on the QB-78K0SKX1-DA is used for low-speed Ring-OSC emulation. 2.3 Target Device Selection The target device is set by using SW2 on the QB-78K0SKX1-DA. When emulating the 78K0S/KA1+ or 78K0S/KB1+: Set to KA1+/KB1+ side (3-6 pin side) When emulating the 78K0S/KU1+ or 78K0S/KY1+: Set to KU1+/KY1+ side (1-4 pin side) Figure 2-5. SW2 Setting Caution When using the 78K0S/KA1+ When using the 78K0S/KU1+ or 78K0S/KB1+ or 78K0S/KY1+ KU1+/KY1+ KU1+/KY1+ KA1+/KB1+ KA1+/KB1+ Be sure to switch the power supply of the QB-78K0SKX1-DA off before changing the setting. 2.4 Software Settings See the document ID78K0S-QB Operating Precautions supplied with the debugger (ID78K0S-QB) for details. 2.5 Connecting QB-78K0SKX1-DA to Target System Connect the QB-78K0SKX1-DA to the target system using the target cable (supplied), etc. CN1 of the QB-78K0SKX1-DA incorporates a male pin header, so be sure to mount a male pin header on the target system connector. Connect corresponding pins to each other using a target cable with female connectors on each end. * Specifications of target cable (single-wire cables) Red: 250 mm cable for power supply line (connected to VDD and AVREF pins) x 2 Black: 250 mm cable for GND line (connected to VSS and AVSS pins) x 2 Yellow: 250 mm cable for general signals x 26 User's Manual U17272EJ1V0UM 23 CHAPTER 2 SETUP PROCEDURE * Specifications of target system pin header: 0.635 mm x 0.635 mm (height: 6 mm) When mounting the pin header, ensure that the pin pitch is at least 2.54 mm. CN1 of the QB-78K0SKX1-DA incorporates a 40-pin pin header, so by mounting an IDE connector on the target system, the QB-78K0SKX1-DA can also be connected to the target system using a commercial IDE cable (ATA33 standard). The pins in CN1 correspond functionally to the pins of the target device (pins 8, 16, 20, and 30). The functions of the target device pins can be switched using the target device selection switch (SW2). The attached document QB78K0SKX1-DA Pin Header (CN1) Covers that indicates the signal name of the target device pins is provided. Use the appropriate cover by cutting it off from the document along the lines with scissors or a cutter, and cover the CN1 on the QB-78K0SKX1-DA with it. Cautions 1. Be careful not to hurt yourself with scissors or a cutter when cutting off the QB-78K0SKX1DA pin header (CN1) covers. 2. When emulating other than the 78K0S/KB1+, do not connect target I/F (pin header) pins that have not been assigned pin functions (unused pins) to anything. Figure 2-6. Connection of QB-78K0SKX1-DA to Target System 24 User's Manual U17272EJ1V0UM CHAPTER 2 SETUP PROCEDURE Table 2-1. Pin Correspondence Pin No. Target Device Setting KU1+/KY1+ Mode KA1+/KB1+ Mode 78K0S/KU1+ (8 Pins) 78K0S/KY1+ (16 Pins) 1 - - 2 - - 78K0S/KA1+ (20 Pins) 3 P20/ANI0/TI000/TOH1 P20/ANI0 4 GND GND 5 P21/ANI1/TI010/TO/INTP0 P21/ANI1 6 GND GND 7 P22/ANI2/X2 P22/ANI2 8 GND GND 9 P23/ANI3/X1 P23/ANI3 10 GND GND 11 VDD VDD 12 VSS VSS 13 14 - - - GND GND - P120 - P00 - P01 - P02 - P03 P121/X1 P122/X2 GND - - N.C. P123 N.C. 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - - P40 P40 - P41 P41/INTP3 - P42 P42/TOH1 - P43 P43/TxD6/INTP1 - P44 - 32 P30/TI000/INTP0 P45 P45 - 33 P31/TI010/TO00/INTP2 - P46 36 - P47 37 - 34 P130 P44/RxD6 - 31 35 AVSS GND 19 20 - - GND 17 18 - GND 15 16 - 78K0S/KB1+ (30 Pins) AVREF P32/INTP1 - - P46 - P32 - P47 - P33 38 GND GND 39 P34/N_RESET P34/N_RESET 40 GND GND Remark -: Pins not required in target device GND: Connected to VSS (pin 12) on the QB-78K0SKX1-DA User's Manual U17272EJ1V0UM 25 CHAPTER 2 SETUP PROCEDURE 2.6 Connection and Startup Procedures 2.6.1 Connecting QB-78K0SMINI to related devices Follow the steps described below when connecting the QB-78K0SMINI to other related devices. Caution Before connecting to any related device, be sure to install the integrated debugger (ID78K0S-QB) and USB driver in the host machine. Download the device file from NEC Electronics Website. (URL: http://www.necel.com/micro/index_e.html) (1) Connecting the QB-78K0SMINI to the QB-78K0SKX1-DA Insert the spacer supplied with the QB-78K0SKX1-DA. (a) Connecting the QB-78K0SMINI to the QB-78K0SKX1-DA using the supplied OCD I/F probe <1> QB-78K0SMINI side Align the ridge in the OCD I/F probe socket with the groove in the QB-78K0SMINI's interface connector for preventing reverse insertion and insert the socket into the connector. Ridge to prevent reverse insertion Groove to prevent reverse insertion 26 User's Manual U17272EJ1V0UM CHAPTER 2 SETUP PROCEDURE <2> QB-78K0SKX1-DA side Align the ridge in the OCD I/F probe socket with the groove in the target connector on the QB78K0SKX1-DA side for preventing reverse insertion and insert the socket into the connector. Groove to prevent reverse insertion Ridge to prevent reverse insertion (b) Connecting the QB-78K0SMINI to the QB-78K0SKX1-DA using the supplied OCD I/F board The OCD I/F board is made to handle differences in height between the QB-78K0SMINI and QB78K0SKX1-DA connectors. Connect the QB-78K0SMINI connector to the connector (CN1) on the OCD I/F board, and connect the QB-78K0SKX1-DA connector to the connector (CN2) on the OCD I/F board. User's Manual U17272EJ1V0UM 27 CHAPTER 2 SETUP PROCEDURE (2) Connecting the QB-78K0SKX1-DA to the target system Connect the CN1 connector on the QB-78K0SKX1-DA to the target board connector in accordance with the pin assignment of the target device. See 2.5 Connecting QB-78K0SKX1-DA to Target System for details. Be sure that the power supply to the target system is turned off. (3) Connecting the USB interface cable (QB-78K0SMINI side) Connect the USB interface cable's MINI-B connector to the QB-78K0MINI's USB connector. MINI-B connector 28 User's Manual U17272EJ1V0UM CHAPTER 2 SETUP PROCEDURE (4) Connecting the USB interface cable (host machine side) A connector side Connect the supplied USB interface cable's A connector to the host machine's USB port. User's Manual U17272EJ1V0UM 29 CHAPTER 2 SETUP PROCEDURE (5) Applying power The procedure for applying power is described below using the case where a target system is connected as an example. When the USB interface cable is connected to the host machine, only the QB-78K0MINI's POWER LED is ON (the QB-78K0SMINI's power is ON, the QB-78K0SKX1-DA's power is OFF, and the target system's power is OFF). When turning on the power with the QB-78K0SKX1-DA connected via the AC adapter, the QB78K0SKX1-DA's POWER LED is ON and when applying power to the target system, the QB-78K0SKX1DA's POC is OFF (the QB-78K0SMINI's power is ON, the QB-78K0SKX1-DA's power is ON, and the target system's power is ON). (6) Starting up ID78K0S-QB After making sure the power is supplied to the QB-78K0SMINI, QB-78K0SKX1-DA, and the target system, start up the ID78K0S-QB. When the target system is not connected, select the "Not Permit" on the Target Power Off setting on the ID78K0S-QB configuration dialog box. 30 User's Manual U17272EJ1V0UM CHAPTER 2 SETUP PROCEDURE 2.6.2 Disconnecting QB-78K0SMINI from related devices Follow the steps described below when disconnecting the QB-78K0SKX1MINI from other related devices. (1) Exit the ID78K0S-QB. (2) Turn off the power to the target system. (3) Turn off the power to the QB-78K0SKX1-DA. (4) Remove the AC adapter from the QB-78K0SKX1-DA. (5) Remove the USB interface cable from the QB-78K0SMINI and the host machine. (6) Remove the QB-78K0SMINI and QB-78K0SKX1-DA from the target system. User's Manual U17272EJ1V0UM 31 CHAPTER 3 SETTINGS AT PRODUCT SHIPMENT Table 3-1. Settings of QB-78K0SMINI at Shipment Item Setting Remarks CLK1 Socket for mounting an oscillator or oscillator circuit. 14 13 12 11 10 9 8 1 2 3 4 5 6 7 See 2.2 Clock Settings for details. Table 3-2. Settings of QB-78K0SKX1-DA at Shipment Item Setting Remarks This is the power supply switch. This switch is 3 ON set to OFF at shipment. 2 OFF 1 SW1 This is the target device selection switch. This SW2 KU1+/KY1+ switch is set to 78K0S/KA1+, 78K0S/KB1+ at shipment. KA1+/KB1+ 32 User's Manual U17272EJ1V0UM CHAPTER 4 RESTRICTIONS The following restrictions apply to the QB-78K0SKX1MINI. { Clock oscillation or clock input via a resonator on the target system is not supported. The clock differs between the device and the tool (QB-78K0SKX1MINI) according to the option byte (OSCSEL1, OSCSEL0) setting as follows. OSCSEL1 Device OSCSEL0 Tool 0 0 Crystal/ceramic oscillation clock Clock on QB-78K0SMINI 0 1 External clock input Clock on QB-78K0SMINI 1 x High-speed Ring-OSC clock High-speed Ring-OSC clock { The low-speed Ring-OSC clock emulates at 250 kHz. { The QB-78K0SKX1MINI has 256 KB of RAM. However, the 256 KB RAM area can be accessed normally from the user program even when a 128 KB device is being emulated, so be aware that problems such as stack overflow may occur without your knowledge. { The characteristics of the AD converter, LVI, and ports are not fully equivalent to those of the device. Pull-down resistors have also been inserted at the port signals to protect the target I/F. See APPENDIX A TARGET INTERFACE EQUIVALENT CIRCUIT for details. { AVSS and VSS are equivalent on the QB-78K0SKX1MINI. { When using the QB-78K0SKX1MINI, a correct AD conversion result can be obtained even without waiting for 1 s to elapse after setting bit 0 (ADCE) of the A/D converter mode register (ADM) to 1. When using the actual device, however, be sure to execute processing such as reading and discarding this result. { The internal functions (registers, peripheral macro, multiplier, etc.) of the QB-78K0SKX1-DA always operate for the 78K0S/KB1+. Therefore, while the emulation is performed for 78K0S/KA1+, KU1+, or KY1+, if the bit of the register which exists only in the 78K0S/KB1+ is accessed from the program, it can be read or written even if access to the bit is disabled under normal conditions. The multiplication instruction execution is enabled while the emulation is performed for 78K0S/KA1+, KU1+, and KY1+. User's Manual U17272EJ1V0UM 33 APPENDIX A TARGET INTERFACE EQUIVALENT CIRCUIT This chapter explains the differences between the signal lines of the target interface circuit of the QB78K0SKX1MINI and the signal lines of the target device. Although the target device is a CMOS circuit, the target interface circuit of the QB-78K0SKX1MINI consists of an emulation circuit that depends on the emulation CPU, TTL, CMOS-IC, etc. When the target system is debugged by connecting it to the QB-78K0SKX1MINI, the QB-78K0SKX1MINI emulates just as if the actual target device were operating on the target system. However, small differences arise because the QB-78K0SKX1MINI actually is emulating. The target interface equivalent circuit of the QB-78K0SKX1MINI is shown in Figure A-1 below. Figure A-1. Equivalent Circuit (1/2) Target system side QB-78K0SKX1MINI side NEF31PT222Z1E9B (filter) VDD EVDD 100 k KU1+/KY1+ AVDD NEF31PT222Z1E9B (filter) AVREF KA1+/KB1+ 100 k VSS AVSS EVDD 33 k D7885 (level shifter) 33 k 3.3 V EVDD P00 to P03 P30 to P33 P40 to P47 P120 to P123 34 D7885 (level shifter) 1 M User's Manual U17272EJ1V0UM Emulation CPU (FPGA) APPENDIX A TARGET INTERFACE EQUIVALENT CIRCUIT Figure A-1. Equivalent Circuit (2/2) Target system side QB-78K0SKX1MINI side 33 k CD74HCT4066 (analog switch) AVDD AVDD CD74HCT4066 (analog switch) P20 to P23 D7885 (level shifter) Emulation CPU (FPGA) 1 M CD74HCT4066 (analog switch) AD7813YR (A/D converter) Exclusive control of P20 to P23 One AD converter is included EVDD D7885 (level shifter) P34 P130 Emulation CPU (FPGA) 1 M User's Manual U17272EJ1V0UM 35