first time with PIC18F2585


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84

    Default first time with PIC18F2585

    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

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    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.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    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.)

Similar Threads

  1. I don't understand this code!
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 13th February 2008, 02:55
  2. Measuring time
    By AugustoPedrone in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th July 2007, 23:46
  3. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  4. Alarm Time
    By Santana in forum Code Examples
    Replies: 1
    Last Post: - 8th December 2006, 13:58
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts