Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and t he lik e is provided only for your convenience
and may be su perseded by upda t es . It is y our responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, KEELOQ logo, MPLAB, PIC, PICmicro,
PICSTART, PRO MA TE, rfPIC and SmartShunt are registered
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
FilterLab, Linear Active Thermistor, MXDEV, MXLAB,
SEEVAL, SmartSensor and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, In-Circuit Serial
Programmin g , IC SP, ICEPIC, Mindi, MiW i , MPASM, MPLAB
Certified logo, MPLIB, MPLINK, mTouch, PICkit, PICDEM,
PICDEM.net, PICtail, PIC
32
logo, PowerCal, PowerInfo,
PowerMate, PowerT ool, REAL ICE, rfLAB, Select Mode, Total
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.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the p age number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB
Select the Help menu, and then Topics to open a list of available on-line help files.
INTRODUCTION
®
IDE on-line help.
This chapter contains general information that will be helpful to know before using the
MPLAB REAL ICE in-circuit emulator. Items discussed include:
• Document Layout
• Conventions Used in this Guide
• Warranty Registration
• Recommended Reading
• The Microchip Web Site
• Development Systems Customer Change Notification Service
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:
Part 1 – Getting Started
• Chapter 1: Overview – What the MPLAB REAL ICE in-circuit emulator is, and
how it can help you develop your application.
• Chapter 2: Operation – The theory of MPLAB REAL ICE in-circuit emulator
operation. Explains configuration options.
• Chapter 3: Installation – How to install the emulator software and hardware.
• Chapter 4: Tutorial – A brief tutorial on using the emulator.
Part 2 – Features
• Chapter 5: General Setup – How to set up MPLAB IDE to use the emulator.
• Chapter 6: Basic Debug Functions – A description of basic emulator features
available in MPLAB IDE when the MPLAB REAL ICE in-circuit emulator is chosen
as the debug tool. This includes the debug features breakpoints, stopwatch, and
external triggering.
• Chapter 7: Debug for 8- and 16-Bit Devices – A description of data capture,
runtime watches and trace for 8- and 16-bit (data memory) devices. Includes the
types of trace available and how to setup and use trace.
• Chapter 8: Debug for 32-Bit Devices – A description of data capture, runtime
watches and trace for 32-bit devices. Includes hardware and software setup for
use of PIC32 instruction trace.
Part 3 – Reference
• Chapter 9: Frequently Asked Questions – A list of frequently-asked questions,
useful for troubleshooting.
• Chapter 10: Error Messages – A list of error messages and suggested
resolutions.
• Chapter 11: Emulator Function Summary – A summary of emulator functions
available in MPLAB IDE when the MPLAB REAL ICE emulator is chosen as the
debug or program tool.
• Chapter 12: Hardware Specification – The hardware and electrical
specifications of the emulator system. Includes a description of how to use the
loop-back test board.
Choice of mut ually exclus ive
arguments; an OR selection
Represents code supplied by
user
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
WARRANTY REGISTRATION
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.
This document describes how to use the MPLAB REAL ICE in-circuit emulator. Other
useful documents are listed below. The following Microchip documents are available
and recommended as supplemental reference resources.
Release Notes 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.htm” file (an HTML file) in the Readmes
subdirectory of the MPLAB IDE installation directory. The release notes (Readme)
contains update information and known issues that may not be included in this user’s
guide.
MPLAB REAL ICE In-Circuit Emulator Setup (DS51615)
MPLAB REAL ICE In-Circuit Emulator Setup - PIC32MX (DS51687)
These posters show you how to hook up the hardware and install the software for the
MPLAB REAL ICE in-circuit emulator.
MPLAB REAL ICE In-Circuit Emulator On-line Help File
A comprehensive help file for the emulator is included with MPLAB IDE. Usage,
troubleshooting and hardware specifications are covered. This may be more up-to-date
than the printed documentation. Also, emulator reserved resources and limitations are
listed for various devices.
Header Board Specification (DS51292)
This booklet describes how to install and use MPLAB REAL ICE in-circuit emulator
headers. Headers are used to better debug selected devices using special -ICE device
versions, without the loss of pins or resources.
Transition Socket Specification (DS51194)
Consult this document for information on transition sockets available for use with
MPLAB REAL ICE in-circuit emulator and MPLAB ICD 2 in-circuit debugger headers,
as well as MPLAB ICE 2000/4000 device adaptors.
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite Internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip’s customer notification service helps keep customers current on Microchip
products. Subscribers will receive e-mail notification whenever there are changes,
updates, revisions or errata related to a specified product family or development tool of
interest.
To register, access the Microchip web site at www.microchip.com, click on Customer
Change Notification and follow the registration instructions.
The Development Systems product group categories are:
• Compilers – The latest info rmatio n on Microc hip C comp ilers, as semblers , linker s
and other language tools. These include all MPLAB C compilers; all MPLAB
assemblers (including MPASM™ assembler); all MPLAB linkers (including
MPLINK™ object linker); and all MPLAB librarians (including MPLIB™ object
librarian).
• Emulators – The latest information on Microchip in-circuit emulators.These
include the MPLAB REAL ICE™, MPLAB ICE 2000 and MPLAB ICE 4000
in-circuit emulators
• In-Circuit Debuggers – The latest information on Microchip in-circuit debuggers.
These include the MPLAB ICD 2 in-circuit debugger and PICkit™ 2 debug
express.
• MPLAB
Integrated Development Environment for development systems tools. This list is
focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and
MPLAB SIM simulator, as well as general editing and debugging features.
• Programmers – The latest information on Microchip programmers. These include
the MPLAB PM3 and PRO MATE
Plus and PICkit 1 and 2 development programmers.
®
IDE – The latest information on Microchip MPLAB IDE, the Windows®
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer
(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
An overview of the MPLAB REAL ICE in-circuit emulator system is given.
• Emulator Defined
• How the Emulator Helps You
• Emulator Kit Components
• Device and Feature Support
1.2EMULATOR DEFINED
MPLAB® REAL ICE™ IN-CIRCUIT
EMULATOR USER’S GUIDE
The MPLAB REAL ICE in-circuit emulator is an in-circuit emulator that is controlled by
a PC running MPLAB IDE software on a Windows
in-circuit emulator is an integral part of the development engineer's toolsuite. The
application usage can vary from software development to hardware integration to
manufacturing test to field service.
The MPLAB REAL ICE in-circuit emulator is a modern emulator system that supports
hardware and software development for selected Microchip PIC
(MCUs) and dsPIC
Serial Programming™ (ICSP™) programming capability and Standard DUT
Programming (STDP) 2-wire serial interfaces.
The emulator system will execute code in an actual device because these Microchip
devices have built-in emulation circuitry, instead of a special emulator chip, for
emulation. All available features of a given device are accessible interactively, and can
be set and modified by the MPLAB IDE interface.
The MPLAB REAL ICE emulation concept has these features:
• Processors run at maximum speeds
• Debugging can be done with the device in-circuit
• No emulation load on the processor bus
• Simple interconnection
• Capability to incorporate I/O port data input
• Trace (MPLAB IDE and Compiler Assisted) – 8 and 16-bit devices
• Hardware Trace – 32-bit devices
In addition to emulator functions, the MPLAB REAL ICE in-circuit emulator system also
may be used as a development programmer.
®
Digital Signal Controllers (DSCs) that are based on In-Circuit
A simplifi ed desc ripti on of how t he MPL AB REAL ICE i n-cir cuit em ulator system works
is provided here. It is intended to provide enough information so a target board can be
designed that is compatible with the emulator for both emulation and programming
operations. The basic theory of in-circuit emulation and programming is described so
that problems, if encountered, are quickly resolved.
• Tool Comparisons
• Emulator Communications with the PC and Target
• Ta rget Comm uni ca tio n Conne cti ons
• Trace Connections
• Debugging with the Emulator
• Requirements For Debugging
• Programming with the Emulator
• Resources Used by the Emulator
MPLAB® REAL ICE™ IN-CIRCUIT
EMULATOR USER’S GUIDE
Chapter 2. Operation
2.2TOOL COMPARISONS
The MPLAB REAL ICE in-circuit emulator system is a next generation In-Circuit
Emulator (ICE) system. It differs from classical in-circuit emulator systems in a single,
but important way: the production device and emulation device are the same. This
means that the actual device/emulated device differences are all but eliminated. For
example, speed bottlenecks caused by bringing internal busses off-chip and using
external memories on classical emulator systems are eliminated by using the actual
device for emulation.
Another significant benefit is that there is no time lag from when the device is released
to when an emulator module to support the device can be released. If a header board
is required, it can be developed to coincide with the device release, or lag it by a small
amount, which is a great improvement over the longer processor module development
times.
The MPLAB REAL ICE in-circuit emulator system surpasses in-circuit debugger
systems in speed and functionality (e.g., trace).
The MPLAB REAL ICE in-circuit emulator system consists of these 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
• Driver board and modular cable(s) to connect the emulator pod to an ICE header
or target board
FIGURE 2-1:BASIC EMULATOR SYSTEM
The emulator communicates with the PC and is powered through the USB cable.
The emulator communicates with the target through the configurations discussed in the
following sections.
CAUTION
Do not connect the hardware before installing the software and USB drivers. Also, do
not change hardware connections when the pod or target is powered.
2.3.1Standard Communication
The emulator system can be configured to use standard communication for both
programming and debugging functions. This 6-pin connection is the same one used by
other Microchip in-circuit debuggers.
The standard driver board is plugged into the emulator pod to configure the system for
communication with the target. The modular cable can be either (1) inserted into a
matching socket at the target, where the target device is on the target board
(Figure 2-2), or (2) inserted into a standard adapter/header board combo (available as
a Processor Pak), which in then plugged into the target board (Figure 2-3).
Note: Older header boards used a 6-pin (RJ-11) connector instead of an 8-pin
connector, so these headers may be connected directly to the emulator.
For more on standard communication, see Chapter 12. “Hardware Specification”.
The emulator system can be configured to use high-speed communication for both
programming and debugging functions. This connection allows for higher speed
operations, a longer distance between the emulator and target, and additional tracing
functionality over a standard connection.
The high-speed driver board (from the Performance Pak) is plugged into the emulator
pod to configure the system for this type of communication with the target. The modular
cables can be inserted into matching sockets at the high-speed receiver board, which
is attached via an 8-pin connector into either (1) the target board, with an on-board
target device (Figure 2-4), or (2) the header board (from the Processor Pak), which in
then plugged into the target board (Figure 2-5).
For more on high-speed communication, see Chapter 12. “Hardware Specification”.
FIGURE 2-4:HIGH-SPEED EMULATOR SYSTEM – DEVICE WITH
ON-BOARD ICE CIRCUITRY
FIGURE 2-5:HIGH-SPEED EMULATOR SYSTEM – ICE DEVICE
There are two driver boards available to closely match most application requirements.
The standard driver board can be used to connect to the myriad of demo boards and
applications that contain the RJ11 connector. The high-speed driver/receiver board
combination can be used for high-speed applications, for additional trace features, for
large (several feet) emulator-to-target distances and for noisy environments.
2.4.1Standard Communicat ion 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.
Note: Cable connections at the emulator and target are mirror images of each
other, i.e., pin 1 on one end of the cable is connected to pin 6 on the other
end of the cable. See Section 12.6.2.3 “Modular Cable Specification”.
Section 2.5.2 “SPI Trace
Connections (High-Speed
Communication Only)”.
*
V
DD
VPP/MCLR
PGC
PGD
V
SS
AV
DD
AV
SS
2
1
5
4
3
User Reset
4.7K-10K
Interface
Connector
Application
PC Board
Device
ACTIVE
STATUS
RESETFUNCTION
Emulator Pod
XTAL
2.4.2High-Speed Communication Connection
Using the high-speed driver/receiver board combination, the MPLAB REAL ICE
in-circuit emulator is connected to the target device with an 8-pin interface. The pin
numbering for the connector is shown from the top of the target PC board in Figure 2-7.
Note: Connections from the emulator to the target are shown in
Section 12.7 “High-Speed Communication Hardware”.
FIGURE 2-7:HIGH-SPEED CONNECTION AT TARGET
2.4.3Target 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 (typically 10 kΩ) is
recommended to be connected from the V
strobed low to reset the device.
FIGURE 2-8:STANDARD CONNECTION TARGET CIRCUITRY
In the following descriptions, only three lines are active and relevant to core emulator
operation: pins 1 (V
shown on the above diagram for completeness, but are only sensed, not provided or
controlled, by the emulator.
Be aware that the target V
target low-voltage operation. If the emulator does not sense voltage on its V
2 of the interface connector), it will not operate.
PP/MCLR), 5 (PGC) and 4 (PGD). Pins 2 (VDD) and 3 (VSS) are
DD is sensed by the emulator to allow level translation for
PP/MCLR line to VDD so that the line may be
DD line (pin
Operation
No!
No!
No!
No!
VPP/MCLR
PGC
PGD
1
5
4
Interface
Connector
ACTIVE
STATUS
RESETFUNCTION
Emulator Pod
Not all devices have the AVDD and AVSS lines, but if they are present on the target
device, all must be connected to the appropriate levels in order for the emulator to
operate.
In general, it is recommended per device data sheet that all V
lines be connected to the appropriate levels. Also, devices with a V
PIC18FXXJ devices) should be connected to the appropriate capacitor or other internal
regulator device.
Note: 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.4.4Circuits That Will Prevent the Emulator From Functioning
Figure 2-9 shows the active emulator lines with some components that will prevent the
MPLAB REAL ICE in-circuit emulator system from functioning.
When the emulator is selected as the debug tool, it has several trace capabilities,
depending on the device selected.
2.5.1Native Trace Connections
No additional connections are necessary to use Native trace. The communications
connection will carry the trace information using the PGD/PGC/EMUC/EMUD pins.
However, the selected device must have this feature. If it does not, one of the other
trace methods may be used.
For more on this type of trace, see Section 7.3.3.1 “Native Trace”.
2.5.2SPI Trace Connections (High-Speed Communication Only)
When using high-speed communications, streaming serial trace is an optional trace
available using the device SPI and pins 7 (DA T) and 8 (CLK). Figure 2-10 shows these
additional connections. As with pins 4 (PGD) and 5 (PGC) (Section 2.4.4 “Circuits That Will Prevent the Emulator From Functioning”), do not use pull-up resistors,
capacitors or diodes.
The DAT and CLK lines are intended for use with devices that do not have built-in
debug logic that allows tracing to use the PGD/PGC/EMUC/EMUD pins. The DAT line
connects to either the target device SPI port SDO1 or SDO2. The CLK line connects to
SCK1 or SCK2.
When you dedicate these pins to tracing, then any multiplexed function on these pins
can no longer be used by the application.
For more on this type of trace, see Section 7.3.3.3 “SPI Trace”.
Operation
Interface
Connector
Application
PC Board
5
Device
PORTx
Probe
Connector
6:0
7
10KΩ
ACTIVE
STATUS
RESETFUNCTION
Emulator Pod
7
2.5.3I/O Port T race Connections
Streaming parallel trace is possible using a device 8-pin I/O port and the emulator logic
probe connector. This provides greater trace speed and data quantity, but limits
emulator-to-target distance by the length of the logic probe connectors. Figure 2-11
shows these additional connections.
FIGURE 2-11:PARALLEL T RACE CONNECTIONS
For this trace configuration, seven (7) lines of data and one (1) line for clock are
transmitted. PORTx must be a port with 8 pins that has all 8 pins available for trace.
The port must not be multiplexed with the currently-used PGC and PGM pins.
A basic configuration is shown in Table 2-1: “I/O Port Trace Connection Example”.
Note 1: For pin descriptions, see Section 12.5.4 “Logic Probe/External Trigger Inter-
face”.
2: Use a 10KΩ pull-down resistor.
As in Section 2.4.4 “Circuits That Will Prevent the Emulator From Functioning”,
do not use pull-up resistors, capacitors or diodes on port pins, except as specified.
For more on this type of trace, see Section 7.3.3.2 “I/O Port Trace”.
PIC32 Instruction Trace is only available for PIC32MX MCU devices, and it is the only
type of trace available for these devices. Also, only some PIC32MX MCU devices have
the trace feature. Consult your device data sheet for details.
To use this trace, you will need the following hardware:
• PIC32MX Plug-In Module (PIM) containing a device that supports trace and a
trace port
• PIC32MX Trace Interface Kit (AC244006) containing a 12-inch trace cable and a
trace adapter board
To use the PIC32 Instruction Trace feature, see Section 8.3 “PIC32 Instruction
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. These two steps are directly related to the MPLAB
IDE operations:
1. Programming the code into the target and activating special debug functions
(see the next section for details).
2. Using the emulator to set breakpoints and run.
If the target device cannot be programmed correctly, the MPLAB REAL ICE in-circuit
emulator will not be able to debug.
Figure 2-13 shows the basic interconnections required for programming. Note that this
is the same as Figure 2-8, but for the sake of clarity, the V
emulator are not shown.
FIGURE 2-13:PROPER CONNECTIONS FOR PROGRAMMING
Operation
DD and VSS lines from the
A simplified diagram of some of the internal interface circuitry of the MPLAB REAL ICE
in-circuit emulator pod is shown. For programming, no clock is needed on the target
device, but power must be supplied. When programming, the emulator puts
programming levels on V
PP, sends clock pulses on PGC and serial data via PGD. To
verify that the part has been programmed correctly, clocks are sent to PGC and data is
read back from PGD. This conforms to the ICSP protocol of the device under
development.
2.7REQUIREMENTS FOR DEBUGGING
To debug (set breakpoints, see registers, etc.) with the MPLAB REAL ICE in-circuit
emulator system, there are critical elements that must be working correctly:
• The emulator must be connected to a PC. It must be powered by the PC via the
USB cable, and it must be communicating with MPLAB IDE software via the USB
cable. See Chapter 3. “Installation” for details.
• The emulator must be connected as shown to the V
target device with the modular interface cable (or equivalent). V
also required to be connected between the emulator and target device.
• The target device must have power and a functional, running oscillator. If the
target device does not run, for whatever reason, the MPLAB REAL ICE in-circuit
emulator cannot debug.
PP, PGC and PGD pi n s of th e
SS and VDD are
MPLAB® REAL ICE™ In-Circuit Emulator User’s Guide
• The target device must have its configuration words programmed correctly:
- The oscillator Configuration bits should correspond to RC, XT , etc., depending
upon the target design.
- For some devices, the Watchdog Timer is enabled by default and needs to be
disabled.
- The target device must not have code protection enabled.
- The target device must not have table read protection enabled.
2.7.1Sequence of Operations Leading to Debugging
Given that the Requirements For Debugging are met, these actions can be performed
when the MPLAB REAL ICE in-circuit emulator is set as the current debugger
(Debugger>Select Tool
• The application code is compiled/assembled with the “Build Configuration” list box
on the MPLAB IDE toolbar set to “Debug”. Also, it may be set by selecting
Project>Build Configuration>Debug
• When Debugger>Program
the device’s memory via the ICSP protocol as described above.
• A small “debug executive” program is loaded into the high area of program
memory of the target device. Since the debug executive must reside in program
memory, the application program must not use this reserved space. Some devices
have special memory areas dedicated to the debug executive. Check your device
data sheet for details.
• Special “in-circuit debug” registers in the target device are enabled by MPLAB
IDE. These allow the debug executive to be activated by the emulator.
• The target device is held in Reset by keeping the V
):
.
is selected, the application code is programmed into