User manual
MPLAB
®
REAL ICE
™
In-Circuit Emulator User’s Guide
DS51616B-page 42 © 2008 Microchip Technology Inc.
4.11.1 Choosing a Breakpoint Type
For the device used in this tutorial, you have the choice of using either hardware or
software breakpoints.
To set breakpoint options, select Debugger>Settings
and click on the Configuration
tab. Select the type of breakpoint that best suits your application needs. For this tutorial,
we will begin using the default breakpoint type (hardware breakpoints.)
4.11.2 Setting a Single Hardware Breakpoint
To set a single breakpoint:
1. Select Debugger>Reset>Processor Reset
(or click the Reset toolbar button) to
reset the example program.
2. Highlight or place the cursor on the following line of code from counter.c:
counter++; //increment counter
3. Double-click on the line, or right click on the line and then select Set Breakpoint
from the shortcut menu. This line is now marked as a breakpoint (B in red stop
sign) as shown in Figure 4-11.
FIGURE 4-11: SET BREAKPOINT
4. Select Debugger>Run
(or click the Run toolbar button) to run the program once
again in Real-Time mode. The program will halt at the line marked by the break-
point, but now there will be a green arrow over the breakpoint symbol.