First, download the latest
release of MPLAB, if you don't have it, from Microchip's web site.
As of this writing, version 5.00.00 is Microchip's latest release. EARLIER
VERSIONS WILL NOT WORK!
For the original PicBasic
Compiler to work properly from within MPLAB, you need at least version
1.40a. This version's header files use the full PICmicro name, as is
the Microchip convention. If you do not have 1.40a or greater, see
our upgrade page
for information on how to obtain it.
Install MPLAB and its components. Make
sure you select both MPASM for Windows and MPASM for DOS when installing.
In the following examples, the default installation directory (C:\Program
Files\MPLAB) will be used.
Install the PicBasic or PicBasic
Pro Compiler according to the instructions found in the readme file
on the floppy disk. In the following examples, we assume that
PicBasic Pro has been installed in C:\PBP.
Include the directories
in your system's search path
The next step is to include
both of the install directories within the search path on your system. The
procedure differs depending on the version of Windows running.
Windows 95/98
The search path is specified
in a file called autoexec.bat, that should be located in the root directory
of your C drive (C:\). You can edit the file with a text editor
such as notepad, or run msconfig (Win98 only).
The path statement uses the
format: PATH=path1;path2;.... Add the paths to MPLAB and PicBasic
Pro to the end of the line, separating each path with a semicolon.
An example path statement
is: PATH=C:\WINDOWS;C:\PBP;C:\PROGRA~1\MPLAB.
Notice that the "Program Files" directory must be shortened
to its 8 character DOS equivalent, "Progra~1".
Restart your computer after
making changes to the autoexec.bat file.
Windows NT
In Windows NT, the path statement
is found on the Environment tab of the system properties dialog box.
Right click the My Computer
icon on your desktop and click Properties. Click the Environment
tab.
Find the Path variable in
the System Variables window and click to highlight it. The Variable
and Value textboxes should fill with the Path information.
Add the paths to MPLAB and
PicBasic Pro to the end of the line in the Variable Values text box,
separating each path with a semicolon.
An example path statement
is: %SystemRoot%\System32\;C:\PBP;C:\Program Files\MPLAB
Restart your computer after
making changes to the path variable.

Windows 2000
The path statement is found
in the Environment Variables dialog box. To get there, right-click
the My Computer icon on your desktop and select Properties.
Click the Advanced tab, then
the button labeled Environment Variables.... Find the Path variable
in the System Variables window, highlight the line, and click Edit.
Add the paths to MPLAB and
PicBasic Pro to the end of the line in the Variable Values text box,
separating each path with a semicolon.
An example path statement
is: %SystemRoot%\System32\;C:\PBP;C:\Program Files\MPLAB
Restart your computer after
making changes to the path variable.

Selecting PicBasic as the
language tool within MPLAB
Start MPLAB and
select Install Language Tool under the Project menu. Select microEngineering
Labs, Inc. as the Language Suite. Select the appropriate Tool Name
(PicBasic or PicBasic Pro Compiler). Use the browse button to select
PBC.EXE or PBPW.EXE within the subdirectory where it was installed
as the Executable. Select the Command-line radio button and click OK
to finish up.
Installation of the compiler
into MPLAB is now complete. You can now write, edit, simulate and program
BASIC projects from within MPLAB.
Creating a BASIC project
within MPLAB
To create a BASIC project
within MPLAB, select New Project under the Project menu. Navigate to
the subdirectory into which the PicBasic or PicBasic Pro Compiler was
installed. The project and its associated files must exist in
the compiler's subdirectory in order for all of the include files to
be found. Enter a new project name such as BLINK.PJT and click
OK. The Edit Project window should pop up.
Select the desired processor
type using the Change button next to Development Mode.
Select microEngineering Labs,
Inc. as the Language Tool Suite.
Click on the name of the project
under Project Files and then click the Node Properties button. The
Node Properties window should pop up.
Select the desired Language
Tool for the project (PicBasic or PicBasic Pro Compiler). The rest
of the defaults should be OK so click OK to exit.
Click the Add Node button
to add your BASIC source file to the project, or click OK and File|New
to begin a new source file.
That's all (!!!) there is
to it. You can now select Make or Build to compile your program. |