IST P=16F628A

#INCLUDE "P16F628A.INC"

__CONFIG _XT_OSC&_CP_OFF&_WDT_OFF&_LVP_OFF

ERRORLEVEL 1,-302

Timer_1		equ	50h
Timer_2		equ	51h


START		bsf STATUS,5
		movlw b'00000001'    
		movwf TRISB
		movlw b'00000000'	
		movwf TRISA
		bcf STATUS,5

		bcf PORTB,5		

cimke:		btfsc PORTB,0		 
		goto cimke   
       
		call DELAY

		bsf PORTB,5         
				
		call DELAY
		call DELAY
		call DELAY
		call DELAY
		call DELAY
		call DELAY
		call DELAY
		call DELAY
 
	        bcf PORTB,5		

cimke2:		btfss PORTB,0
		goto cimke2
		
		goto cimke

DELAY:  clrf Timer_1 
        clrf Timer_2 
DLY1:
	NOP
	NOP
	NOP
	NOP
	DECFSZ	Timer_1,F
	GOTO	DLY1
	DECFSZ	Timer_2,F
	GOTO	DLY1
	RETURN

END
