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.

programming/compiling in MPLAB problem

Status
Not open for further replies.
...if not then follow the posters instructions.
Whoops, I guess I didn't read the fine (and sideways) print carefully enough. Still, is there a typo with the extra config in the 16f88 example? Also, with respect to the "list" error, it's never been obvious to me until today how picky MPLAB was about indentation.
 
No, wait, I was wrong about any superfluous "config." It's in the program I'm running now, and it's doing fine.

?! I must have missed something. I see the list is where it ought to be with respect to the rest of the code in Bill's poster, I must have copied it wrong somewhere, or I just didn't appreciate the significance of indenting the entire program.
 
Code:
list p=16F88
include <p16F88.inc>
__CONFIG _CONFIG1, 0x2F34

Do you mean the _CONFIG1 ? It's supposed to be there, the 16F88 has more than one CONFIG group. Some 18F PICs have 8!
 
No it's running at 31.25kHz (default if I recall, I'll have to read the datasheet OSCCON)
You have to set OSCCON to 0x72 (8MHz)

Since you're using the 16F88 download the Firefly assembly instructions. It uses the 16F88 and has some tips in the manual. My favorite is the color instruction set.
 
Last edited:
Still nothing. Once I've saved the .asm, how do I get the .hex file? I've been going to file>export, then leaving the options as they are, and then saving as a .hex file. Then I import the .hex file. Is that right?

I could easily be wrong, but I don't think File | Export gives you anything useful unless you have already asembled your source (that is by Project | Make, Project | Build All or Project | Quickbuild).

Once you have assembled the source, you'll have a .hex file in the directory, and File | Export isn't needed in normal circumstances.
 
I could easily be wrong, but I don't think File | Export gives you anything useful unless you have already asembled your source (that is by Project | Make, Project | Build All or Project | Quickbuild).

Once you have assembled the source, you'll have a .hex file in the directory, and File | Export isn't needed in normal circumstances.

Yes, I don't know how everyone missed this? Your assembly source is a series of human readable mnemonics which the *** assembler translates to machine instructions *** - binary. We find it much easier to read hex, than binary, but the data is the same. It is the way the data is presented which makes it binary or hex. Understanding this will help you understand the micro.

You can take a look at an assembled hex file in an editor, in concert with the Instruction Set - PICmicro Mid-Range MCU Family, found here:
**broken link removed**
and understand how the assembler works. There is a pdf, floating around the net, which explains the intel hex file, which mpasm spits out. If you want this, I'll find it for you.


Huh, those really are supposed to be greater and less than signs around the include! Fixed the "list" error and deleted the superfluous "config," but I'm still getting this:
...snip...
Help!

Most compilers or assemblers interpret angle brackets to mean 'search the default path,' and quotation marks mean 'search project directory.'

By now, I think you have figured out that your include file wasn't found, as the path was not correct.
 
do you guys have psudocodes for electronic pin code lock door with LCd display and interface to computer database via VB. net
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top