Hi Brian,
I wouldn't be really concerned about using the new 18F config directive unless just want
to modifiy your existing PBP header files to be compatible with the latest changes.
Note: This may change by next week the way Microchip works..;o}
If you're referring to this thread: http://www.picbasic.co.uk/forum/show...3087#post13087
it should be OSCS=OFF VS OSCS_OFF. The new config directive does not support the
underscore character.
As to whether or not this particular config fuse option is even available for the PIC in
question, follow Skis' advice and look in the default Microchip device header file. This
shows every config option available for the target PIC. Of course, you'll also want to
take a peek at the datasheet for the PIC in question. They don't all have the same
config fuse options.
If your case, for the 18F4620, it does not appear that the controller has the option for
OSCS=OFF (which would be the Osc Switch Enable) as, say, you would have for an 18F452.
The Microchip device .INC header files give a very descriptive list of what each config fuse
option does. The data sheet goes into much greater detail.
Here's a short clip from the P18F452.INC file;
; Osc. Switch Enable:
; OSCS = ON Enabled
; OSCS = OFF Disabled
;
; Power-up Timer:
; PWRT = ON Enabled
; PWRT = OFF Disabled
;
; Brown-out Reset:
; BOR = OFF Disabled
; BOR = ON Enabled
These are config fuse options you can use with the new config directive for the 18F452.
Now look in the P18F4620.INC file in your MPLAB installation directory for a list of config fuse
options that are available for this target.
NOTE: You cannot (at least for now) use the new config directives directly in your PBP code.
PBP will not allow these to be inserted directly in your code. You'll need to modify the default
18F4620.INC file in your PBP directory.
That's why you don't see the @ symbol before the config fuse directive in my example at
the link above.This is only required when you insert the (old config directives) directly into
your PBP code (and you have the others commented out) as shown below. It's not required
when you do this in the PBP .INC file.
Here's an example of my own modified 18F2431.INC file in my PBP directory.
Code:
LIST
LIST p = 18F2431, r = dec, w = -311, w = -230, f = inhx32
INCLUDE "C:\Program Files\Microchip\MPASM Suite\P18F2431.INC" ; MPASM Header
CONFIG OSC=XT,FCMEN=OFF,IESO=OFF,PWRTEN=ON,BOREN=ON,BORV=27
CONFIG WDTEN=OFF,WINEN=OFF,WDPS=128,T1OSCMX=OFF,MCLRE=OFF
CONFIG LVP=OFF,STVREN=OFF
;__CONFIG _CONFIG1H, _OSC_IRCIO_1H ; _OSC_XT_1H
;__CONFIG _CONFIG2H, _WDTEN_OFF_2H & _WDPS_512_2H
;__CONFIG _CONFIG4L, _LVP_OFF_4L
NOLIST
I use an old Windows ME OS, so I have to point directly to my MPASM suite directory, and
I've changed to the new config directive. I can't directly insert the new config directive in
my PBP code. It just doesn't work.
I can, however, alter my default PBP 18F2431.INC file to use these.
Yeah, I know, it seems confusing, but it's worth the extra effort to learn this.
Bookmarks