﻿'*************************************************** ' EEPROM VERİTABANI '*************************************************** DEVICE=16F84A CONFIG XT_OSC , WDT_OFF , PWRTE_OFF XTAL = 4 DECLARE LCD_TYPE 0 DECLARE LCD_DTPIN PORTB.4 DECLARE LCD_ENPIN PORTB.3 DECLARE LCD_RSPIN PORTB.2 DECLARE LCD_INTERFACE 4 DECLARE LCD_LINES 2 SCL_PIN=PORTA.0 SDA_PIN=PORTA.1 ADRESS VAR WORD ADRESS2 VAR WORD SAYAC1 VAR WORD SAYAC2 VAR WORD YIL VAR BYTE AY VAR BYTE GUN VAR BYTE KAPI VAR BYTE GIRIS VAR WORD SAYAC1=0 SAYAC2=0 GUN=1 AY=1 YIL=5 ADRESS2=0 LCDOUT \$FE,1 ANA: LCDOUT \$FE,2 LCDOUT "BASLATMAK ICIN" LCDOUT \$FE,\$C0 LCDOUT "B2 TUSUNA BAS" IF PORTA.2=0 THEN GOTO DONGU1 ELSE GOTO ANA ENDIF DONGU1: FOR ADRESS=0 TO 32000 STEP 6 SAYAC1=SAYAC1+1 SAYAC2=SAYAC2+1 IF SAYAC1>=5 THEN SAYAC1=0 GUN=GUN+1 IF GUN>30 THEN GUN=1 AY=AY+1 IF AY>12 THEN AY=1 YIL=YIL+1 ENDIF ENDIF ENDIF KAPI=(SAYAC2//5)+1 GIRIS=ADRESS BUSOUT \$A0,ADRESS,[KAPI] PAUSE 10 BUSOUT \$A0,ADRESS+1,[GUN] PAUSE 10 BUSOUT \$A0,ADRESS+2,[AY] PAUSE 10 BUSOUT \$A0,ADRESS+3,[YIL] PAUSE 10 BUSOUT \$A0,ADRESS+4,[GIRIS.HIGHBYTE] PAUSE 10 BUSOUT \$A0,ADRESS+5,[GIRIS.LOWBYTE] PAUSE 10 LCDOUT \$FE,1 LCDOUT "%",DEC ADRESS/320 LCDOUT \$FE,\$C0 LCDOUT "TAMAMLANDI" NEXT ADRESS TAMAM: LCDOUT \$FE,1 LCDOUT "ISLEM TAMAM" PAUSE 1000 LCDOUT \$FE,1 LCDOUT "<>ILERI ICIN B4" DONGU2: IF PORTA.4=0 THEN ARTTIR IF PORTA.3=0 THEN AZALT GOTO DONGU2 ARTTIR: PAUSE 150 ADRESS2=ADRESS2+6 GOTO ISLEM AZALT: PAUSE 150 ADRESS2=ADRESS2-6 GOTO ISLEM ISLEM: KAPI=BUSIN \$A0,ADRESS2 PAUSE 10 GUN=BUSIN \$A0,ADRESS2+1 PAUSE 10 AY=BUSIN \$A0,ADRESS2+2 PAUSE 10 YIL=BUSIN \$A0,ADRESS2+3 PAUSE 10 GIRIS.HIGHBYTE=BUSIN \$A0,ADRESS2+4 PAUSE 10 GIRIS.LOWBYTE=BUSIN \$A0,ADRESS2+5 PAUSE 10 LCDOUT \$FE,1 LCDOUT DEC KAPI,".KAP ",DEC GUN,",",DEC AY,",200",DEC YIL LCDOUT \$FE,\$C0 LCDOUT DEC GIRIS," GIRIS" GOTO DONGU2 END