Alexey,
You could just open up the include file and copy/paste the code into your main program and then re-arrange it all you want.
Nothing says you have to keep it in a separate Include file.
Alexey,
You could just open up the include file and copy/paste the code into your main program and then re-arrange it all you want.
Nothing says you have to keep it in a separate Include file.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Yes, of course this is all possible.
I was just wondering if it is possible to do one simple include in the place where I want to see the code of my library in memory and use the functions without doing any definitions of the variables and the answer is that you may have convenience of use or control of there the code is placed in memory or convenience of pasting library code in a form of one piece "include" but not both if you want to use variables before the "include".
In most cases this is not a big deal - just put all includes on the top, unless you want your main cycle and interrupts work as fast as possible, then you start moving seldom used code down, play with clearwdt and so on and then you have to split includes or just copy pieces of it's content in two separate places.
Again, this is not a big deal, only a matter of some convenience of having own library functions
My guess is the included source is going where it wants, and you have no say about it.
Furthermore, I'll take a stab that the source for individual commands are ordered the same,
no matter what order your program first calls them.
Imagine you can push routines such as SERIN, PULSIN, DTMF.. out of the first page or RAM bank
because you thought your code was more important.
Now all of a sudden, a bunch of PBP's timed routines have to do bank/page switching
and you find out it was you that had to accommodate those routines rather than the other way around.
One trick you can do, is borrow some system variables if you can figure out when they are not being used.
There are variables used only to transport your PBP vars to it's serial routine for example.
Any other time your code is not executing a "serious" instruction, those system variables are sitting around doing nothing.
Bookmarks