User manual
Tutorial
© 2008 Microchip Technology Inc. DS51616B-page 45
4.11.4 Using the Stopwatch with Breakpoints
To determine the time between the breakpoints, use the Stopwatch.
FIGURE 4-16: STOPWATCH DIALOG
1. Click Stopwatch (on the Breakpoints dialog) to open the Stopwatch dialog.
FIGURE 4-17: STOPWATCH DIALOG
2. Under “Start Condition”, click Select Start Condition and choose the first break-
point. Then uncheck “Start condition will cause the target device to halt”.
3. Under “Stop Condition”, click Select Stop Condition and choose the second
breakpoint. Then check “Stop condition will cause the target device to halt”.
4. Check “Reset stopwatch on run”.
5. Click OK.
6. Run the program until it halts. In the Output window, on the REAL ICE tab, the
number of cycles between the two instructions should be shown as:
Stopwatch cycle count = 3
7. Clear both breakpoints from the code by deleting them from the Breakpoints dia-
log, double-clicking on each line to remove them, or right clicking on each line
and selecting “Remove Breakpoint”. You can also right click and select
Break
points>Remove All Breakpoints to remove both at once.