Using PICBASIC PRO™ with 18F and 18C PICmicro® MCUs.
When using PICBASIC PRO™ Compiler with the 18 series PICmicro MCUs, you must
use the Microchip assembler, MPASM. This free tool is included on the PBP installation
CD (check the box that installs MPLAB during the install process).
If you don't have the CD or the version from the CD is obsolete, you can
download the assembler here. If you're using MPASM and PBP together for
the first time, follow the installation instructions below. If you already
have a working installation of MPASM, you can replace the existing files with
those included in the download.
Download MPASMWIN 5.20 for Windows
(3080K ZIP)
Download WinZip compression software
in order to extract the files.
Once downloaded, extract the files to an empty folder on your computer
("C:\MPASM"). DO NOT extract the files
into your PBP folder! Make a note of the location that you
extracted to.
Users of MicroCode Studio may skip the rest of this procedure. Use the
Options dialog in your software to select the MPASM assembler and locate the exe
file (mpasmwin.exe).
In CodeDesigner and CodeDesigner Lite, click Compiler Options in the Compile
menu. In the resulting dialog, locate the field labeled "Command Line
Options:". In this space, type "-aMPASMWIN" (without the
quotes) and click OK.
If you invoke PBP from a command line in a DOS prompt, simply add the -a
switch to the command. Example: "PBPW.EXE -aMPASMWIN
-p18F452 blink.bas"
If you use CodeDesigner, CodeDesigner Lite, or a command line to invoke the
compiler, you will need to include the location of MPASM in the PATH environment
variable on your computer, as described below.
Windows 95/98/ME
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 and ME only).
The path statement uses the format: PATH=path1;path2;.... Add the
location of MPASM to the end of the line, separating each path with a
semicolon.
An example path statement is: PATH=C:\WINDOWS;C:\PBP;C:\MPASM
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 location of MPASM 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:\MPASM
Restart your computer after making changes to the path variable.

Windows 2000/XP
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 location of MPASM 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:\MPASM
Restart your computer after making changes to the path variable.

|