PDA

View Full Version : PIC18F4550 Error[128] Missing Arguments



damalu
- 16th November 2008, 06:42
I have some problems with MicroCode Studio, I've tried to compile a simple program that turns on and off a LED using pic18f4550, I've change the INC file for the compiler get off the warning CONFIG Directive. But now I got this error message:
Error[128] c:\pbp246\18f4550.inc 20: Missing argument(s) (configuration byte setting is missing)
Error[128] c:\pbp246\18f4550.inc 21: Missing argument(s) (configuration byte setting is missing)
Error[128] c:\pbp246\18f4550.inc 22: Missing argument(s) (configuration byte setting is missing)
Error[128] c:\pbp246\18f4550.inc 23: Missing argument(s) (configuration byte setting is missing)
Error[128] c:\pbp246\18f4550.inc 24: Missing argument(s) (configuration byte setting is missing)

I'm new programing pic's and i don't understand the error, please please help me!!!!

here's how the INC file says:

;************************************************* ***************
;* 18F4550.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2004 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 12/31/04 *
;* Version : 2.46 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F4550, r = dec, w = -311, f = inhx32
INCLUDE "P18F4550.INC" ; MPASM Header
CONFIG = CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
CONFIG = CONFIG1H, _FOSC_HSPLL_HS_1H
CONFIG = CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
CONFIG = CONFIG3H, _PBADEN_OFF_3H
CONFIG = CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 32

mackrackit
- 16th November 2008, 09:56
I am sure you have read this
http://www.picbasic.co.uk/forum/showthread.php?t=543
but jump down to post #29 by Darrel.

damalu
- 17th November 2008, 05:01
I am sure you have read this
http://www.picbasic.co.uk/forum/showthread.php?t=543
but jump down to post #29 by Darrel.

Thanks for answering ;)
Yes you are right I've already read that, but I believe that's not the problem, al least the Error[128] have something to do with the CONGIF directive, 'cause when I change the INC file, the error about it dissapears.
The Error[128]: c:\pbp246\pic18f4550.inc 20: Missing arguments (configuration byte setting is missing), I believe the numbers are for the all lines in the INC file that have problems (20-24) and yes... that lines are the CONFIG. :confused:
Anyway I tried the solution that Darrel gave, but the error stills here!!! :(
More ideas, please I really need them!!!

Darrel Taylor
- 17th November 2008, 06:10
The format of your config lines are incorrect.


CONFIG = CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L

Should be ...

__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
| |
| 1 underscore
2 underscores

mister_e
- 17th November 2008, 16:43
and probably not a bad idea to add what's in red, just to disable the warning message forever.


LIST p = 18F4550, r = dec, w = -311, w = -230, f = inhx32

damalu
- 17th November 2008, 17:38
Problem solve, the error 128 was gone forever. :D
But now I have another one :confused:, the error 113, can you tell me how can I fix it, it says something like this:
Error[113]: c\pbp246\pic18f4550.inc 20: Symbol not previusly defined (_PLLDIV_5_1L)
Error[113]: c\pbp246\pic18f4550.inc 20: Symbol not previusly defined (_CPUDIV_OSC1_PLL2_1L)
Error[113]: c\pbp246\pic18f4550.inc 24: Symbol not previusly defined (_ICPRT_OFF_4L)
Error[113]: c\pbp246\pic18f4550.inc 24: Symbol not previusly defined (_XINST_OFF_4L)

mackrackit
- 17th November 2008, 19:37
Problem solve, the error 128 was gone forever. :D
But now I have another one :confused:, the error 113, can you tell me how can I fix it, it says something like this:
Error[113]: c\pbp246\pic18f4550.inc 20: Symbol not previusly defined (_PLLDIV_5_1L)
Error[113]: c\pbp246\pic18f4550.inc 20: Symbol not previusly defined (_CPUDIV_OSC1_PLL2_1L)
Error[113]: c\pbp246\pic18f4550.inc 24: Symbol not previusly defined (_ICPRT_OFF_4L)
Error[113]: c\pbp246\pic18f4550.inc 24: Symbol not previusly defined (_XINST_OFF_4L)
Can you post the modified inc file. Looks like the same lines are giving trouble, you just told the system not to tell you about 128. Now it is trying to tell you there is still a problem.

damalu
- 17th November 2008, 20:15
;************************************************* ***************
;* 18F4550.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2004 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 12/31/04 *
;* Version : 2.46 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F4550, r = dec, w = -311, w=-230, f = inhx32
INCLUDE "P18F4550.INC" ; MPASM Header
__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
__CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
__CONFIG _CONFIG3H, _PBADEN_OFF_3H
__CONFIG _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 32


I guess the wrong lines are

__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L


__CONFIG _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L

mister_e
- 17th November 2008, 21:06
It's high likely a MPASM/MPLAB problem here. Doesn't return any error using your file above...

damalu
- 17th November 2008, 21:47
Yes mister_e you're rigth, the problem was the mpasm, i didn't notice that microdode studio was using another one, i just change it to the rigth one (it comes with mplab v8.10) and everything works perfetc... sorry :D
this forum is fantastic!!!