That is not what I was thinking.
I did not know
DEFINE CONFIGOVERRIDE
even existed.
Thanks Darrel!
That is not what I was thinking.
I did not know
DEFINE CONFIGOVERRIDE
even existed.
Thanks Darrel!
Dave
Always wear safety glasses while programming.
Hi Dave,
I don't think
is a pre existing anything. I think it could have beenCode:DEFINE CONFIGOVERIDE
and have the same effect. In the .CFG file, theCode:DEFINE BERTISLAZY
tells PBP or MPASM (not clear here) to see if the DEFINE exists. If not then do the following code. If it does exist then endif.Code:ifndef CONFIGOVERIDE or ifndef BERTISLAZY
I am going to have a play with this and verify this is how it works. I will report back if anyone is intrested.
BTW, the reason I want this is so I can test forum code that uses the default config's, without having to change things all the time for my own code.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
I am interested.I will report back if anyone is intrested.
Dave
Always wear safety glasses while programming.
DEFINE's are currently only passed on to the assembler unchanged, and do not directly affect PBP code.
Those DEFINES are added to the ASM after the .inc file, but before the .bas file.
This allows them to affect the library code that is included from the .bas file, but the items in the .inc file have already been processed.
The example above was for an 18F.
For a 16F, the .cfg file should be a little differentThe usage in the main program is essentially the same.Code:' -- 16F877a.cfg -- ASM ifndef PM_USED ifndef CONFIGOVERRIDE __config _XT_OSC & _WDT_ON & _LVP_OFF & _CP_OFF endif endif ENDASMA better method has been developed by Charles and Leonard that allows defaults to be overridden automatically, and the new style CONFIG statements to be used in your programs as well.Code:DEFINE CONFIGOVERRIDE @ __config _HS_OSC & _WDT_ON & _LVP_OFF & _CP_OFF
It will be available in the coming months, so you may not want to spend to much time editing all the files.
Last edited by Darrel Taylor; - 8th May 2011 at 18:17.
DT
Hi, DarrelA better method has been developed by Charles and Leonard that allows defaults to be overridden automatically, and the new style CONFIG statements to be used in your programs as well.
It will be available in the coming months, so you may not want to spend to much time editing all the files.
Petty good news !!! re-Commenting defaults @ each PBP patch release became a bit boring ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Oh too cool!!! Does this count as me getting my wish?
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks