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