PDA

View Full Version : first time with PIC18F2585



Marcick
- 7th October 2005, 15:26
I can't understand: I'm trying this stupid code inside MPLAB IDE (ICD2)

;******************
; Prova PIC18F2585
;******************
;

@ CONFIG OSC=XT,WDT=ON,WDTPS=128,LVP=OFF

gps VAR Portb.0

ciao:
high gps
low gps
goto ciao


and I get the following message when I build it:

Executing: "C:\Pbp\PBPW.EXE" -ampasmwin -oq -z -p18F2585 "Prv2585.bas"
PicBasic Pro Compiler 2.46, (c) 1998, 2005 microEngineering Labs, Inc.
All Rights Reserved.
Error[116] C:\PBP\DEVELOPE\PRV2585.MAC 12 : Address label duplicated or different in second pass (_ciao)
Warning[220] C:\PBP\PBPPIC18.LIB 911 : Address exceeds maximum range for this processor.
Warning[220] C:\PBP\PBPPIC18.LIB 913 : Address exceeds maximum range for this processor.
Warning[220] C:\PBP\PBPPIC18.LIB 913 : Address exceeds maximum range for this processor.
Warning[220] C:\PBP\PBPPIC18.LIB 913 : Address exceeds maximum range for this processor.
Warning[220] C:\PBP\PBPPIC18.LIB 722 : Address exceeds maximum range for this processor.
Loaded C:\Pbp\Develope\Prv2585.COD.
BUILD SUCCEEDED: Fri Oct 07 16:18:50 2005

there must be a really stupid mistake but .... I think I'm a bit tired ...
... help please

Bruce
- 8th October 2005, 02:36
Edit the 18F2585.INC file in your PBP directory to change the default CONFIG fuse settings. That should take care of this particular error.

FYI: When using the ICD2 with PBP, if your program starts getting fairly large, and using lot of RAM, then you will also need to INCLUDE one of the ICDDEFS.BAS files in your PBP directory, or create one specific for the target if one is not available.

These definition files wil reserve RAM for ICD2 variables. It's a good idea to use these just in case.

Read the ICD2 documentation for a list of specific resources you may need to reserve for the ICD2.

Marcick
- 10th October 2005, 14:41
Thank you, the problem was there.
The sintax

@ CONFIG OSC=XT,WDT=ON,WDTPS=128,LVP=OFF

doesn't work (why ?)

I have left the old sintax

@ __CONFIG _CONFIG1H ... etc

and it works (but when I build I see the warning that __CONFIG has been deprecated etc.)