:: Installing PicBasic and MPLAB ::

"PicMate"
                    PicBasic Pro/PicBasic Editor

Features

File                     Edit             Search       Options 
New                    Undo            Find           Word Wrap Off
Open                   Cut                                Splitter On
Save                    Copy
Save As               Paste
Print
Exit

Compiler                  External        Help
Programmer             User sets      About
Compile                   up this         Creative 
Tools                       feature.
Debug
Use PBP Compiler
Use PBC Compiler

Here's a screen capture of the PicMate Pro Editor:
PicMate now can now be used with PicBasic Pro or PicBasic compiler.
(Menu descriptions at bottom of page)


Notice the lower section of the editor screen.  The results of each compiler session
are shown in this lower window to indicate success or errors during compile time.
If an error is found in your code at compile time, the editor will highlight the first
error and move the cursor to the proper line in the editor window. To  automatically 
move the cursor to the next error, simply click the next error message in the compiler
window.

When you first install PicMate you'll need to setup your preferences.  Your
preferences will automatically be loaded each time you start PicMate after
the initial set-up. PicMate comes archived with two directories.

1. PMP    This is the directory where PBP preferences are stored.
2. PMC    This is the directory where PBC preferences are stored.

If you are using PicMate in PBP mode all your preferences will be automatically
stored in the proper directory, the same is true if your using the PB compiler.
This allows you to have two different setups for each compiler.
 

Note: PicMate uses the picbasic compiler executable for Windows.  This is named
pbpw.exe, and supports more of the PIC microcontrollers than the DOS compiler
named pbp.exe.  PicMate will automatically assume you have this file installed in
your picbasic directory and launch the Windows version ( pbpw.exe) of the picbasic
compiler each time you compile your source code.  You can see in the results section
of the screen capture above that PicMate launched the file named pbpw.exe using the
switch -p12c671 to compile the file named onint2.bas.

PicMate uses PBC.exe if the editor is in PBC mode. The most economical system is
to keep PBP and PBC in seperate directories for ease of use. Otherwise both compilers
operate in exactly the same manner with either compiler.
 
 

Setting-up PicMate:

Step 1:

The first step is to download the editor, and unzip the files into a temporary directory.
Here are the files for both the picbasic pro version, and picbasic version.

 PicMate Pro: (For the PicBasic Pro Compiler).
 

Once you have downloaded the version you need --- unzip the files to a directory
of your choice.
 
 

Step 2:

Start PicMate by clicking on the file named PicMatePro.exe  located in the
directory that PicMate was installed in.

Once you have the editor running, the default settings will need to be changed so
PicMate can start-up each time with your preferred settings.  The settings you need
to configure are stored in a text-based file named PicMate.ini.  When you start PicMate,
this file is read by the software, and your preferred settings are activated.  Here are the
settings PicMate will let you change:

1. The directory where your picbasic compiler is located, (Compiler Path).
2. The directory path to the EPIC programming software, (Programmer Path).
3. The directory where your picbasic source code is stored, (Source Code Directory).
4. Compiler options, (Command Line Switches).
5. Editor screen fonts & colors.

The tool-bar on the top of the PicMate screen allows quick access to the different
settings that you're allowed to change and save.



 

Use the tool-bar to set-up your preferences.  The icon (shown above) that resembles
tools will bring up the Tool Options window (shown below).  This window will let you
set the default directories for the picbasic compiler, EPIC programming software,
source code directory, and even let you change the default screen fonts & colors.

The screen for the tool options is pretty self explanatory, but here's a screen-shot
showing the different options:

Once you have entered the information as shown above (depending of course on
where your own files are actually located), PicMate will save each option, and know
where your files are located each time you start PicMate.  The path to the picbasic
compiler and EPIC programmer software will let PicMate launch each one directly
from PicMate while you're working on your code.

The source code path will direct PicMate to your source code when you open new
files, and save you the time of looking for your source code directory each time you
open a new file.
 
 

Source Code Directory
This is where you keep your source files.
Using a separate directory for you source files is
highly recommended because not only are they easier to 
backup to prevent loss of valuable code, but because this
program saves a file in the compiler directory when the
compile button is pressed. So if you have a file named
test.pbp in the editor and press the compile button it writes
a file named test.pbp in the compiler directory thus overwriting
the original code. So don't keep your source in the compiler
directory. YOU HAVE BEEN WARNED..........This can also be a
blessing if you lose your code directory. You have the last
compiled basic code saved in the compiler directory.
 
 

The compiler options box lets you set-up any command-line switches for use with the
picbasic compiler.  For more information on command-line switches with picbasic,
refer to the picbasic users manual.

Note:  By default, picbasic will compile basic files targeted for the PIC16F84 unless you
use the command-line switches to tell picbasic that you're compiling a file for another PIC.
You (do not) have to add these command line switches in the Compiler Options window.
PicMate will automatically insert the switches to compile for whatever PIC you have selected
in the PIC selection window.

The Compiler Options window is only if you want to use the compiler Command Line
Options for adding additional compile-time options as indicated in the picbasic users manual.
Refer to the manual for explanations on these other options.

Set Fonts & Screen Colors:

With the tool-options window still open --- you can also change the screen colors, and fonts.
The two command-buttons on the lower right section of the tool-options form will bring up
windows that allow you to change the default screen fonts & colors.  Once you're finished,
select the close button.
 
 

Step 3:

Once you have told PicMate where your compiler, EPIC programming software,
source code files are located, and set-up your choice of screen fonts & colors,
it's time to exit & restart PicMate.

When PicMate reloads, it will automatically load your saved preferences, and know where
the compiler, EPIC programming software, and your source code is located.  Your selected
fonts & screen colors should also be in effect now..

