User manual

Tutorial
© 2008 Microchip Technology Inc. DS51616B-page 43
FIGURE 4-12: PROGRAM HALTED
5. Open a new Watch window to watch the counter variable change value as the
program executes. Select View>Watch
. The Watch dialog opens with the
Watch_1 tab selected. Select “counter” from the list next to Add Symbol, and
then click the button. counter is added to the Watch window. Select “PORTA”
from the list next to Add SFR, and then click the button. PORTA is added to the
Watch window.The selected symbols should now be visible in the Watch window
as shown in Figure 4-13.
FIGURE 4-13: WATCH WINDOW
6. Select Debugger>Run
(or click the Run toolbar button) to run the program once
again. The program will halt at the breakpoint and you will notice that the value
of both variables has incremented by 1.
7. Run again as desired to see the values increase. When done, use Debug-
ger>Reset>Processor Reset (or click the Reset toolbar button) to reset the pro-
cessor.
4.11.3 Setting Multiple Hardware Breakpoints
To set multiple breakpoints, either set numerous single breakpoints as specified in the
previous section or use the Breakpoints dialog (see Section 11.3.1 “Breakpoints
Dialog”). The Breakpoints dialog also allows you to control breakpoint interaction.
Note: If you exceed the maximum allowed number of breakpoints for your device,
MPLAB IDE will warn you.