Microchip Technology DM300018 Manual De Usuario

Descargar
Página de 115
Getting Started
© 2005 Microchip Technology Inc.
DS51558A-page 17
2.5
DEVICE PROGRAMMING PROCESS
The second phase of the getting-started process introduces the MPLAB Integrated 
Development Environment (IDE) and MPLAB ICD 2 In-Circuit Debugger. The 
emphasis in this phase is to program the sample application into a dsPIC30F4011 
device. After observing the demonstration, this process gets you ready to examine 
what you observed.
2.5.1
Connect MPLAB ICD 2
Follow the information in Figure 2-2 to set up the MPLAB ICD 2 for use as a 
programmer.
1.
With an RJ11 cable, connect the MPLAB ICD 2 to the ICD header (J1) on the 
board.
2.
Use a USB cable to connect the MPLAB ICD 2 to your PC. 
FIGURE 2-4:
MPLAB
®
 ICD 2 CONNECTION DIAGRAM
2.5.2
Setting up MPLAB IDE
The sample application program files on the dsPICDEM 2 CD contain a workspace and 
project information needed by MPLAB IDE, MPLAB ICD 2 and MPLAB C30.
The first step is to open the sample application project in MPLAB IDE.
A project contains the files needed to build an application (source code, linker script 
files, etc.) along with their associations to various build tools and build options. A work-
space contains information on the selected device, debug tool and/or programmer, 
open windows and their location, and other MPLAB IDE configuration settings.
1.
Start MPLAB IDE.
2.
From the 
File menu select Open Workspace>[path], as shown in Figure 2-5, 
where 
[path] is the location of the sample application files.
Note:
Make sure that the USB driver for the MPLAB ICD 2 has been installed on 
your PC (see the 
MPLAB
®
 ICD 2 User’s Guide, DS51331, for more details 
regarding the installation of MPLAB ICD 2).
1 2 3 4
GP 4
0
GP 2
8
GP 1
8
M AL
L
UART
J2
CAN
J3
H8
H9
1 2 3 4
U2A1
U1A1
U2B1
U1B1
U1C1
1
2
Motor
Control
General
Purpose
MPLAB ICD 2
115 VAC
9 VDC Power Cable
Connect RJ-11 cable to ICD
dsPICDEM™ 2 Development Board 
running dsPIC30F4011 sample 
application 
Connect USB cable to PC
Connect RS-232 cable to 
PC
Apply power to the board
PC running MPLAB
®
 IDE
J1
J2
J4
Note:
These instructions presume the use of MPLAB IDE version 7.11 or newer 
and MPLAB C30 version 1.32 or newer.