User manual

MPLAB
®
REAL ICE
IN-CIRCUIT EMULATOR
© 2008 Microchip Technology Inc. DS51616B-page 67
Chapter 7. Debug for 8- and 16-Bit Devices
7.1 INTRODUCTION
The following debug functions are specific to 8- and 16-bit devices.
Data Capture and Runtime Watches
•Trace
7.2 DATA CAPTURE AND RUNTIME WATCHES
Data capture provides streaming data from a device to the following:
Data Monitoring and Control Interface (DMCI) – Tools menu
A runtime watch provides updating of a variable in the following windows during
program execution instead of on halt:
Watch – View menu
File Register – View menu
Special Function Register (SFR) – View menu
Data captures and runtime watches use the same resource. Therefore, setting one or
both uses the resource for the selected symbol.
To set up data captures and/or runtime watches:
1. Select View>Watch
to open the Watch window to set up data capture and/or runt-
ime watches for specific data addresses. See Section 11.3.9 “Watch Window -
Data Capture/Runtime Watch” for more information.
2. Select Debugger>Settings
and click the Clock tab. For data capture and trace,
the emulator needs to know the instruction cycle speed. (See
Section 11.5.6 Settings Dialog, Clock Tab” for more information.) Enter your
information here.
3. Rebuild the project (Project>Build All
) and reprogram the target device
(Debugger>Program
).
4. Run the program. View the data in a DMCI window or watch variable values
change in an MPLAB IDE window.
7.3 TRACE
This section will discuss the types of available trace for 8- and 16-bit devices and how
to use them. See Section 11.3.11 “Trace Window” for information on the trace
window.
Requirements for Trace
How Trace Works
Types of Trace
Setting Up the Project for Trace
Setting Up Trace in MPLAB IDE
Running Trace
Tracing Tips
Disabling Trace