How Compile and Run a MPLAB's project

From ErikaWiki

(Difference between revisions)
Jump to: navigation, search
(MPLAB IDE)
(MPLAB IDE)
Line 42: Line 42:
[[File:mplab_start_kit.png|center|thumb|700px| Select '''Starter Kit''']]  
[[File:mplab_start_kit.png|center|thumb|700px| Select '''Starter Kit''']]  
 +
For the Pc communications please open a Serial Terminal (e.g. Putty.exe, HTerm.exe). Configure the port, baud rate (115200),data bits(8 bit), stop bits (1 bit) and parity bits (none). DON'T enable CTS. Connet to the channel.
 +
 +
[[File:minicom.png|center|thumb|700px| Serial communication with EasyLab]]
-
# Open a Serial Terminal (e.g. Putty.exe, HTerm.exe). Configure the port, baud rate (115200),data bits(8 bit), stop bits (1 bit) and parity bits (none). DON'T enable CTS. Connet to the channel.
 
# Program your board ([MAIN TOLLBAR] ->[BUTTON] Program (It should have been appeared after you selected the programmer))
# Program your board ([MAIN TOLLBAR] ->[BUTTON] Program (It should have been appeared after you selected the programmer))
# Enjoy the kitt effect and a nice stadium choir. :)
# Enjoy the kitt effect and a nice stadium choir. :)
# Look at your serial teminal, you should get the example instruction on the console.
# Look at your serial teminal, you should get the example instruction on the console.
# Have fun with it. :D
# Have fun with it. :D

Revision as of 10:22, 31 January 2012

Introduction

To compile and run the example you should download the MPLAB IDE v8.66 or later. Then please download the compiler C30 (a C version compiler for dsPic). For install MPLAB IDE and C30 Compiler please follow the instructions present on the Microchip web site.

EasyLab Project Packet

We take as example the Easylab Software Packet. It contains the follow files:

  • easy-lab-demo-project.mcp: is the MPLAB's project file.
  • easylab.c: is demo library C file.
  • easylab.h: is demo library header file.
  • main.c: is the project main file where is called the library API.
  • cof: is a directory where is placed an programmable cof file ready to be programmed (without compile the project).

Put these files in a your working project directory.

MPLAB IDE

Now please launch the Microchip Mplab ide from your 'Start Program'.

Microchip Mplab ide

Now click on Open Project and select the project where it was decompressed.

Open the EasyLab demo project

In Menu -> Configure -> Select Device please select the device dsPIC33FJ64MC802.

Open the EasyLab demo project

Now in the Menu -> Project -> Select Language Toolsuite select the Microchip C30 toolsuite and its location in the your file system.

Select Language Toolsuite

Now click on Menu -> Project -> Build All and the project should be compiled.

Build the demo project

Now connect your Easylab with miniUSB supply programming cable and USB communication cable at your Pc. Select Starter Kits programmer in Menu -> Programmer -> Select Programmer -> Starter Kits.

Select Starter Kit

For the Pc communications please open a Serial Terminal (e.g. Putty.exe, HTerm.exe). Configure the port, baud rate (115200),data bits(8 bit), stop bits (1 bit) and parity bits (none). DON'T enable CTS. Connet to the channel.

Serial communication with EasyLab
  1. Program your board ([MAIN TOLLBAR] ->[BUTTON] Program (It should have been appeared after you selected the programmer))
  2. Enjoy the kitt effect and a nice stadium choir. :)
  3. Look at your serial teminal, you should get the example instruction on the console.
  4. Have fun with it. :D
Personal tools