参数资料
型号: DV164120
厂商: Microchip Technology
文件页数: 48/86页
文件大小: 0K
描述: KIT STARTER PICKIT 2
产品培训模块: Asynchronous Stimulus
标准包装: 1
系列: PICkit™ 2
类型: 微控制器
适用于相关产品: PIC Micro? MCU
所含物品: 板,PICkit? 2 编程器,线缆,CD
产品目录页面: 658 (CN2011-ZH PDF)
PICkit? 2 User’s Guide
4.5.8
Running the PIC16F887 Debug Demo
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:
Debugger Menu
Toolbar Buttons
Run
Halt
Animate
Step Into
Step Over
Step Out
Reset
To run the demo code:
1. Double click on the 16F887Demo.asm file from the Project window or select
File>Open from the toolbar menu. The code will appear in a File window.
2. Select Debugger>Run or click Run .
3. Turn the potentiometer (RP1), located on the demo board, and observe the
LEDs.
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
arrow will mark the line of code in the File window where the program halted.
5. Select Debugger>Reset>Processor Reset to reset the program. The arrow will
disappear, meaning the device is Reset.
4.5.9
Debugging the PIC16F887 Debug Demo Code
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:
movwf Delay+1 , as shown in Figure 4-19.
At this breakpoint, the program will stop once the A/D conversion has completed.
2. Either right click on the line to display a drop-down menu and select
“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.
DS51553E-page 44
? 2008 Microchip Technology Inc.
相关PDF资料
PDF描述
DV164121 KIT PICKIT 2 DEBUG EXPRESS
DV164122 ANALYZER SRL PICKIT W/DEMO BOARD
DV164131 KIT STARTER PICKIT 3
DV164132 KIT EVAL F1 FOR PIC12F1/PIC16F1
DV243003 KIT STARTER FOR SRL MEM PRODUCTS
相关代理商/技术参数
参数描述
DV164121 功能描述:电路内置调试器 PICkit 2 Debug Express RoHS:否 制造商:Microchip Technology 产品:In-Circuit Debugger Kits 工具用于评估:PIC MCUs, dsPIC DSCs 用于:07-00024, AC164113 核心:dsPIC, PIC 接口类型:USB 工作电源电压:3 V to 5 V
DV164121 制造商:Microchip Technology Inc 功能描述:ICPICKIT2 PROGRAMMER/DEBUGGER ((NW))
DV164121+TEFLCST3 制造商:Microchip Technology Inc 功能描述:KIT PICKIT2+FLOWCODE-HOME BUNDLE 制造商:Microchip Technology Inc 功能描述:ICD, PICKIT 2, FLOW CODE, PIC, DSPIC 制造商:Microchip Technology Inc 功能描述:ICD, PICKIT 2, DEBUG EXP, FLOW CODE, PIC, DSPIC; Silicon Family Name:PIC12F6xx, PIC16F5xx; Core Architecture:PIC; Core Sub-Architecture:PIC12, PIC18, PIC24; IC Product Type:Debugger / Programmer; Series:PICkit 2 ;RoHS Compliant: Yes
DV164122 功能描述:界面开发工具 PICkit Ser Analyzer RoHS:否 制造商:Bourns 产品:Evaluation Boards 类型:RS-485 工具用于评估:ADM3485E 接口类型:RS-485 工作电源电压:3.3 V
DV164126 功能描述:开发板和工具包 - PIC / DSPIC USB Kit w/ PICkit LowPinCount RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: