EasyManuals Logo

Microchip Technology PICkit 2 User Manual

Microchip Technology PICkit 2
53 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #40 background imageLoading...
Page #40 background image
PICkit™ 2 Debug Express
© 2006 Microchip Technology Inc. DS51553B-page 35
4.2.10 Debugging the PIC16F917 Debug Demo Code
Any of the following issues can prevent the PIC16F917 Debug Demo program from
working properly:
The A/D converter value is not being written properly to the Delay routine.
The A/D converter is not enabled or has not been set to convert.
A typing error in the source code has caused the program to function improperly.
To explore the first listed possible issue, set a breakpoint at the line of code that writes
the value of the A/D result to the high-order Delay byte:
1. Highlight the following line of code in the PIC16F917 Debug Demo.asm file:
movwf Delay+1”, as shown in Figure 4-21.
At this breakpoint, the program will stop once the A/D conversion has completed.
2. Right click to display a drop-down menu.
3. Select Set Breakpoint from the drop-down menu.
The program marks the line with the letter B in a red octagon outline, as shown
in Figure 4-21.
FIGURE 4-21: BREAKPOINT
4. Select Debugger > Run
, or click the Run button to run the program in Real-Time
mode.
A breakpoint stops a program’s execution when the program executes the line
marked as a breakpoint.
5. Hover over “ADRESH” in the listing file and it will show the value of the file
register (see Figure 4-22).

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Microchip Technology PICkit 2 and is the answer not in the manual?

Microchip Technology PICkit 2 Specifications

General IconGeneral
BrandMicrochip Technology
ModelPICkit 2
CategoryMotherboard
LanguageEnglish

Related product manuals