Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Procedure for creating a new MPLAB MCC18

project:
Open MPLAB
Open Project->Project Wizard
Select device
PIC18f452 or PIC18f4520, depending on
what's in your lab kit
Under Active Toolsuite, select Microchip C18
Toolsuite
Locate the appropriate executables in the
Toolsuite Contents pane
for each executable:
select the name
click Browse
find the executable
in
the
C:\Program
Files
(x86)\Microchip\ MPASM Suite for
mpasmwin.exe
in
C:\Program
Files
(x86)\
Microchip\mplabc18\v3.44\bin for
the others
make sure to select an executable with
the same name as the one listed
Create new project file or modify existing project
add some source files (optional, you can do this
later)
in your C source, make sure to #include
<p18f4520.h>
Once finished with the Wizard, open View->Project
Right-click on the Linker Script folder in project
view
Select Add Files
Browse to c:\mcc18\lkr\18f452.lkr
for
452s,
or
C:\Program
Files
(x86)\Microchip\mplabc18\v3.44\b
in\LKR\18f4520_g.lkr for 4520s
Click Open
Open Project->Build Options->Project
Select the Directories tab

Under the "Show directories for" drop-down, select


Include Search Path
Click New
Click the "..." that just appeared, and
browse
to
C:\Program
Files
(x86)\Microchip\
mplabc18\v3.44\h
Under the "Show directories for" drop-down, select
Library Search Path
Click the "..." that just appeared, and
browse
to
C:\Program
Files
(x86)\Microchip\
mplabc18\v3.44\lib
Click OK
Now you can build the project under Project->Build
All or pressing F10 on the keyboard

You might also like