; INCLUDE PIC16F628A
LIST P=16F628A
INCLUDE <P16F628A.INC>
__CONFIG _BODEN_OFF&_CP_OFF&_PWRTE_OFF&_WDT_OFF&_XT_OSC&_LVP_OFF&_MCLRE_OFF
ERRORLEVEL -302
ERRORLEVEL -203
; GENERAL REGISTERS
CBLOCK 0x20
COUNT1
COUNT2
ENDC
; PROGRAM START
ORG 0x00
; DISABLE COMPARATORS
MOVLW 0x07
MOVWF CMCON
; SETUP THE I/O PORTS ETC
BSF STATUS,RP0
MOVLW b'1'
MOVWF TRISA
BCF STATUS,RP0
CLRF PORTA
; START
START
BTFSS PORTA,0
GOTO START
BSF PORTA,1
CALL DELAY
BCF PORTA,1
CALL DELAY
GOTO START
; SUBROUTINES
DELAY DECFSZ COUNT1,F
GOTO DELAY
DECFSZ COUNT2,F
GOTO DELAY
RETURN
END