PDA

View Full Version : Problems assembling with 18F* devices



timmers
- 21st March 2008, 12:21
Have been using the 16F** with no problems at all (apart from the usual foibles !).
Trying to use an 18F1220 and I get Errors and warnings like

_CONFIG has been deprecated for PIC18 devices. Use directive CONFIG
Symbol not previously defined (_BORV_20_2L)

I have tried remarking out the CONFIG lines in 18F1220.INC and the errors go away. Is there a problem with my .INC file?

I am using PBP PRO ver 2.44 and Microcode Studio 3.0.0.5

Any thoughts?
Many thanks,
Tim'mers.


18F1220.INC file for reference

;************************************************* ***************
;* 18F1220.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2003 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 02/18/03 *
;* Version : 2.44 *
;* Notes : *
;************************************************* ***************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F1220, r = dec, w = -302, f = inhx32
INCLUDE "P18F1220.INC" ; MPASM Header
__CONFIG _CONFIG1H, _XT_OSC_1H
__CONFIG _CONFIG2L, _BOR_ON_2L & _BORV_20_2L & _PWRT_ON_2L
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
__CONFIG _CONFIG3H, _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _BKBUG_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 8

Acetronics2
- 21st March 2008, 12:34
[QUOTE=timmers;52866]

_CONFIG has been deprecated for PIC18 devices. Use directive CONFIG

1) Forget that !!!

Symbol not previously defined (_BORV_20_2L)

2) you created a new option !!!




;Configuration Byte 2L Options
_BORV_27_2L EQU H'FB' ; BOR Voltage - 2.7v
_BORV_42_2L EQU H'F7' ; 4.2v
_BORV_45_2L EQU H'F3' ; 4.5v
_BOR_ON_2L EQU H'FF' ; Brown-out Reset enabled
_BOR_OFF_2L EQU H'FD' ; Brown-out Reset disabled
_PWRT_OFF_2L EQU H'FF' ; Power-up Timer disabled
_PWRT_ON_2L EQU H'FE' ; Power-up Timer enabled



No real mistakes ...

Alain

timmers
- 21st March 2008, 16:13
Thanks Alain,


Symbol not previously defined (_BORV_20_2L)
-fixed that.

Regarding the other error - symbol not defined _BKBUG_OFF_4L I've tried changing the script (after creating a backup!) to _DEBUG_OFF_4L
and it seemed to work.

Is this likely to cause problems or have I just fixed a bug. I have ordered PBP 2.50 upgrade and presume they have fixed these sort of errors?

Data sheet reads (P177):
REGISTER 19-5: CONFIGURATION REGISTER 4 LOW (CONFIG4L: BYTE ADDRESS 300006h)

bit 7 DEBUG: Background Debugger Enable bit
1 = Background Debugger disabled, RB6 and RB7 configured as general purpose I/O pins
0 = Background Debugger enabled, RB6 and RB7 are dedicated to In-Circuit Debug