PICkit™ 2 User’s Guide
DS51553B-page 36 © 2006 Microchip Technology Inc.
FIGURE 4-22: ADRESH REGISTER VALUE
6. Adjust the POT and continue the program by selecting Debug > Run
. The
program will run through the loop and halt.
7. Hover over “ADRESH” again, the A/D result has not changed. Thus it seems the
A/D conversion is not working. The A/D conversion initialization and setup occurs
at the beginning of the program.
FIGURE 4-23: PROGRAM HALTED
8. Select Debugger > Reset
to reset the program. The first instruction should be
indicated by a green arrow.
9. Select View > Watch
to open a new Watch window. This window allows the user
to watch the A/D register value change as the program executes. The Watch
dialog opens with the Watch_1 tab selected, as shown in Figure 4-24.