Microchip MPLAB programming environment

 

This tutorial will show how to set up a new project in the MPLAB programming environment.

 

First you need to download and install the software described here. When you install it remember to enable 16bit processors because the microprocessor on the opensensor is a 16bit processor.

 

Step 1

When you have installed the MPLAB programming environment and C30 compiler and started the application, you are able to see the file tree and the output window.

Step 2

To set up a new project select the Project Wizard from the Project menu.

Step 3

When you are asked for the device select the dsPIC30f3013 processor.

Step 4

Select the Microchip C30 toolsuite in the language toolsuite dialog.

Step 5

Give your project a name i.e. opensensor and choose the directory where the project should be saved.

Step 6

If you have any existing source files add them. Otherwise select next.

Step 7

Add the Library files

  •     libp30F3013-coff.a
  •     libp30F3013-elf.a

And the Linker script

  •     p30f3013.gld

These files are usually located in the directories:

  • C:/Programs/Microchip/MPLAB C30/lib
  • C:/Programs/Microchip/MPLAB C30/support/gld

Step 8

Create a main.c file with this content and add it to the source files of the project. Press Build All to build the project.

The output window prints build succeeded and your project is compiled.




Department of Electronic Systems | Aalborg University | Niels Jernes Vej 12 | DK-9220 Aalborg | Denmark
Phone: (+45) 9635 8695 | Fax (+45) 9815 1583 | E-mail ies(at)ies.aau.dk
Copyright © 2006 Department of Electronic Systems

Last update:07-07-2008