Yes, I guess so too, no need for changing the version of the includes if nothing in them have been changed.
and I comented out everything in the correct include, now it looks like:
Code:
;****************************************************************
;* 18F2520.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2006 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 06/05/06 *
;* Version : 2.47 *
;* Notes : *
;****************************************************************
NOLIST
ifdef PM_USED
LIST
"Error: PM does not support this device. Use MPASM."
NOLIST
else
LIST
LIST p = 18F2520, r = dec, w = -311, w = -230, f = inhx32
INCLUDE "P18F2520.INC" ; MPASM Header
; __CONFIG _CONFIG1H, _OSC_INTIO7_1H
; __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
; __CONFIG _CONFIG3H, _PBADEN_OFF_3H
; __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
NOLIST
endif
LIST
EEPROM_START EQU 0F00000h
BLOCK_SIZE EQU 64
..And the actual code look like:
Code:
asm
__CONFIG _CONFIG1H, _OSC_INTIO67_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
__CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
__CONFIG _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_OFF_3H
__CONFIG _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _XINST_OFF_4L
endasm
DEFINE OSC 32 ' internal 8MHz x 4 with PLL enabled
blueled var LATB.4 ' prevents read-modify-write
redled var LATB.5 ' problems
OSCTUNE = %0100000 ' turn on PLL for 4 x 8MHz
OSCCON = %01110000 ' set 8MHz internal osc
ADCON1 = %00001111 ' disable all A/D
main:
low redled
low blueled
pause 500
high redled
pause 500
high blueled
pause 500
goto main
END
..And it compiled with no errors.
The setup is just a PIC18F2520 with pin20 connected to +5V, 8/19 to gnd,
a 10k resistor from pin1 (MCLR) to +5V, and two LED's connected via resistors
from pin 26 (RB5) and 25 (RB4) I also added two cap's between Vcc and gnd,
one 1uF and one 100nF.
I also have a pickit2 connector wired up to usual pins.
..And now I'm going to the bed
Bookmarks