PDA

View Full Version : 18F4550 compile error



sean-h
- 28th August 2005, 20:02
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.

mister_e
- 28th August 2005, 20:16
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


;----- 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

sean-h
- 28th August 2005, 21:27
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.