Quadrature encoder module

Comments

Fixed!

got them, but a ?

buy Lisinopril diet pill

I’ve not seen the EXTERN GLOBAL UDATA and CODE directives in my adventures yet, and MPLAB is choking on them when I compile, with an error:

Directive only allowed when generating an object file

Is this a workspace option I’m missing? thoughts?

Check out the MPASM

Check out the MPASM Assembler help file, the chapter on “Relocatable Objects”.

There’s a lot of code on the Web that uses so-called “Absolute” style, that specifies where everything needs to go in memory. This is generally considered obsolete, except for very small programs. “Relocatable” style allows you to split your project into multiple files and have the linker put them all together. It does use slightly different keywords and requires a “linker file.” This is all explained in the help file.

If you’re not familiar with it, it may be worth learning; it makes it much easier to reuse code and to separate different kinds of functionality into different files.

—tjw

Ok, rtfm'd, and....

now I get it, but the helpfile says to choose the check box labeled “Object File” in the MPASM, which just plain doesn’t exist.

After a half hour of pullin the hair I don’t have out =), I find the option is actually under Build Options, MPASM/C17/C18 Suite (which I ignored many times, as there is also an MPASM tab, and I thought the prior didn’t apply to this mere mortal who’s only doin ASM), choose the radio button for build library target.

And happy day, it compiles without error =) (posting this in hopes that it might save some other poor soul some hair)

Regards

Jon

Sorry for the hair-pulling!

And I hope it was worth it!

—tjw