Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 15th September 2007, 07:24 AM   (permalink)
Default Advice on MPLAB v7.40 please

I have MPLAB v7.40 and have written many successful programmes, but I would like to know if there is an easier way to create a new project than the following:-

Select Project/New

Enter project name eg. "test"

Click on "Browse" and select a folder.

A small window "test.mcw" appears with a folder "test.mcp" and several sub folders such as "Source files".

So far so good.

But how do I start a source code file?

I've tried various methods to achieve this end, but the only one that works is as follows:-

Click on the "New file" icon in the Toolbar.

A window appears "MPLAB IDE Editor" with "Untitled" in the top left corner.

I then type in the code.

But if I press button F10 to assemble, a "Save as" window appears, so I type in the file name, eg. "test" and click on

"Save".

The following message appears:-

"Build aborted. The project contains no source files"

However, the "Untitled" tag changes to "test.asm".

Now if I right click on the "Source file" folder in the "test.mcw" window and add the "test.asm" file, I can press F10

and then the code will assemble successfully.

This seems to be a clumsy procedure, is there a simpler method?

Any advice will be appreciated.
__________________
Len
ljcox is offline  
Old 15th September 2007, 07:45 AM   (permalink)
Default

Len,

Try Projects/Add new file to project... and type filename.asm in the box.
This is in version 7.6 but I think it was the same in 7.4

Mike.
Pommie is offline  
Old 15th September 2007, 08:42 AM   (permalink)
Default

I find it easier to create a new folder for my project, copy a template asm file for my microcontroller to there and rename it to suit my new project.

Then open mplab, create a new project, browse to my new folder and add my asm file to the project.

That ensures that my new asm files will have a standard header etc. at the start.
picasm is offline  
Old 15th September 2007, 10:28 AM   (permalink)
Default Add, that simple!

Add file to project, as Pommie says.

Just in case, I still work in absolute mode (no flaming please!).

In my case, I have another 15 to 20 files INCLUDEd in that one.
__________________
Agustín Tomás
In theory, there is no difference between theory and practice. In practice, however, there is.
atferrari is offline  
Old 15th September 2007, 12:57 PM   (permalink)
Default

I prefer using the Project Wizard as it presets the processor type, language toolsuite, file/folder locations, etc. Then I "open" an existing template 'asm' file, do a "save as" to the new project folder, and "add file to project". The whole process takes less than a minute.

Good luck. Mike
Mike, K8LH is offline  
Old 15th September 2007, 01:39 PM   (permalink)
Default

Quote:
Originally Posted by Mike, K8LH
I prefer using the Project Wizard as it presets the processor type, language toolsuite, file/folder locations, etc. Then I "open" an existing template 'asm' file, do a "save as" to the new project folder, and "add file to project". The whole process takes less than a minute.

Good luck. Mike
hi,
This is way I also start a new project, then open the source window and add a suitable header file.
I know that the templates for each PIC can be found in the MPLAB folders, but I prefer to use my own header file as it has my include files and other details.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Old 15th September 2007, 04:07 PM   (permalink)
Default

From the open asm. file you can select Project-Quickbuild(your filename) and that's it, i always only use Quickbuild.
OY2L is offline  
Old 16th September 2007, 10:40 AM   (permalink)
Default

Thanks for the advice.
I decided to use the method posted by Mike and Eric, ie. use the Wizard.

I discovered that at Step 4, I can copy the template and then change its filename, which is what I expect Mike meant by "save as"
__________________
Len
ljcox is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Inchworm Problem mouse9911 Micro Controllers 9 19th May 2007 01:01 AM
Debugging 877A with MPLAB williB Micro Controllers 10 7th May 2007 04:53 PM
Need help badly on Inchworm and MPLAB thushy Micro Controllers 14 11th March 2007 07:05 PM
Some Question About Inchworm Ayne Micro Controllers 29 7th March 2007 04:08 AM
Inchworm project started williB Micro Controllers 69 5th March 2007 07:56 PM



All times are GMT. The time now is 06:30 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker