18F4550 compile error


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    42

    Default 18F4550 compile error

    Getting an error when compiling code using latest Microcode 2.2.1 and PicBasic Pro 2.46 along with Mpasm for 18F4550 such as:

    symbol not previously defined (_CPUDIV_OSC1_PLL2_1L)

    I have checked my PBP directory and see that 18F4550.INC is there as well as 18F4550.BAS is there.

    Have checked the 18F4550.INC file and see:

    __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L

    Have checked 18F4550.BAS and both files below are in the PBP folder:

    include "PIC18EXT.BAS"
    include "PBPPIC18.RAM"

    Where should these symbols be defined?, should I have to add them to PIC18EXT.BAS?

    Any help as always appreciatted.

    Regards

    Sean.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    As it's config fuse related, i'll bet on your MPASM version. Download the last version of MPASM and post your results.

    the MPASM .inc files are located in C:\Program Files\Microchip\MPASM Suite

    at the end of the file you'll find all config fuses
    Code:
    ;----- CONFIG1L Options --------------------------------------------------
    _PLLDIV_1_1L         EQU  H'F8'    ; No devide (4MHz input)
    _PLLDIV_2_1L         EQU  H'F9'    ; Divide by 2 (8MHz input)
    _PLLDIV_3_1L         EQU  H'FA'    ; Divide by 3 (12MHz input)
    _PLLDIV_4_1L         EQU  H'FB'    ; Divide by 4 (16MHz input)
    _PLLDIV_5_1L         EQU  H'FC'    ; Divide by 5 (20MHz input)
    _PLLDIV_6_1L         EQU  H'FD'    ; Divide by 6 (24MHz input)
    _PLLDIV_10_1L        EQU  H'FE'    ; Divide by 10 (40MHz input)
    _PLLDIV_12_1L        EQU  H'FF'    ; Divide by 12 (48MHz input)
    
    _CPUDIV_OSC1_PLL2_1L EQU  H'E7'    ; [OSC1/OSC2 Src: /1][96MHz PLL Src: /2]
    _CPUDIV_OSC2_PLL3_1L EQU  H'EF'    ; [OSC1/OSC2 Src: /2][96MHz PLL Src: /3]
    _CPUDIV_OSC3_PLL4_1L EQU  H'F7'    ; [OSC1/OSC2 Src: /3][96MHz PLL Src: /4]
    _CPUDIV_OSC4_PLL6_1L EQU  H'FF'    ; [OSC1/OSC2 Src: /4][96MHz PLL Src: /6]
    
    _USBDIV_1_1L         EQU  H'DF'    ; Clock source from OSC1/OSC2
    _USBDIV_2_1L         EQU  H'FF'    ; Clock source from 96MHz PLL/2
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Aug 2005
    Posts
    42

    Default

    Thanks for that Steve.

    Did not realise it was that long since I updated my MPlab.

    It now compiles after installing Mplab 7.21.

    Get a bunch of warnings which is interesting:

    **
    For the PIC18 devices, the __CONFIG directive has been superseded by the CONFIG directive.
    **

    But it still compiles so must still have the old settings still in there and the fuses show correct when loaded into the programmer software.

    At the end of the day I am going to use a Bootloader anywayz and so config settings should not matter in theory as they will be set when Bootloader is programmed.

    Many thanks again

    Regards

    Sean.

Similar Threads

  1. 16F877A Microcode Studio won't compile
    By curt66111 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th November 2009, 19:35
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 04:58
  4. 18F452 compile error
    By Woodzy in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 10th November 2006, 16:56
  5. 16F88 Compile error
    By Toley00 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd November 2005, 00:22

Members who have read this thread : 2

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