Problems assembling with 18F* devices


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    timmers's Avatar
    timmers Guest

    Default Problems assembling with 18F* devices

    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
    Attached Images Attached Images

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking

    [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 !!!

    Code:
    ;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
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    timmers's Avatar
    timmers Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks Alain,

    Quote Originally Posted by Acetronics View Post
    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

Similar Threads

  1. 2 PWM in 16F690 problems
    By ciendavila in forum mel PIC BASIC
    Replies: 9
    Last Post: - 27th April 2008, 09:03
  2. Melabs PIC Basic Pro - 16 bit devices support
    By rod27cn in forum PBP Wish List
    Replies: 10
    Last Post: - 21st November 2007, 08:21
  3. Mutliple RS232 devices
    By Lsalt in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th February 2006, 07:51
  4. Goto inside a gosub??? Problems...
    By leonel in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 13th October 2005, 12:17
  5. USART problems
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 47
    Last Post: - 6th March 2005, 21:45

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