User manual
MPLAB
®
ICD 3 In-Circuit Debugger User’s Guide
DS51766A-page 30 © 2008 Microchip Technology Inc.
5.2 SETTING UP THE ENVIRONMENT AND SELECTING THE DEVICE
Before beginning this tutorial, follow the steps in Chapter 3. “Installation” to set up the
MPLAB IDE software and MPLAB ICD 3 system hardware. Double click on the MPLAB
IDE icon to launch the application. Once launched, the MPLAB IDE desktop should
appear.
FIGURE 5-1: MPLAB
®
IDE DESKTOP
Selecting the Device
To select the device for this tutorial:
1. Select Configure>Select Device
.
2. In the Device Selection dialog, choose “PIC24FJ128GA010” from the Device list
box. The light icon next to “MPLAB ICD 3” in the “Microchip Tool
Programmer/Debugger Tool Support” sections should be green.
3. Click OK.
5.3 CREATING THE APPLICATION CODE
For this tutorial, two C programs (counter.c and timer.c) will be used. The code
for each is shown below.
1. Using Windows
®
Explorer, create a project folder and directory, for example,
C:\Projects\ICD3Tut.
2. Open an editor window by selecting File>New
. Enter the code for the first
program (see text for counter.c) in this window and save to the
project\directory folder.
3. Open another editor window by selecting File>New
. Enter the code for the
second program (see text for timer.c) in this window and save to the
project\directory folder.