@ DEVICE PIC16F877, XT_OSC,WDT_OFF,BOD_ON,CPD_OFF
@ DEVICE PIC16F877, PWRT_OFF,LVP_OFF,PROTECT_OFF
define OSC 20
Define LCD_DREG PORTD
Define LCD_DBIT 4
Define LCD_RSREG PORTD
Define LCD_RSBIT 2
Define LCD_EREG PORTD
Define LCD_EBIT 3
'############################################
ON INTERRUPT GoTo KESME
ADCON1=7 'veya ADCON1=%0111
OPTION_REG=%00000000
INTCON=%10010000 'Kesmeler-RB CHANGE aktif
TRISB=%00000111 : TRISC=%11111111 : TRISD=%00000000
'#############################################
SAY var word
SAYI VAR word
SAYIH VAR WORD
SAYIL VAR WORD
CLEAR
LCDOUT $FE,1
'#############################################
SAYICI:
LCDOUT $FE,$80," HEDEF : ",DEC5 SAYI
LCDOUT $FE,$C0," YER ",DEC5 SAY
goto SAYICI
'##############################################
DISABLE 'kesmeler pasif
KESME:
SAY=SAY+1
INTCON.1=0 'RB0/INT Bayrağı silindi
Resume 'geldiğin yere dön
Enable 'kesmeler aktif
END
'###############################################