18f4620 Configuration bits


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Location
    Mexico
    Posts
    47

    Default 18f4620 Configuration bits

    Hello, i cant use the directive @ CONFIG. I have modified the .inc file as follow:

    ;************************************************* ***************
    ;* 18F4620.INC *
    ;* *
    ;* By : Leonard Zerman, Jeff Schmoyer *
    ;* Notice : Copyright (c) 2004 microEngineering Labs, Inc. *
    ;* All Rights Reserved *
    ;* Date : 12/14/04 *
    ;* Version : 2.46 *
    ;* Notes : *
    ;************************************************* ***************
    NOLIST
    ifdef PM_USED
    LIST
    "Error: PM does not support this device. Use MPASM."
    NOLIST
    else
    LIST
    LIST p = 18F4620, r = dec, w = -311, f = inhx32
    INCLUDE "P18F4620.INC" ; MPASM Header
    ;__CONFIG _CONFIG1H, _OSC_XT_1H
    ;__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
    ;__CONFIG _CONFIG3H, _PBADEN_OFF_3H
    ;__CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
    NOLIST
    endif
    LIST
    EEPROM_START EQU 0F00000h
    BLOCK_SIZE EQU 8
    -----------------------------------------------------------------------


    What can i do to solve this problem? The mcs error is: Error[116] Address label duplicated or diferent in second pass (_4loop).

    Here is my code:

    @ config osc=HSPLL

    DEFINE HSER_BAUD 4800
    DEFINE OSC 4
    DEFINE ADC_BITS 8
    DEFINE ADC_CLOCK 3
    DEFINE ADC_SAMPLEUS 10

    CMCON=$07
    ADCON1=%00001100

    TRISA=%00000100
    TRISB=0
    b0 var byte

    loop:
    ADCIN 2,b0
    pause 4000
    Hserout [dec b0,13, 10]

    goto loop

    end

    It works fine if i comment the first config line and modify configuration bits in mplab before programming the pic.

  2. #2
    blainecf's Avatar
    blainecf Guest


    Did you find this post helpful? Yes | No

    Default include is being included included

    include is being included twice. this happens if you explicitly include a file that's automatically being included already. try commenting out your include statement until the error message goes away.

    bcf

  3. #3
    Join Date
    Sep 2006
    Location
    Mexico
    Posts
    47


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by blainecf
    include is being included twice. this happens if you explicitly include a file that's automatically being included already. try commenting out your include statement until the error message goes away.

    bcf
    But i doesnt use include in my code. What can i do?

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Configuration bits and timing
    By Christos_K in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th November 2012, 08:53
  3. Configuration bits in a HEX file gone missing?
    By grzes.r in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd February 2010, 01:10
  4. Configuration bits
    By Armando Herjim in forum General
    Replies: 0
    Last Post: - 5th December 2006, 16:51
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31

Members who have read this thread : 1

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