Microchip Technology MPLAB REAL ICE User Manual

Microchip Technology MPLAB REAL ICE User Manual

In-circuit emulator
Table of Contents

Advertisement

Quick Links

MPLAB
®
REAL ICE
In-Circuit Emulator
User's Guide
© 2006 Microchip Technology Inc.
DS51616A

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MPLAB REAL ICE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Microchip Technology MPLAB REAL ICE

  • Page 1 MPLAB ® REAL ICE ™ In-Circuit Emulator User’s Guide © 2006 Microchip Technology Inc. DS51616A...
  • Page 2 Endurance, UNI/O, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies.
  • Page 3: Table Of Contents

    2.1 Introduction ..................... 9 2.2 MPLAB REAL ICE In-Circuit Emulator vs. MPLAB ICE 2000/4000 Emulators ............9 2.3 MPLAB REAL ICE In-Circuit Emulator vs. MPLAB ICD 2 Debugger ..... 9 2.4 System Configurations ................. 10 2.5 Communication Connections ............... 13 2.6 Debug Mode ....................
  • Page 4 7.7 High-Speed Communication Boards ............45 7.8 Other Emulator Boards (Future) ..............48 7.9 Target Board ....................48 Appendix A. Revision History A.1 Revision History ................... 49 Glossary ........................51 Index ..........................65 Worldwide Sales and Service ..................68 © 2006 Microchip Technology Inc. DS51616A-page iv...
  • Page 5: Preface

    • Customer Support DOCUMENT LAYOUT This document describes how to use the MPLAB REAL ICE in-circuit emulator as a development tool to emulate and debug firmware on a target board, as well as how to program devices. The document is organized as follows: •...
  • Page 6: Conventions Used In This Guide

    Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in your Warranty Registration Card entitles you to receive new product updates. Interim software releases are available at the Microchip web site. © 2006 Microchip Technology Inc. DS51616A-page 2...
  • Page 7: Recommended Reading

    Readme for MPLAB REAL ICE In-Circuit Emulator For the latest information on using the MPLAB REAL ICE in-circuit emulator, read the “Readme for MPLAB REAL ICE Emulator.txt” file (an ASCII text file) in the Readmes subdirectory of the MPLAB IDE installation directory.
  • Page 8 MPLIB™ and MPLAB LIB30 object librarians. • Emulators – The latest information on Microchip in-circuit emulators.This includes the MPLAB REAL ICE in-circuit emulator, MPLAB ICE 2000 and MPLAB ICE 4000 emulators. • In-Circuit Debuggers – The latest information on the Microchip in-circuit debugger, MPLAB ICD 2.
  • Page 9: Customer Support

    (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://support.microchip.com © 2006 Microchip Technology Inc. DS51616A-page 5...
  • Page 10 MPLAB REAL ICE In-Circuit Emulator User’s Guide ® ™ NOTES: © 2006 Microchip Technology Inc. DS51616A-page 6...
  • Page 11: Chapter 1. Overview

    • How the MPLAB REAL ICE In-Circuit Emulator Helps You • MPLAB REAL ICE In-Circuit Emulator Kit Components MPLAB REAL ICE IN-CIRCUIT EMULATOR DEFINED MPLAB REAL ICE in-circuit emulator is an in-circuit emulator that is controlled by a PC ® running MPLAB IDE software on a Windows platform.
  • Page 12: Mplab Real Ice In-Circuit Emulator Kit Components

    In-Circuit Emulator User’s Guide ® ™ MPLAB REAL ICE IN-CIRCUIT EMULATOR KIT COMPONENTS The components of the MPLAB REAL ICE in-circuit emulator system kit are listed below. 1. MPLAB IDE Quick Start Guide (DS51281) 2. CD-ROM with MPLAB IDE software and on-line documentation 3.
  • Page 13: Chapter 2. Operation

    MPLAB REAL ICE IN-CIRCUIT EMULATOR VS. MPLAB ICD 2 DEBUGGER The MPLAB REAL ICE in-circuit emulator system is similar to the MPLAB ICD 2 in-circuit debugger system, but surpasses it in speed and functionality. Even with standard communication, the MPLAB REAL ICE in-circuit emulator is faster than the MPLAB ICD 2.
  • Page 14: System Configurations

    ™ SYSTEM CONFIGURATIONS The MPLAB REAL ICE in-circuit emulator system consists of these basic items: • Emulator pod with indicator lights, push buttons and a logic probe connector • USB cable to connect a PC to the emulator pod and power the pod •...
  • Page 15 Target Device STATUS FUNCTION RESET Target Board Standard Driver Board FIGURE 2-3: STANDARD EMULATOR SYSTEM – ICE DEVICE Standard Header Emulator Pod Device-ICE ACTIVE STATUS FUNCTION RESET Transition Socket Standard Driver Board Target Board © 2006 Microchip Technology Inc. DS51616A-page 11...
  • Page 16 Target Board High-Speed Receiver Board High-Speed Driver Board FIGURE 2-5: HIGH-SPEED EMULATOR SYSTEM – ICE DEVICE High-Speed Header/Receiver Board Emulator Pod Device-ICE ACTIVE STATUS FUNCTION RESET Transition Socket High-Speed Driver Board Target Board © 2006 Microchip Technology Inc. DS51616A-page 12...
  • Page 17: Communication Connections

    2.5.1 Standard Communications Target Connection Using the standard driver board, the MPLAB REAL ICE in-circuit emulator is connected to the target device with the modular interface (six-conductor) cable. The pin numbering for the connector is shown from the bottom of the target PC board in Figure 2-6.
  • Page 18 2.5.3 Target Connection Circuitry Figure 2-8 shows the interconnections of the MPLAB REAL ICE in-circuit emulator to the connector on the target board. The diagram also shows the wiring from the connector to a device on the target PC board. A pull-up resistor (usually around 10 kΩ)
  • Page 19 The interconnection is very simple; any problems experienced are often caused by other connections or components on these critical lines that interfere with the operation of the MPLAB REAL ICE in-circuit emulator system, as discussed in the next section. 2.5.4...
  • Page 20 Unused pins should either be pulled up or grounded. Floating pins may produce false triggers. For more on this type of trace, see Section 5.5.2 “I/O Port Trace”. © 2006 Microchip Technology Inc. DS51616A-page 16...
  • Page 21: Debug Mode

    Operation DEBUG MODE There are two steps to using the MPLAB REAL ICE in-circuit emulator system as a debugger. The first requires that an application be programmed into the target device. The second uses the internal in-circuit debug hardware of the target Flash device to run and test the application program.
  • Page 22 • The target device is held in Reset by keeping the V /MCLR line low. 2.7.2 Debug Mode Details Figure 2-13 illustrates the MPLAB REAL ICE in-circuit emulator system when it is ready for debugging. ® FIGURE 2-13: MPLAB REAL ICE™...
  • Page 23: Program Mode

    PROGRAM MODE When using the Programmer>Program selection to program a device, MPLAB IDE will disable the in-circuit debug registers so the MPLAB REAL ICE in-circuit emulator will program only the target application code and the Configuration bits (and EEPROM data, if available and selected) into the target device. The debug executive will not be loaded.
  • Page 24: Resources Used By The Mplab Real Ice In-Circuit Emulator

    In-Circuit Emulator User’s Guide ® ™ RESOURCES USED BY THE MPLAB REAL ICE IN-CIRCUIT EMULATOR The MPLAB REAL ICE in-circuit emulator may use on-chip resources when debugging, depending on the device. 2.9.1 dsPIC DSC/PIC24 Devices The emulator device (Device-ICE) and header board may be used with the emulator for debugging functions without loss of pins.
  • Page 25: Chapter 3. Installation

    MPLAB IDE v7.43 or greater is required for MPLAB REAL ICE in-circuit emulator functionality. INSTALLING THE USB DEVICE DRIVERS MPLAB REAL ICE in-circuit emulator USB device drivers must be installed before the emulator can use USB communications. Follow the html instructions found at the location below to install the drivers: MPLAB IDE installation directory\REAL ICE\Drivers\ddri.htm...
  • Page 26: Connecting The Logic Probes

    The logic probes may be connected into the logic probe connector on the emulator pod. These probes will allow halting the MPLAB REAL ICE in-circuit emulator by external triggers, and will provide output triggers to synchronize external equipment such as oscilloscopes and logic analyzers.
  • Page 27: Chapter 4. General Setup

    ® ™ IN-CIRCUIT EMULATOR Chapter 4. General Setup INTRODUCTION How to get started using the MPLAB REAL ICE in-circuit emulator is discussed. • Starting the MPLAB IDE Software • Creating a Project • Viewing the Project • Building the Project •...
  • Page 28: Creating A Project

    MPLAB IDE Configuration window. Select Configure>Configuration Bits. By clicking on the text in the “Settings” column, these can be changed. On most devices, the Watchdog Timer is enabled initially. It is usually a good idea to disable this bit. © 2006 Microchip Technology Inc. DS51616A-page 24...
  • Page 29: Setting The Emulator As The Debugger Or Programmer

    Program Memory Tab This tab of the Programmer dialog allows you to set up debug/programming options. • Allow MPLAB REAL ICE to select memories and ranges – the emulator uses your selected device and default settings to determine what to program.
  • Page 30 4.8.3 Instrumented Trace Tab Set the size of the trace buffer. Note: There is currently a 256k trace line maximum. For more on tracing, see Chapter 5. “Using the Emulator as a Debugger”. © 2006 Microchip Technology Inc. DS51616A-page 26...
  • Page 31: Chapter 5. Using The Emulator As A Debugger

    REAL ICE ® ™ IN-CIRCUIT EMULATOR Chapter 5. Using the Emulator as a Debugger INTRODUCTION How to use the MPLAB REAL ICE in-circuit emulator as a debugger is discussed. • Debugger Overview • Breakpoints • Triggers • Trace • Debugging Functions •...
  • Page 32: Trace

    I/O Port trace can be used with either standard or high-speed communications. Trace clock and data are provided from a device I/O port through the MPLAB REAL ICE in-cir- cuit emulator logic probe connector. For hardware connections, see Section 2.5.6 “I/O Port Trace Connections”.
  • Page 33 5. Select View>Trace to view the trace data (Section 5.7.10 “Trace Window”) or right click and in the Trace window and select “Reload”. Repeat these steps each time you change a trace point. © 2006 Microchip Technology Inc. DS51616A-page 29...
  • Page 34: Debugging Functions

    • Select Project>Build Options>Project, Trace tab. Select “Off” for Transport. Click DEBUGGING FUNCTIONS When you select the MPLAB REAL ICE in-circuit emulator from the Debugger menu, debug items will be added to the following MPLAB IDE functions: • Debugger Menu •...
  • Page 35 Section 5.5.5 “Setting Up Trace in MPLAB IDE”. Set/Remove Breakpoint Set or remove a breakpoint at the currently selected line. Enable/Disable Breakpoint Enable or disable a breakpoint at the currently selected line. Breakpoints Remove, enable or disable all breakpoints. © 2006 Microchip Technology Inc. DS51616A-page 31...
  • Page 36: Debugging Dialogs/Windows

    Set the Program Counter (PC) to the cursor location. 5.6.3 Toolbars/Status Bar When the MPLAB REAL ICE in-circuit emulator is selected as a debugger, these toolbars are displayed in MPLAB IDE: • Basic debug toolbar (Run, Halt, Animate, Step Into, Step Over, Step Out, Reset).
  • Page 37 Break occurs Count instructions after Event wait Count (0-255) instructions before breaking after event specified in “Breakpoint type” – Event must occur Count times break only after event specified in “Breakpoint type” occurs Count (0-255) times © 2006 Microchip Technology Inc. DS51616A-page 33...
  • Page 38 • Break on Watchdog Timer – Break every time the watchdog timer times out. Make sure the Watchdog Timer is enabled in the Configuration bits. • Break on SLEEP instruction – Break when a SLEEP instruction is encountered in the program. © 2006 Microchip Technology Inc. DS51616A-page 34...
  • Page 39 4 breakpoints are available, and two breakpoints are set, up to two triggers may be set also. If Capture trace is used, then real-time data capture triggers cannot be used because of hardware constraints. However, breakpoints are still available. © 2006 Microchip Technology Inc. DS51616A-page 35...
  • Page 40 • Go To Trace Line – Go to the trace line specified in the dialog. • Go To Source Line – Open a File window and go to the source code line corresponding to the selected trace line. © 2006 Microchip Technology Inc. DS51616A-page 36...
  • Page 41 Enter a “Start” and “End” cycle to write to the file. Also specify if the text is to be tab-delimited. Print Print the contents of the trace memory window. Refresh Refresh the viewable contents of the window. Properties Set up window properties. © 2006 Microchip Technology Inc. DS51616A-page 37...
  • Page 42 MPLAB REAL ICE In-Circuit Emulator User’s Guide ® ™ NOTES: © 2006 Microchip Technology Inc. DS51616A-page 38...
  • Page 43: Chapter 6. Using The Emulator As A Programmer

    ™ IN-CIRCUIT EMULATOR Chapter 6. Using the Emulator as a Programmer INTRODUCTION How to use the MPLAB REAL ICE in-circuit emulator as a programmer is discussed. • Programmer Overview • Programming Functions PROGRAMMER OVERVIEW Select Programmer>Select Programmer>MPLAB REAL ICE to choose the MPLAB REAL ICE in-circuit emulator as the programmer tool.
  • Page 44 ® ™ 6.3.2 Toolbars/Status Bar When the MPLAB REAL ICE in-circuit emulator is selected as a programmer, these toolbars are displayed in MPLAB IDE: • Basic program toolbar (Blank Check All, Read, Program, Verify, Erase Flash Device). The selected programmer (MPLAB REAL ICE), as well as other programming information, is displayed in the status bar on the bottom of the MPLAB IDE desktop.
  • Page 45: Chapter 7. Hardware Specification

    Date: August 2006 Important Information Concerning the Use of the MPLAB REAL ICE In-Circuit Emulator Due to the special nature of the MPLAB REAL ICE in-circuit emulator, the user is advised that it can generate higher than normal levels of electromagnetic radiation which can interfere with the operation of all kinds of radio and other equipment.
  • Page 46: Usb Port/Power

    ™ USB PORT/POWER The MPLAB REAL ICE in-circuit emulator is connected to the host PC via a Universal Serial Bus (USB) port, version 2.0 compliant. The USB connector is located on the back of the pod. A USB port on the host PC is required.
  • Page 47 White EXT0** External input/output bit 0 White System Ground Black System Ground Black *Do not connect V to the target. * *Do not connect EXT0 to EXT7. This is dedicated to self test. © 2006 Microchip Technology Inc. DS51616A-page 43...
  • Page 48: Standard Communication Board

    The actual power comes from the MPLAB REAL ICE in-circuit emulation system as the V sense line is used as a reference only to track the target voltage. The V connection is isolated with an optical switch.
  • Page 49: High-Speed Communication Boards

    Function Name Function LVC+ LV Std Data + Ground LVD– LV Std Data – LVC– LV Std Clock – LVC+ LV Std Clock + Vdd_TGT Vdd on target Power Vpp_TGT Vpp on target © 2006 Microchip Technology Inc. DS51616A-page 45...
  • Page 50 *Trace Data ICSPDAT Standard Com Data *Trace Clock *future feature FIGURE 7-5: RECEIVER BOARD SCHEMATIC – ICSPDAT AHC1G04-SOT5 +3.3V NDATA_EN DATA_EN _TAR LVD+ DATA DATA_EN ICSPDAT LVD- 4.7K SN65MLVD206 74LVC1T45_SOT-6P DATAEN+ DATA_EN DATAEN- SN65MLVD206 © 2006 Microchip Technology Inc. DS51616A-page 46...
  • Page 51 NCLK_EN CLK_EN _TAR LVC+ CLK_EN ICSPCLK LVC- 4.7K SN65MLVD206 74LVC1T45_SOT-6P CLKEN+ CLK_EN CLKEN- SN65MLVD206 FIGURE 7-7: RECEIVER BOARD SCHEMATIC – DAT & CLK +3.3V USPID+ USPID- SN65MLVD206 +3.3V USPIC+ POWER 0.1uF USPIC- SN65MLVD206 © 2006 Microchip Technology Inc. DS51616A-page 47...
  • Page 52: Other Emulator Boards (Future)

    3. Connect the self-test board to the emulator using the modular cable. 4. Connect the emulator to the PC. 5. Select the MPLAB REAL ICE in-circuit emulator as either a debugger or programmer in MPLAB IDE. 6. MPLAB IDE will automatically detect and run the complete self test and give you a status (pass/fail).
  • Page 53: Appendix A. Revision History

    MPLAB ® REAL ICE ™ IN-CIRCUIT EMULATOR USER’S GUIDE Appendix A. Revision History REVISION HISTORY Revision A (September 2006) • Initial release of this document. © 2006 Microchip Technology Inc. DS51616A-page 49...
  • Page 54 MPLAB REAL ICE In-Circuit Emulator User’s Guide ® ™ NOTES: © 2006 Microchip Technology Inc. DS51616A-page 50...
  • Page 55: Glossary

    A programming language that describes binary machine code in a symbolic form. Asynchronous Stimulus Data generated to simulate external inputs to a simulator device. Breakpoint, Hardware An event whose execution will cause a halt. © 2006 Microchip Technology Inc. DS51616A-page 51...
  • Page 56 Statements in source code that provide control of the language tool’s operation. Download Download is the process of sending data from a host to another device, such as an emulator, programmer or target board. © 2006 Microchip Technology Inc. DS51616A-page 52...
  • Page 57 External Input Line An external input signal logic probe line (TRIGIN) for setting an event based upon external signals. External RAM Off-chip Read/Write memory. © 2006 Microchip Technology Inc. DS51616A-page 53...
  • Page 58 The collection of machine language instructions that a particular processor understands. Instructions A sequence of bits that tells a central processing unit to perform a particular operation and can contain data to be used in the operation. © 2006 Microchip Technology Inc. DS51616A-page 54...
  • Page 59 Listing File A listing file is an ASCII text file that shows the machine code generated for each C source statement, assembly instruction, assembler directive or macro encountered in a source file. © 2006 Microchip Technology Inc. DS51616A-page 55...
  • Page 60 Directives that control the execution and data allocation within macro body definitions. Make Project A command that rebuilds an application, recompiling only those source files that have changed since the last complete compilation. Microcontroller Unit. An abbreviation for microcontroller. Also uC. © 2006 Microchip Technology Inc. DS51616A-page 56...
  • Page 61 The entire program memory is mapped externally. Mnemonics Text instructions that can be translated directly into machine code. Also referred to as opcodes. MPASM™ Assembler Microchip Technology’s relocatable macro assembler for PICmicro microcontroller ® devices, KeeLoq devices and Microchip memory devices. MPLAB ASM30 Microchip’s relocatable macro assembler for dsPIC30F digital signal controller devices.
  • Page 62 PIC18CXXX device where memory may reside on the target board, or where all program memory may be supplied by the Emulator. The Memory tab accessed from Options>Development Mode provides the Off-Chip Memory selection dialog box. Opcodes Operational Codes. See Mnemonics. © 2006 Microchip Technology Inc. DS51616A-page 58...
  • Page 63 A set of source files and instructions to build the object and executable code for an application. Prototype System A term referring to a user's target application, or target board. PWM Signals Pulse Width Modulation Signals. Certain PICmicro MCU devices have a PWM peripheral. © 2006 Microchip Technology Inc. DS51616A-page 59...
  • Page 64 You can also single step C compiler source code, but instead of executing single instructions, MPLAB IDE will execute all assembly level instructions generated by the line of the high-level C statement. © 2006 Microchip Technology Inc. DS51616A-page 60...
  • Page 65 If for some reason the subroutine gets into an endless loop or does not return properly, the next breakpoint will never be reached. The Step Over command is the same as Single Step except for its handling of CALL instructions. © 2006 Microchip Technology Inc. DS51616A-page 61...
  • Page 66 Any number of trigger output points can be set. Uninitialized Data Data which is defined without an initial value. In C, int myVar; defines a variable which will reside in an uninitialized data section. © 2006 Microchip Technology Inc. DS51616A-page 62...
  • Page 67 Watchdog Timer A timer on a PICmicro microcontroller that resets the processor after a selectable length of time. The WDT is enabled or disabled and set up using Configuration bits. See Watchdog Timer. © 2006 Microchip Technology Inc. DS51616A-page 63...
  • Page 68 MPLAB REAL ICE In-Circuit Emulator User’s Guide ® ™ NOTES: © 2006 Microchip Technology Inc. DS51616A-page 64...
  • Page 69: Index

    Memory Used............20 Debug Mode Modular Interface Cable........... 17 Sequence of Operations ........18 MPLAB IDE .............. 21 Documentation MPLAB REAL ICE Defined ........7 Conventions ............2 Layout ..............1 Driver Board Parallel Trace ............16 High-Speed..........8 Pod............... 8 Standard ..........8...
  • Page 70 Specification..........3 Triggers .............. 27 External ............. 43 UART Trace ............. 16 USB ..............42 Cables ............8 Device Drivers........... 21 Verify ................ 39 Watchdog Timer ............18 Web Site, Microchip ........... 4 © 2006 Microchip Technology Inc. DS51616A-page 66...
  • Page 71 Index NOTES: © 2006 Microchip Technology Inc. DS51616A-page 67...
  • Page 72: Worldwide Sales And Service

    China - Wuhan Thailand - Bangkok Tel: 408-961-6444 Tel: 86-27-5980-5300 Tel: 66-2-694-1351 Fax: 408-961-6445 Fax: 86-27-5980-5118 Fax: 66-2-694-1350 Toronto China - Xian Mississauga, Ontario, Tel: 86-29-8833-7250 Canada Fax: 86-29-8833-7256 Tel: 905-673-0699 Fax: 905-673-6509 08/29/06 © 2006 Microchip Technology Inc. DS51616A-page 68...
  • Page 73 Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Microchip AC244006...

Table of Contents