PDA

View Full Version : Just installed PBP and now I'm lost. HELP!!!



kenny_m
- 28th January 2008, 22:32
I just installed the PicBasic Pro Compiler. I opened MicroCode Studio and loaded in a sample program called Lcd.bas that came with the software. All I'm trying to do is to compile the code into an Intel HEX file. When I press the F10 key for compile only, MicroCode Studio starts looking for a programmer and says it can't find the programmer. The F10 key should compile without programming. So why is it looking for a programmer? I'm sure this is a simple problem for you experts but I'm new to this. So any help would be greatly appreciated.

mackrackit
- 28th January 2008, 22:59
Try F9.
I think that is the correct key.

earltyso
- 28th January 2008, 23:02
goto
View/ Compile and Program Options

Make sure that your manually find your compiler ex: C/PBP
and your assembler and programmer

I always just use the "compile" option from the Project menu

Good luck!

Sergeant
- 28th January 2008, 23:52
F10 is compile *and program* - F9 is compile only. Good luck!

kenny_m
- 29th January 2008, 23:16
All your methods worked very well. I had some errors in the program. MicroCode Studio told me which lines the errors were on and what type of error they were. So I went back to those lines and corrected them. Then I tried compiling again and it was successful and it told me how many words it used. It compiled the Basic program into an assembly program. The only problem I have now is how do I compile the assembly program into an Intel HEX file? I have a BK Precision Universal Programmer which uses the Intel HEX file.

duncan303
- 29th January 2008, 23:30
hi

while you are in microcode studio press alt+H then enter

then scroll down and
click on......... installing a programmer............

you should find everything you need

HTH

Duncan

mackrackit
- 29th January 2008, 23:51
All your methods worked very well. I had some errors in the program. MicroCode Studio told me which lines the errors were on and what type of error they were. So I went back to those lines and corrected them. Then I tried compiling again and it was successful and it told me how many words it used. It compiled the Basic program into an assembly program. The only problem I have now is how do I compile the assembly program into an Intel HEX file? I have a BK Precision Universal Programmer which uses the Intel HEX file.

You need to have MPLAB from microchip with the MPASM suite.
View in MicroCode.
PicBasic Options
Assembler tab

That is where you tell MCS where to find MPASM and to output INHX8M,8S, or32.

I think that is what you need.

duncan303
- 30th January 2008, 00:07
You are quite right Dave



That is where you tell MCS where to find MPASM and to output INHX8M,8S, or32.

I think that is what you need.


I misread and therefore misunderstood the question, sorry :o


Duncan

mackrackit
- 30th January 2008, 00:23
You are quite right Dave



I misread and therefore misunderstood the question, sorry :o


Duncan

kenny might be able to make his programmer work directly with MCS. That would save him a step or two:)

kenny_m
- 30th January 2008, 17:46
I tried the ALT-H that duncan303 posted and that just opened the help pulldown menu. Mackrakit, I do have the Microchip MPLAB IDE v7.61. It contains the Application Maestro, MPASMWIN, and Visual Procmd. I have no idea what any of these applications are used for. Can any of these applications be used to create a HEX file? It also has something called Setup MPLAB Tools. I clicked this and a window appeared which allowed me to modify the existing settings. I was afraid to change anything since I didn't know what I was doing. So I just exited without changing anything.

skimask
- 30th January 2008, 17:53
Mackrakit, I do have the Microchip MPLAB IDE v7.61.
They're up to MPLAB 8.01 or something now.


I clicked this and a window appeared which allowed me to modify the existing settings. I was afraid to change anything since I didn't know what I was doing. So I just exited without changing anything.

Shouldn't have to mess with anything in MPLAB.
Open up MCS, hit the preferences/options/whatever, hit the assembler tab, and have it search for MPASM.exe. Should be located in your Microchip/MPLAB subdirectory.

MCS - is a front end for creating PicBasicPro compatible code. It also invokes:

PBPW - which is the inital compiler responsible for compiling the source code created in MCS into assembly code which gets assembled by:

MPASM - which is the final assembly program from Microchip (also invoked from MCS), responsible for create the end result of a HEX file which will get loaded into your PIC via your chosen PIC Programmer.

Get all that?
Both PBPW and MPASM have to be configured in MCS.
Here's my method for setting up a new PC:
1 - The machine is blank, fresh reload, whatever
2 - Load the programmer software for my chosen programmer, in my case, Microchip's PICKIT2...anything else...well, in my opinion, just asking for trouble down the road. And make sure the programmer responds as it should!!!
3 - Install the latest version of MPLAB direct from Microchip and any patches required. And make sure it can find your programmer, which with the PICKIT2, it's a piece of cake.
4 - Install PicBasicPro 2.50. Other than remembering where you put it, you shouldn't need to do much else.
5 - Install Microcode Studio and configure the options listed above to the directories you just got done installing those other items to.
Doing this, you're working from the bottom-up, instead of the top-down. Just seems to work better like that for me, and probably 16 bazillion other people too.

kenny_m
- 30th January 2008, 19:02
That was very thorough. Now I see what all those applications are used for. From reading your post, I think all I have to do is to properly configure MCS and then everything else should fall into place. Now all I have to do is to find the proper configuration settings. Then I can start to have some fun with MCS. I'm sure I'll have a lot more questions when I start writing code. Especially since I'm new to Pic Microcontrollers and the PicBasic language.

Cezar Neto
- 8th February 2008, 20:52
Hello Kenny,

First thing to do before start with this is setup according to the instructions bellow:

Using PBP With MPLAB

The PicBasic Pro Compiler can be used within the MPLAB IDE.

First, download the latest release of MPLAB, if you don't have it, from
Microchip's web site (www.microchip.com). As of this writing, version 7.00
is Microchip's latest release with support for our products.

Install MPLAB and its components. The default installation directory for
MPLAB is C:\Program Files\Microchip. MPASMWIN.EXE is located in the
subdirectory C:\Program Files\Microchip\MPASM Suite.

Install the PicBasic Pro Compiler according to the instructions found in its
readme file. Avoid long directory names or spaces in the installation path.
It is best to install the PicBasic Pro Compiler in its default directory,
C:\PBP.

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. The melabs web site has details on setting the path for
each version of Windows. (http://melabs.com/support/mplab.htm)

Next, setup PicBasic Pro as a language tool within MPLAB. Start MPLAB and
select Set Language Tool Locations under the Project menu. Select the
appropriate Toolsuite Name (PicBasic Pro Compiler) and then Executables.
Use the browse button to select PBPW.EXE within the subdirectory where it
was installed (C:\PBP).

Installation of the compiler into MPLAB is now complete. You can now write,
edit, simulate and program BASIC projects from within MPLAB.

To create a BASIC project within MPLAB, run the Project Wizard under the
Project menu. Select the desired processor. Select the appropriate
microEngineering Labs, Inc. Toolsuite (PicBasic Pro Compiler). Name the
project. Choose the directory where the source file exists. Add the source
file to the project. Click Next, then Finish. You should now be able to
edit the source and build the project.

Hope it helps!

skimask
- 8th February 2008, 21:38
Hello Kenny,
First thing to do before start with this is setup according to the instructions bellow:
..........................................Hope it helps!

Didn't I just say that?
Is there an echo in here?