;ERRORLEVEL -205, -202, -230
LIST P=16F628A;,F=INHX16
include "P16F628A.inc"
PROCESSOR "PIC16F628A"
__CONFIG _BODEN_ON &_CP_ON &_PWRTE_ON &_WDT_OFF &_LVP_OFF &_MCLRE_OFF &_LP_OSC
CBLOCK h'20'
SAYAC0
SAYAC1
SANIYE
DAKIKA
ENDC
ORG h'00'
PORT_KUR MOVLW h'07'
MOVWF CMCON
BSF STATUS, RP0
MOVLW b'11111100'
MOVWF TRISB
BCF STATUS, RP0
BASLA
MOVLW d'120'
MOVWF DAKIKA
SNY_YENILE MOVLW d'30'
MOVWF SANIYE
SNYLK_PLS MOVLW d'8' ;1 saniye bekler..
MOVWF SAYAC1
MOVLW d'250'
MOVWF SAYAC0
NOP
DECFSZ SAYAC0, F
GOTO $-h'02'
DECFSZ SAYAC1, F
GOTO $-h'04'
BSF PORTB, 0 ;RB0=1 yapar..
MOVLW d'8' ;1 saniye bekler..
MOVWF SAYAC1
MOVLW d'251'
MOVWF SAYAC0
NOP
DECFSZ SAYAC0, F
GOTO $-h'02'
DECFSZ SAYAC1, F
GOTO $-h'04'
BCF PORTB, 0 ;RB0=0 yapar..
NOP
DECFSZ SANIYE, F ;Eğer 30 defa buraya gelmemişse 1dk geçmemiş demektir..
GOTO SNYLK_PLS
DECFSZ DAKIKA, F ;1dk zaman geçti.. Her dk başı 120 den geriye say..
GOTO SNY_YENILE
MOVLW b'00000010' ;120dk bitince RB1 i invert eder..
XORWF PORTB, F
GOTO BASLA
END