;**********************************************************************
list p=12F509 ; list directive to define processor
#include <p12F509.inc> ; processor specific variable definitions
__CONFIG _MCLRE_ON & _CP_OFF & _WDT_OFF & _IntRC_OSC
; __CONFIG 0FFA
;***** VARIABLE DEFINITIONS
List
d1 equ 0x11
d2 equ 0x0b
;*******************************************************************
RESET_VECTOR
ORG 0x3FF ; processor reset vector
MAIN
ORG 0x000
movwf OSCCAL ; update register with factory cal value
start
movlw b'11000000' ; weak pull-ups disabled
option
movlw b'001000' ; sets all pins to output, except GPIO,3 (pin4)
tris GPIO
flash
movlw b'110111' ; sets all pins high
movwf GPIO
call dly_2E5
movlw b'000000' ; sets all pins low
movwf GPIO
call dly_2E5
goto flash
dly_2E5
clrwdt
movlw 0x3f
movwf d1
movlw 0x9d
movwf d2
delay
decfsz d1,f
goto $+2
decfsz d2,f
goto delay
retlw 0
END ; directive 'end of program'