a new directory called PFILES. Now, go to the directory
where the MPLAB IDE is stored (C:\Program Files\
Microchip\MPASM Suite) and you will see a bunch of files
that start with a “P” and end with an “.inc.” These include
the files the compiler will look for and, for some reason, I
could not get the MPLAB/PICBASIC PRO combination to
find them. I even changed all the recommended path
statements shown on microEngineering Labs’ MPLAB
instruction page and it still could not find them. You can
copy all those Pxxx.inc files into the PFILES directory that
you made, but I suggest you just copy the list below:
This list includes all the MCUs supported by the PICBASIC
PRO sample version, which will make it easier to find these
files later when we create a project in the MPLAB IDE.
Now that everything is installed, we need to set up
the MPLAB IDE to recognize the PICBASIC PRO compiler.
in the MPLAB IDE. Click on the MPLAB Project menu and
select the Project Wizard. You will be walked through several windows, which take you through the following steps:
1) Select a device. Choose the PIC16F690, as that is the
part included in the PICkit 2 Starter Kit.
2) Select a language tool suite. Choose the PICBASIC PRO
3) Create a new project. Use the browse button, and
select the directory where you want to store the project
and all of the files. I suggest you create it as close to C: as
possible, to keep the path name short. Figure 2 shows my
project, entitled “16F690_Blink” in the PBPCode directory
that I created at the root.
4) Add existing files to your project. This is where you may
select one of the PICBASIC PRO sample files that you
wish to use or modify, or maybe an older file that you
wrote. For this example, select the BLINK.BAS file in the
PBPDEMO/SAMPLES directory. Highlight it, and then click
on the Add>> button.
WAIT!!!!! Don’t press the “Next” button, yet. Instead,
use a trick that I found — change to the PFILES directory
you created and select the P16F690.INC file. Then, click
the Add>> button to add it to the project, as well. This will
save you an error later. Finally, next to each file, you will
see a big “A.” Click on that A until it changes to a C. This
will automatically copy these files to your project directory.
Figure 3 shows what your screen should look like.
1) Start MPLAB and select “Set Language Tool Locations”
under the Project menu.
2) Select the “PICBASIC PRO Toolsuite” name.
3) Use the browse button to select PBPDEMOW.EXE in the
PBPDEMO directory where the PICBASIC PRO Demo
version was installed.
5) At this point, you’re done so click the FINISH button.
Odds are that your MPLAB screen is now blank. If so,
■ FIGURE 1. PICBASIC PRO Language Selection.
Figure 1 shows the window you should see
when you complete these steps. By choosing
this path, you are indicating to the MPLAB IDE
where the PICBASIC PRO compiler is located
on your hard drive. Click on the OK button to
accept this, and you are now ready to use the
MPLAB IDE with the PICBASIC PRO demo
version. If you have the full version of PICBASIC
PRO, all the steps are the same except the
PICBASIC PRO will be installed in the C:\PBP
directory, and the file you select in the browse
window is PBPW.EXE.
Now, you are ready to build your first project.
In the MPLAB IDE, all the software files you create
will be connected by a project structure. The easiest
way to do this is to use the Project Wizard utility
May 2008 97