What is a project file?

A project file allows you to "link" two files together so that the compiler can use the content from both. Functions from one file can be used in the other allowing you to keep collections of reusable functions separate from your main program. This makes your main program much clearer to read and debug.

Note that when a project is opened all the source C files are closed. Double click on them in the Project window to open them up for editing.

The program that is run by the PICmicro is still main() so don't go defining it in more than one file in the project.

You will see the benefits of project files when you use the LCD screen, as there are a number of functions used to drive the LCD screen that you probably wouldn't want to store in the same file as your main program.

The files that we use in this course, and that we open in MPLAB X IDE are all project files - it's just that many of them only contain one C source file.

MPLAB X IDE project files use a .X folder extention.

Opening the project files

The project files are copied into your user documents area and openned automatically when you click on a link in the course.

Making a project file.

You may also want to make your own projects, so on the right is a guide on how to make a project file.

Project file settings.

Project files save their setings with them when they are used. This allows you to alter options such as assembler and programmer settings for indivual files, without affecting other files, and have the changes saved for next time you use the file. Note that this will change the settings for anyone who uses that specific project file. If you wish to have settings specific to you, and are on a system with multiple users, you may want to create a set of files for your personal use.