Programming The Application - Microchip Technology MPLAB ICD 3 User Manual

In-circuit debugger
Hide thumbs Also See for MPLAB ICD 3:
Table of Contents

Advertisement

2. To set multiple software breakpoints, follow the instructions in
Section 5.11.3 "Setting Multiple Hardware Breakpoints".
- There is no breakpoint skidding with software breakpoints, i.e., the program
halts on the breakpoint. This may affect how you see values change in the
Watch window.
- There is a maximum number of breakpoints with software breakpoints, i.e,
although this tutorial only uses two, the number of software breakpoints is
999.
3. The stopwatch is meant to be used with hardware breakpoints. However, you can
use the stopwatch with software breakpoints, but they will be converted to hard-
ware breakpoints as you select them. In the Output window, you will see:
Converting breakpoint types...
Breakpoint type conversion complete.
Follow the steps as specified in Section 5.11.4 "Using the Stopwatch with
Breakpoints".
4. Set the breakpoints to hardware again for the remainder of the tutorial. Select
Debugger>Settings, click on the Configuration tab, click the radio button next to
"Use Hardware Breakpoints" and then click OK.
5.12

PROGRAMMING THE APPLICATION

When the program is successfully debugged and running, the next step is to program
the device for stand-alone operation in the finished design. When doing this, the
resources reserved for debug are released for use by the application.
To program the application follow these steps:
1. Disable the MPLAB ICD 3 in-circuit debugger as the debug tool by selecting
Debugger>Select Tool>None.
2. Enable the MPLAB ICD 3 in-circuit debugger as the programmer by selecting
Programmer>Select Programmer>ICD 3.
3. Optional: Set up the ID in Configure>ID Memory (for devices that support ID
memory.)
4. Set up the parameters for programming on the Programmer>Settings, Program
Memory tab.
5. On the Project toolbar, select "Release" from the Build Configuration drop-down
list. Then select Project>Build All.
6. Select Programmer>Program.
The application should now be running on its own. Press the Reset (MCLR) button on
the demo board to restart the count.
You can modify the program code to wait for a button press before beginning or to
terminate the program. Modifying the program will require you to select the debugger
as a debug tool.
1. Disable the MPLAB ICD 3 in-circuit debugger as the programmer by selecting
Programmer>Select Programmer>None.
2. Enable the MPLAB ICD 3 in-circuit debugger as the debug tool by selecting
Debugger>Select Tool>ICD 3.
3. Edit the counter.c code as desired. (This is left as an exercise for you.)
4. On the Project toolbar, select "Debug" from the Build Configuration drop-down
list. Then select Project>Build All.
5. Select Debugger>Program.
6. Run, step and debug your program as required.
© 2008 Microchip Technology Inc.
Tutorial
DS51766A-page 45

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MPLAB ICD 3 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents