DV164120 Microchip Technology, DV164120 Datasheet - Page 48
![KIT STARTER PICKIT 2](/photos/9/26/92655/dv164120_board_sml.jpg)
DV164120
Manufacturer Part Number
DV164120
Description
KIT STARTER PICKIT 2
Manufacturer
Microchip Technology
Series
PICkit™ 2r
Type
Microcontrollerr
Datasheet
1.PG164120.pdf
(86 pages)
Specifications of DV164120
Contents
Board, PICkit™ 2 Programmer, Cable, CD
Processor To Be Evaluated
PIC family
Data Bus Width
8 bit, 16 bit, 32 bit
Core Architecture
PIC
Ic Product Type
Programmer
Kit Contents
Hardware, Cables, Literature And Software
Ic Interface Type
USB
Supported Families
PICmicro
Rohs Compliant
Yes
Development Tool Type
Hardware / Software - Starter Kit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
PIC Micro® MCU
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
For Use With
8/14/20-pin PICmicros
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
DV164120
Manufacturer:
MICROCHIP
Quantity:
12 000
DS51553E-page 44
4.5.8
The PICkit 2 Debug Express executes the program code in either real-time (Run) or in
steps (Step Into, Step Over, Step Out, Animate.) Real-time execution occurs when you
select Run in MPLAB IDE. When the program is halted, either by Halt or at a
breakpoint, you can step through the code.
The following toolbar buttons can be used for quick access to commonly used debug
operations:
To run the demo code:
1. Double click on the 16F887Demo.asm file from the Project window or select
2. Select Debugger>Run or click Run.
3. Turn the potentiometer (RP1), located on the demo board, and observe the
If the program were working properly, the LEDs would rotate faster or slower depending
on in which direction the potentiometer is turned. However, a bug has been intentionally
placed in the code for debugging demonstration purposes. See
Section 4.5.9 “Debugging the PIC16F887 Debug Demo Code” for debugging
instructions.
4. Select Debugger>Halt or click Halt to stop the program execution. A green solid
5. Select Debugger>Reset>Processor Reset to reset the program. The arrow will
4.5.9
Any of the following issues can prevent the PIC16F887 Debug Demo program from
working properly:
1. The A/D converter value is not being written properly to the Delay routine.
2. The A/D converter is not enabled or has not been set to convert.
3. A typing error in the source code has caused the program to function improperly.
To explore the issue listed first, set a breakpoint at the line of code that writes the value
of the A/D result to the high-order Delay byte:
1. Place the cursor on the following line of code in the 16F887Demo.asm file:
2. Either right click on the line to display a drop-down menu and select
File>Open from the toolbar menu. The code will appear in a File window.
LEDs.
arrow will mark the line of code in the File window where the program halted.
disappear, meaning the device is Reset.
movwf Delay+1, as shown in Figure 4-19.
At this breakpoint, the program will stop once the A/D conversion has completed.
“Set Breakpoint” or double click on the line. A breakpoint symbol will appear next
to the line as the letter B in a solid red octagon, as shown in Figure 4-19.
Running the PIC16F887 Debug Demo
Debugging the PIC16F887 Debug Demo Code
Debugger Menu
Step Over
Step Into
Step Out
Animate
Reset
Run
Halt
Toolbar Buttons
© 2008 Microchip Technology Inc.