Please forgive me if I am going over old ground but I am unfamiliar with the forum and find the search difficult to use. (doubtless my own fault)
I am currently moving yet another project from 16F to 18F and am encountering difficulties with MPASM's requirements for code defined device configuration. On previous ocassions I chickened out and edited the .inc file instead of sorting the problem.
This time, I wan't to do it properly.
Page 14 of the MPASM PIC18F2450 processor include file makes an "IMPORTANT" statement.
"For the PIC18 devices, the __CONFIG directive has been superceded by the CONFIG directive". It then lists the new parameter options for each configuration function but there is no syntax example.
I assume, in PBP, the config line should begin withe the '@' sign followed by a space and the word CONFIG in upper case followed by the various parameters, again in upper case, with their included spaces (I've tried omitting included spaces) and where there is more than one parameter they should be immediately separated by commas without additional spaces. Please correct me if I am wrong.
As a lengthy string is likely to be generated, I assume a line continuation character is included in the scheme, can someone tell me what it is?
An old post I have from Bruce tech@rentron shows how to do it but omits the starting '@ space', I assume that he intended that for PBP that's to be included. Bruce's post also included the translation of '_OSCS_OFF_1H' to 'OSCS_OFF'. Could someone please explain what 'OSCS_OFF' means in either dialect. I don't see it noted in the available settings for the 18F4620.
Here is the CONFIG line so far:
@ CONFIG OSC = HS,WDT = ON,PWRT = ON,BOREN = OFF,LVP = OFF
When I try the above, MPASM gives me the red band of pain and declares an error:
'__CONFIG directives cannot be used with CONFIG directives'
Any help greatly appreciated...
Brian Walsh.
Bookmarks