User manual
MPLAB
®
REAL ICE
™
In-Circuit Emulator User’s Guide
DS51616B-page 32 © 2008 Microchip Technology Inc.
FIGURE 4-1: MPLAB
®
IDE DESKTOP
4.2.1 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 REAL ICE” in the “Microchip Tool
Programmer/Debugger Tool Support” sections should be green.
3. Click OK.
4.2.2 Selecting the Emulator as a Debugger
To select MPLAB REAL ICE in-circuit emulator as a debugger, select Debugger>Select
Tool>REAL ICE. Then:
1. The Output window will open to display connection information. Depending on
the version of MPLAB IDE or the device selected, a message box may appear
indicating that the firmware needs to be updated. MPLAB IDE will automatically
install the new firmware. Also, since different MPLAB REAL ICE firmware is used
for different families of devices, this message box may appear when switching to
a different device.
2. The Debugger menu will show available emulator debug options.
3. A Debug toolbar will appear. Mouseover a button to see a pop-up of its function.
4.3 CREATING THE APPLICATION CODE
For this tutorial, two C programs will be used. The code for each is shown below.
1. Using Windows
®
Explorer, create a project folder.
2. Open an editor window by selecting File>New
. Enter the code for the first
program (counter.c) in this window and save to the project folder.
3. Open another editor window by selecting File>New
. Enter the code for the
second program (timer.c) in this window and save to the project folder.