Test PicMate:

When you re-start PicMate, open a picbasic file by selecting file, then open from the top file
menu.  If you set-up PicMate correctly, you'll see a window similar to the one below waiting for
you to make your file selection:

 

Once you have opened your picbasic file, it's time to try compiling the file using the
compiler button on the top tool-bar.  The compiler button icon is the red check-mark
on the tool-bar (shown below).

Note:  Be sure to select the specific PIC that you're compiling the picbasic source
code for.  The drop-down menu (shown below), lets you quickly select the target PIC
you're compiling the code for.

 

The window on the tool-bar shows the PIC selected as well as the source code
filename you currently have open.  Notice to the right of the PIC selection window
that onint2.bas is shown.  I really like this feature John added since it's fast &
easy to see the file name with its associated target PIC.

If your source code compiled OK, you're almost finished.  If something went wrong,
re-trace your steps as outlined above to make sure you told PicMate the (exact path)
to your picbasic compiler files.

If your source code compiled without any problems, you're ready to test the
Programmer-button.  This is a real no-brainer.  Just click the programmer-button
icon that looks like a small IC (shown above) to the left of the red check-mark.
This button will launch the EPIC programming software.  If the EPIC programming
software screen pops-up, you're finished.  If not, go back to the beginning to see if
you entered the (exact path) to your EPIC programming software.
 

Additional Features:

John added the really nice feature of a communications terminal that allows you to
send/receive serial data.  Here's what it looks like:

 

The serial debugger window is pretty handy.  It can be used with a stand-alone PIC
communicating with your PC, or the debug command built-in to the picbasic pro
compiler.

This feature doesn't really need much explanation, but it's extremely handy.  If you're
new to RS-232 (serial) communications, browse around our site here.  We have
several complete projects that explain how to handle serial communications
between microcontrollers and the PC.
 

Tips:

1. How to make PicMate start with your choice of PIC selected.

The first line of the PicMate.ini file loads the default PIC to be programmed.  This can
be seen in the PIC selection window on the PicMate screen.  This first line of the
PicMate.ini file (as shown below) can be modified to automatically load any PIC
by default when you start PicMate.  If you work with a specific PIC such as the
PIC16F84 more than others, this can save you even more time.

12C671        ; Default PIC to load on start
C:\Micros\pbp ; Default path to compiler
C:\Micros\pbp ; Default path to EPIC software
C:\Micros\pbp ; Default path to source code files
16316664      ;
-2147483640   ; Screen colors
Monospac821 BT; Screen font
8             ; Font size
False
58
True

The first line can be edited to load you choice of PIC when PicMate first starts.  If you
prefer the PIC16F84, just replace the first line with the name of this PIC.

Example:  16F84 in the first line will load the PIC16F84 as your default. For the
PIC16F877, just enter 16F877.

2. How to add new PICs (supported by PicBasic) to PicMate

MicroEngineering Labs is constantly updating the picbasic compiler to support each
new PIC almost as quickly as Microchip can pump them out.  John has made PicMate
extremely simple to update for support of new PICs as they are added.

The file named micros.ini located in the same directory that PicMate was installed to,
holds the name of each PIC supported by the compiler.  To add another PIC, simply
place the number for that device in the file micros.ini. PMP directory contains micro's 
supported by PicBasic Pro. PMC directory contains micro's supported by PicBasic 
Compiler.
 

3. Re-arrange the order of PICs in the list

You can also re-arrange the order each PIC shows up in the PIC selection window by
re-arranging the PICs in the micros.ini file as shown below.

begin
*12C672
*16F873
*16F84
*12C508
*12CE518
*12CE519
*12C671
end

This can be handy if you work with a specific group of PICs by grouping the ones you
use most often together.  This makes selecting from your group quicker by eliminating
the long list of PICs you would otherwise have to scroll through.

Open the micros.ini file and examine it.  You'll see how simple it is to add each new PIC
to the list or re-arrange them to best suit your specific requirements....

Note: Remember to exit PicMate and re-start it each time you modify one of the ini
files.  PicMate will read each of these ini files when it is started, and load the values
in the ini files, or if you wish to update the current ini files while the editor is running
simply open the tools window, and click the "Close" button this saves the current ini
files, and updates the editor with the new ini files on the fly. If you change your ini files
without saving them as mentioned above and  switch compilers you new setting will
be lost and the old ini files will be loaded the next time the editor is executed.
 
 
 
 
 

Menu descriptions

The File, Editor and Search menu's are pretty much self explanatory.

Option- Word Wrap Off    This toggles on the word wrap features
of the editor, for people who like long comment lines.

Option- Splitter On  This locks down the Splitter bar attached to the
compiler window. Simply find the size you desire for the compiler 
window and lock it there to prevent any accidental movement.

Compiler- Programmer  Launches the EpicWin Programmer.

Compiler-Compile  This will compile the code in editor window.

Compiler-Tools  Bring up the Tools option window.

Compiler-Debug  Launches serial window

Compiler-Use PBP Compiler  Use PicBasic Pro Compiler

Compiler-Use PBC Compiler  Use PicBasic Compiler

External-Used to launch  external programs from PicMate.
 
 

External.ini
c:\windows\@notepad.exe
c:\windows\@Calc.exe
D:\MyPicEditor1\PBPro\Help\@Helper.exe
Empty
Empty
Empty
Empty
Empty
Empty
Empty

The user may run up to 10 external program from the PicMate Pro editor.
Simply enter in the PATH of the executable file or .bat file with the exception
of @ sign entered at the beginning of the program name. 
This feature comes in handy if you using a different burner hardware or software.
See above example.