PDA

View Full Version : PIC18 Config Problems



eoasap
- 27th December 2005, 23:27
using MPLAB 7.30 (MPASM 5.01)
PICLF8722
PICF8722.inc in picbasic folder has the config bits commented out

when i try to use the old method to declare configuration bits (code below) i get the following:
__CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.

(CODE: OLD METHOD)
asm
__CONFIG _CONFIG1H, _OSC_HS_1H
endasm


When i try the new method (shown below) i get about 500+ errors messages stating errors such as:
-Destination address must be word aligned
-Address exceeds maximum range for this processor.
-Address label duplicated or different in second pass (_MAIN2)
-Address exceeds maximum range for this processor.

(Code: NEW METHOD)
asm
CONFIG OSC = HS
endasm

it seems as if no matter which method i use i get errors! i've read the FAQ on fuses several times and tried just about everything there. http://www.picbasic.co.uk/forum/showthread.php?t=543

mister_e
- 30th December 2005, 15:48
and when you comment the config fuse line every error messages disapear?

If so, did you also tried to move your config fuses to the .INC file?

If the problem is still there, can you attach your code here (or send me a PM) to see what can we do for you?

As i heard, this will be fix in the next PBP version. In the meantime i create new .INC file and New device in MCS(with brief project name name). This works as it's suppose to.

eoasap
- 30th December 2005, 16:21
if i move

config osc = hs

to the *.inc file in pbp (as you suggested), instead of getting 500+ errors i get no errors and seems to work. So that apparently works ;)

thanks again Steve!

mister_e
- 30th December 2005, 16:23
Good news!

Well it's seems to be the way to go before the next PBP release/upgrade.

Good luck!

Ron Marcus
- 3rd January 2006, 01:08
using MPLAB 7.30 (MPASM 5.01)
PICLF8722
PICF8722.inc in picbasic folder has the config bits commented out

when i try to use the old method to declare configuration bits (code below) i get the following:
__CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.

http://www.picbasic.co.uk/forum/showthread.php?t=543

The above message is a warning, not an error. I get it all the time, but it doesn't affect compilation.