18F4550 compiles, 18F4620 does not


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default 18F4550 compiles, 18F4620 does not

    The following trivial code compiles if I select 18F4550 via the MCS+ 3.0.0.0 drop down box.
    I have tried PBPL ver 2.50 and PBPW ver 2.47.

    If I select the 18F4620 I get
    Error [115] c:\pbp247\pbppi18.lib 1529 : Duplicate label ("DEBUG" or redefining symbol that cannot be redefined)

    There are almost identical messages with PBPW and PBPL. Only the c:\...... varies.

    Anyone got any ideas?

    Cheers
    Brian

    ''************************************************ ****************
    ''* Name : Test 18F4620.PBP *
    ''* Author : Brian Taylor *
    ''* Notice : Copyright (c) 2007 Brian Taylor *
    ''* : All Rights Reserved *
    ''* Date : 18 SEP 2007 *
    ''* Version : 4.00 *
    ''* Notes : *
    ''* : *
    ''************************************************ ****************

    '' ************************ Defines *****************************
    DEFINE osc 4 '
    DEFINE Loader_Used 1
    DEFINE DEBUG_REG PORTC 'Debug pin port
    DEFINE DEBUG_BIT 6 'Debug pin bit
    DEFINE DEBUG_BAUD 19200 'Debug baud rate
    DEFINE DEBUG_MODE 0 'Debug mode: 0 = True, 1 = Inverted


    A var byte
    B var byte


    ShowRevStatus: ' zzzzz remove in runtime version
    pause 50
    debug $0D, $0A
    for a = 2 to 42
    read a,b
    debug b
    next a
    debug $0D, $0A

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


    Did you find this post helpful? Yes | No

    Default

    Open and edit the Microchip header file P18F4620.INC. Comment out DEBUG, and save the
    file. That will get rid of the error.

    LVDCON EQU H'0FD2'
    OSCCON EQU H'0FD3'
    ; DEBUG EQU H'0FD4' ; <--- comment this out & save
    T0CON EQU H'0FD5'
    TMR0L EQU H'0FD6'
    Regards,

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

  3. #3


    Did you find this post helpful? Yes | No

    Default DEBUG problem with 18F4620

    Thank you Bruce and Jeff Schmoyer.

    Thank you Jeff for the prompt personal reply.

    Bruce's comment above is exactly right and does fix the problem. I must say I usually regard the xxx.inc files as sacred and not to be messed with by amateurs like me.

    This is what I did.

    I went to c:\mpasm\p18f4620.inc and saved a copy.
    I opened c:\mpasm\p18f4620.inc and a couple of pages into the file, at the first instance of the word "DEBUG" I commented out the line with a semi-colon.

    OSCCON EQU H'0FD3'
    ; DEBUG EQU H'0FD4'
    T0CON EQU H'0FD5'


    Cheers
    Brian
    Last edited by BrianT; - 19th September 2007 at 23:08. Reason: added detail

Similar Threads

  1. 18f4550 usb problem.. so im getting crazy..
    By MeSaKu in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th May 2009, 22:03
  2. Usb Mass Storage With 18f4550
    By wagner in forum USB
    Replies: 8
    Last Post: - 17th August 2008, 16:46
  3. 18F4550 to 18F2550
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th September 2007, 23:13
  4. How can I turn off USB support in 18F4550
    By BrianT in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th September 2007, 03:56
  5. USB Programmer for 18F4550 PICs
    By Kamikaze47 in forum USB
    Replies: 8
    Last Post: - 21st August 2007, 16:29

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