Microchip Technology PICkit 3 Starter Kit DV164130 DV164130 User Manual

Product codes
DV164130
Page of 98
PICkit™ 3 User’s Guide
DS51795A-page 54
© 2009 Microchip Technology Inc.
9.3.3
Stopwatch Dialog
Click Stopwatch in the Breakpoints Dialog to display the Stopwatch Setup dialog.
Use the stopwatch with breakpoints to time code execution. The stopwatch allows tim-
ing from one breakpoint/trigger condition to the next. The stopwatch value is in decimal.
To set a breakpoint in code, do one of the following:
• Double click or right click on a line of code to set up an individual breakpoint.
• Select Debugger>Breakpoints to open the Breakpoints dialog and set up multiple 
breakpoints and breakpoint conditions. See Section 9.3.1 “Breakpoints Dialog” 
for more information.
To determine the time between the breakpoints, use the stopwatch:
1.
Open the Breakpoints dialog (Debugger>Breakpoints).
1.
Click Stopwatch on the Breakpoints dialog to open the Stopwatch dialog.
2.
Under “Start Condition”, select a breakpoint from the drop-down list. Also decide 
if “Start condition will cause the target device to halt”.
3.
Under “Stop Condition”, select another breakpoint from the drop-down list. Also 
decide if “Stop condition will cause the target device to halt”.
4.
Decide if there will be a “Reset stopwatch on run”.
5.
Click OK.
9.3.4
Event Breakpoints Dialog
Click Event Breakpoints in the Breakpoints Dialog to display this dialog.
Select a condition where the program will always break:
• Break on Watchdog Timer – Break every time the Watchdog Timer times out. 
Make sure the Watchdog Timer is enabled in the Configuration bits.
• Break on SLEEP instruction – Break when a SLEEP instruction is encountered in 
the program.
TABLE 9-5:
STOPWATCH SETUP
Control
Function
Start Condition
Select an available breakpoint or trigger condition to start the stop-
watch. Available breakpoints/triggers are those previously added 
to the breakpoint dialog.
Select None to clear the start condition. 
To halt the program run on this condition, check the check box next 
to “Start condition will cause the target device to halt”.
Stop Condition
Select an available breakpoint or trigger condition to stop the stop-
watch. Available breakpoints/triggers are those previously added 
to the breakpoint dialog.
Select None to clear the stop condition. 
To halt the program run on this condition, check the check box next 
to “Stop condition will cause the target device to halt”.
Reset stopwatch on run
Reset the stopwatch values to zero every time the program is run.