User manual

MPLAB
®
REAL ICE
In-Circuit Emulator User’s Guide
DS51616B-page 40 © 2008 Microchip Technology Inc.
4.8 SETTING UP THE DEMO BOARD
Before beginning to debug, make sure the Explorer 16 Demo Board is set up properly.
For more information, see the Explorer 16 Development Board User’s Guide”
(DS51589).
4.8.1 Demo Board Settings
Settings for this tutorial should be as follows:
PIC24FJ128GA010 PIM (Plug-In Module) plugged into the board.
S2: “PIM” selected; “PIC” selection for devices soldered onto the board.
J7: “PIC24” selected; the emulator will communicate directly with the
PIC24FJ128GA010 and not the on-board PIC18LF4550 USB device.
JP2: LEDs have been enabled by connecting Jumper 2.
D1 on: Power being supplied to board.
4.8.2 Clock Speed
For data capture and trace, the emulator needs to know the instruction cycle speed.
Based on the previous demo board set up, the target oscillator will be 8MHz. This will
make instruction cycle speed = 8MHz / 2 = 4MIPS.
Select Debugger>Settings
, click on the Clock tab and enter the clock information.
4.9 LOADING PROGRAM CODE FOR DEBUGGING
Select Debugger>Program to program RITut.hex into the PIC24FJ128GA010 on the
Explorer 16 demo board.
During programming, the REAL ICE tab of the Output dialog shows the current phase
of operation. When programming is complete, the dialog should look similar to
Figure 4-10.
FIGURE 4-10: OUTPUT WINDOW – MPLAB
®
REAL ICE™ TAB
Note: The debug executive code is automatically programmed in upper program
memory for MPLAB REAL ICE debug functions. Debug code must be
programmed into the target device to use the in-circuit debugging
capabilities of the MPLAB REAL ICE in-circuit emulator.
Note: If you have trouble programming your device or communicating with the
emulator, unplug the Explorer 16 board and use the Loop-Back Test board
(Section 12.8 “Loop-Back Test Board”) to verify communications. For
additional help, see Chapter 9. “Frequently Asked Questions (FAQ)”.