Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I'm going to choke MPLAB...

Status
Not open for further replies.

Steve P

New Member
Hey guys. Sorry to bug everyone on the weekend/holiday (my international/US friends respectfully), but I'm having a real problem with MPLAB and I can't figure out what I'm doing wrong.

First off, is this really the best program to use for programming? I know you guys recommend to start off with assembler language as a beginning programming language, but MPLAB is giving me a hard time. I just read the MPLAB quickstart quide and after loading the sample/template asm file for my PIC and the corresponding link file, I can't get a successful build. I keep getting the following feedback in the output window:

Clean: Deleting intermediary and output files.
Clean: Deleted file "D:\Projects\ABE\ABE v1.mcs".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F877A "f877atemp.asm" /l"f877atemp.lst" /e"f877atemp.err" /o"f877atemp.o"
Error[129] D:\PROJECTS\ABE\F877ATEMP.ASM 1 : Expected (END)
Halting build on first failure as requested.
BUILD FAILED: Sun Sep 04 18:07:50 2005


Anyone know what I'm doing wrong? I'm using v7.21 and the quick start is for version 6.61.02.


Is there a good tutorial that will break down code sequences? In other words, a tutorial that will explain in detail how program code is accessing and assigning instructions? When I look at asm code, I feel like the biggest idiot. PLEASE HELP!
 
It seems like you are trying to compile blank file?
The error tells us that on line (1) should be located END dirrective (that's the last line of the file).
 
Jay's right, your asm file is empty. I tried assembling an empty file, and I got the exact same output :

Code:
Make: [...]
Error[129]   C:\DOWNLOADS\ELECTRONICS\PROJECTS\STEPPER\STEPPER.ASM 1 : Expected (END)
[...]
BUILD FAILED [...]

Put the code back in the file Steve! :D:p:D
 
You might try just using MPASM?, the MicroChip assembler, MPLAB presumably calls this to actually assemble code, but you can use it on it's own - it's installed as part of MPLAB.

It's FAR easier to do this than to use MPLAB, which seems very over complicated?.

Simply write your code in a text editor (Notepad is fine) and save it with a .ASM filename. Then simply run MPASM, select that filename, and press assemble! - job done!.
 
thanks guys. i thought my asm had code in it as i was using an asm template that was in the program....ah well...idiot move of the week.

I keep seeing sample code all over and I'm not sure what ever little part of it means. I need a good tutorial that shows the code structure in detail from start to finish. I think I have a good algorithm figured out, I just need a good code lesson.
 
Nigel Goodwin said:
It's FAR easier to do this than to use MPLAB, which seems very over complicated?.

What?!? :shock:

If you can use a text editor and a command line shell, you can use MPLAB! The IDE is there to make it easier, not harder...

By not using MPLAB, you are missing on a good free text editor and a great simulator. Build a cheap ICD2 clone and you get a complete development environment that can program *any* PIC, and debug a lot of them.

I can't believe Nigel Goodwin suggested a beginner not to tuse MPLAB... :(

What was the last MPLAB version you used?
 
Hi Steve,

May I recommend the Elmer 160 tutorial at https://www.amqrp.org/elmer160/index.html? It's by a programmer / radio amateur and takes you pretty much right from the beginning with MPLab...

Don't worry about stumbling... It took me nearly two weeks to get my first program running because I messed up on the configuration fuses... Also didn't realize there were all these wonderful Forums around...

Regards, Mike
 
Joel Rainville said:
I can't believe Nigel Goodwin suggested a beginner not to tuse MPLAB... :(

What was the last MPLAB version you used?

I've NEVER used MPLAB, I've got version 7.10 installed, as it's the only way to get MPASM.

It's always struck me as overly complicated?, and I've been using MPASM for years before MPLAB was a glint in MicroChips eye :lol:
 
Nigel Goodwin said:
Joel Rainville said:
I can't believe Nigel Goodwin suggested a beginner not to tuse MPLAB... :(

What was the last MPLAB version you used?

I've NEVER used MPLAB, I've got version 7.10 installed, as it's the only way to get MPASM.

It's always struck me as overly complicated?, and I've been using MPASM for years before MPLAB was a glint in MicroChips eye :lol:
Then I guess you are doing a BIG mistake! It will save you lot's of time and problems If you know how to use it. Just give it a try and don't give up too soon.
 
Nigel Goodwin said:
Joel Rainville said:
I can't believe Nigel Goodwin suggested a beginner not to tuse MPLAB... :(

What was the last MPLAB version you used?

I've NEVER used MPLAB, I've got version 7.10 installed, as it's the only way to get MPASM.

It's always struck me as overly complicated?, and I've been using MPASM for years before MPLAB was a glint in MicroChips eye :lol:

Nigel, don't take this the wrong way, but... how old are you? :D:p:D

Seriously, I can understand someone with a lot of experience with other software tools not wanting to use MPLAB. To each his own.

There are fine alternatives. VIDE comes to mind. Eclipse could also be configured to integrate MPASM functionality. Something like UltraEdit which is halfway between a text editor and an IDE could make a fine development environment. But you still lose the simulator and the debugging functionnality.

Suggesting Notepad to a beginner as a fine text editor? Come on... You're not really using Notepad, are you?
 
Joel Rainville said:
Nigel, don't take this the wrong way, but... how old are you? :D:p:D

I'm 50 years old.

Suggesting Notepad to a beginner as a fine text editor? Come on... You're not really using Notepad, are you?

I was merely suggesting what is at hand, personally I use UltraEdit 8)

But I have used Notepad occasionally, and still do sometimes (depending on the machine I'm using).
 
Nigel Goodwin said:
I was merely suggesting what is at hand, personally I use UltraEdit 8)

There's your secret! I love UltraEdit, consistantly great software at a great price. The author was nice enough to offer me a good rebate on a license when I was a student, and just for that I make a point of renewing my license every few years, even though the first version I bought back then (6 or 7, can't remember) would still do the trick today.
 
Joel Rainville said:
There's your secret! I love UltraEdit, consistantly great software at a great price.

I use UltraEdit too. Mine is version 5.10a which I got free from the cover CD of a computer magazine. Great software, gets even better with syntax highlighting turned on.
 
While on the subject of ultraedit - is there a way to add a hotkey to it to get it to compile your asm program?
 
gregmcc said:
While on the subject of ultraedit - is there a way to add a hotkey to it to get it to compile your asm program?

Yep. You first have to create a Tool (Advanced->Tool Configuration...). Put the command there.

You can then assign a key in the Key Mapping section (Advanced->Configuration...->Key Mapping). In my version of UltraEdit, each "AdvancedUserTool" has a default key mapping of Ctrl-Shift-[tool number]. you can change that to whatever you want.

You can also have a button on the toolbar if you prefer that. You set that in the Toolbar section of the Configuration panel...

Again, great software 8)
 
gregmcc said:
its even better with the microchip wordlist loaded :D

Hell yeah! I found this out about 2 weeks ago. Somehow, when I started playing with PIC programming, I had assumed that no one would have bothered to come up with a PIC wordlist for UEdit. Was I wrong... There are actually a few hundred wordlists to choose from, some for languages I have never even heard of!...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top