How Compile and Run a MPLAB's project
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.
Now please launch the Microchip Mplab ide from your 'Start Program'.
Now click on Open Project and select the project where it was decompressed.
In Menu -> Configure -> Select Device please select the device dsPIC33FJ64MC802.
Now in the Menu -> Project -> Select Language Toolsuite select the Microchip C30 toolsuite and its location in the your file system.
Now click on Menu -> Project -> Build All and the project should be compiled.
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.
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.
Program your board clicking on Program button (It should have been appeared after you selected the programmer) Enjoy the kitting effect and a nice stadium choir. :) Look at your serial terminal, you should get the example instruction on the console.
Have fun with it. :D