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.
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.
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!