LIST P=18F2525 ;directive to define processor
#include <P18F2525.INC> ;processor specific variable definitions
CONFIG OSC = INTIO7, WDT = OFF, MCLRE = ON, LVP = OFF, XINST = OFF, LPT1OSC = OFF
#DEFINE irL LATB
#DEFINE irT TRISB
#DEFINE ir 0
CBLOCK 0x000
EXAMPLE ;example of a variable in access RAM
d1
d2
d3
ENDC
ORG 0x0000
Init:
movlw 0x00
movwf OSCTUNE
movlw 0x72
movwf OSCCON
Osc:
btfss OSCCON,IOFS
goto Osc
bcf irT,ir
Main:
bsf irL,ir
call Delay500mS
bcf irL,ir
call Delay500mS
goto Main
;Delay 500mS aka half a second
Delay500mS
movlw 0x07
movwf d1
movlw 0x2F
movwf d2
movlw 0x03
movwf d3
Delay500mS_0
decfsz d1, f
goto $+4
decfsz d2, f
goto $+4
decfsz d3, f
goto Delay500mS_0
goto $+2
goto $+2
goto $+2
return
END