Integrated Development Environment Using MPLAB REAL ICE In-Circuit Emulator ™ 4 Connect to Target Device Standard Driver Board tVDD VPP tVDD tVDD 4.7 kΩ Incorrect 2 1 5 4 3 PGC PGD VSS AVSS ** • Do not use pull-ups on PGC/PGD: they will VPP /MCLR PGC PGD AVDD ** tVDD prevent fast transitions of VPP. XTAL* 2 1 5 4 3 AVDD ** VSS AVSS ** 4.7 kΩ Target Application PC Board • Do not use capacitors on MCLR: they will Target Application PC Board *Target device must be running with an oscillator for the emulator to function as a debugger. **If the device has AVDD and AVSS lines, they must be connected for the emulator to operate. divide the voltage levels since these lines have 4.7 kΩ pull-down resistors in MPLAB REAL ICE. • Do not use multiplexing on PGC/PGD: they are dedicated for communications to MPLAB REAL ICE. • Do not use capacitors on PGC/PGD: they will prevent fast transitions on data and clock lines during programming and debug communications. • Do not use diodes on PGC/PGD: they will prevent bidirectional communication between MPLAB REAL ICE and the target PIC®MCU. Power Optional Trace Connections RESET FUNCTION ACTIVE 1-6 Device SPI 7 DAT 8 CLK SDO (serial data output) SCK (serial clock) High Speed/ LVDS Connector I/O Port Trace Application PC Board Device 5 STATUS ACTIVE FUNCTION RESET 10kΩ 7 7 6:0 PORTx Logic Probes (use EXT0:7) PIC32MX Instruction Trace Application PC Board PIM 5 • Do not exceed recommended cable lengths: refer to the Hardware Specification section of the MPLAB REAL ICE online help or user’s guide for acceptable cable lengths. Application PC Board STATUS REAL ICE ™ In-Circuit SPI Trace REAL ICE ™ Target Circuit Design Precautions VPP /MCLR Target Board RESET Target VDD (tVDD) is used to power the Input/Output drivers in the MPLAB REAL ICE in-circuit emulator Microcontroller Pin MCLR/VPP VDD Ground PGD (ICSPDAT) PGC (ICSPCLK) Do not connect* *Reserved for future use. XTAL* Transition Socket Power Modular Connector Pin 1 2 3 4 5 6 VDD Device-ICE RESET High-Speed Driver Board Target Board Target Connector Pinouts VDD 50 kΩ Typical J3 J2 ACTIVE STATUS FUNCTION Native trace is built-in for many devices and is available once the Standard or High-Speed target connections are made. For more on device support for this and other forms of trace, see the MPLAB REAL ICE in-circuit emulator online help file, “Device and Feature Support.” Target VDD (tVDD) REAL ICE ™ Transition Socket 1 Top View 2 of Target 3 Board 4 5 6 7 - DAT* 8 - CLK* Correct MPLAB ® RESET Native Trace Connections Target VDD (tVDD) In-Circuit USB J2 J3 *Used for optional SPI/UART trace capability. MPLAB REAL ICE Internal Circuitry (simplified) tVDD www.microchip.com FUNCTION High-Speed Header/Receiver Board r Device-ICE STATUS High-Speed Connection at Target 1 3 5 REAL ICE ™ Header ACTIVE Circuitry and Connector Pinouts Bottom View of Target Board Standard Adapter In-Circuit See the MPLAB REAL ICE in-circuit emulator online help for information on reserved resources used by the emulator. 2 4 6 Processor Pak MPLAB ® Power High-Speed Emulator System – ICE Device Standard Emulator System – ICE Device USB High-Speed Receiver Board High-Speed Driver Board Power r Target Board J2 J3 Trace Cable FUNCTION The Microchip name and logo, the Microchip logo, MPLAB, and PIC are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. The MPLAB Certified logo and REAL ICE are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. © 2011-2014 Microchip Technology Incorporated. Printed in the U.S.A. All Rights Reserved. 9/14 Standard Driver Board Target Device or PIM RESET Target Board Reserved Resources J1 FUNCTION STATUS Note: See MPLAB REAL ICE in-circuit emulator online help for more information. Target Device or PIM RESET STATUS ACTIVE Power WDT Code-Protect Table Read Protect LVP BOD JTAG AVDD and AVSS PGCx/PGDx Programming SETTING • OSC bits set properly • Running Supplied by target Disabled (device dependent) Disabled Disabled Disabled VDD>BOD VDD min Disabled Must be connected Proper channel selected, if applicable VDD voltage levels meet programming spec J3 J2 ACTIVE FUNCTION ADDITIONAL INFORMATION Standard Connection at Target REAL ICE ™ REAL ICE ™ COMPONENT Oscillator REAL ICE ™ MPLAB ® Recommended Settings MPLAB ® USB In-Circuit Loopback Test Board Use the supplied loopback test board to verify that the emulator is functioning properly: 1. Disconnect the emulator from the computer. 2. Plug the standard driver board into the emulator pod. 3. Plug the loopback test board into the pod’s logic probe connector. 4. Connect the loopback test board to the standard driver board using the modular cable. Reconnect the emulator to the computer. 5. Launch MPLAB X IDE. Ensure that all existing projects are closed. 6. Select Debug>Run Debugger/Programmer Self Test, then, select the specific “REAL ICE” you want to test and click OK. 7 Ensure the loopback test board and cable are connected and click Yes to continue. 8. View the self test results in the emulator’s Output window. 9. After the emulator passes the self test, disconnect the loopback test board from the emulator. MPLAB ® ACTIVE 1. Select and install the language tools (compiler, assembler, etc.) for developing your code. See the www.microchip.com web site for more choices. 2. Use the New Project wizard (File>New Project) to create a project, or open an existing project (File>Open Project). 3. Configure the emulator by right clicking on the main project and selecting “Properties.” Click on “Real ICE” for options. 4. Configure your language tools in the Properties dialog by clicking the language tool name for options. Click OK when done. 5. Check that the configuration bits in your code match the Recommended Settings listed below. 6. To execute your code in Debug mode, perform a debug run (Debug>Debug Project). A debug run will build the project, program the target with the image and debug executive, and start a debug session. OR To execute your code in Non-Debug (release) mode, perform a run (Run>Run Project). A run will build the project, program the target with the image and run the device. To hold a device in Reset after programming, use the Hold in Reset icon in the toolbar instead of using Run Project. Standard Driver Board Modular Cable Performance Pak In-Circuit MPLAB ® Logic Probe Connector USB 5 Create, Build and Run Project Driver Board Slot Emulator Pod r r In-Circuit STATUS 3 Use the Loopback Test Board High-Speed Emulator System – Device with On-Board ICE Circuitry In-Circuit When you install MPLAB X IDE on a Mac or Linux computer, the installer will automatically load the USB drivers. When you install MPLAB X IDE on a Windows®computer, you must follow the instructions on the Start Page, “MPLAB IDE v8 Users Important,” to correctly install the USB drivers. Note: If switching to high-speed/LVDS communications, remove USB power first. 1. Attach the emulator to the target as shown on the right. 2. Connect power to the target board. Target Application Device 2 Configure USB Communications Standard Emulator System – Device with On-Board ICE Circuitry MPLAB ® Install the MPLAB®X IDE software on your computer by downloading it from www.microchip.com/mplabx. Launch the application. Target Application Device 1 Install the Latest Software DS50001997B Trace Adapter Device 5 TRD3:0 TRCLK