Using dsPIC30F Devices
©
2006 Microchip Technology Inc.
DS70099D-page 27
2.7.2
Step the Program
1.
Press <F7> to single step the code. The green arrow now points to the code at
__reset
in the
Tut6014A.s
source code as shown in Figure 2-17.
2.
Right click the line of code
mov w0,LATD
and choose Run to Cursor. The green
arrow then points to the line
mov w0,TRISD
, because it has executed the prior
lines of code up to and including
mov #0xFFF0,w0
.
FIGURE 2-17:
SOURCE CODE WINDOW
3.
From the View menu, select Watch to open a Watch window (Figure 2-18).
4.
From the Add SFR pull-down list, display TRISD.
5.
Click Add SFR to add the TRISD register to the Watch window.
6.
Next, select PORTD from the pull-down list and click Add SFR.
7.
Press <F7> a few times and watch the values of TRISD and PORTD SFRs
change.
FIGURE 2-18:
WATCH WINDOW DISPLAY
Note:
The value displayed for PORTD may be different on your system
depending on what load is on PORTD.