Satır Taramalı Kayan Yazı

Başlatan meyer, 18 Aralık 2011, 15:01:38

meyer

 Vermiş olduğunuz bilgiler doğrultusunda sorunla ilgilenmeye çalışacağım hocam..İyi günler dilerim...

xoom

Kodları paylaştığınızda biraz sorularım olabilir. paylaşımınızı bekliyorum tşkler..

meyer

#137
 İyi günler arkadaşlar,
Mitec hocamızın bahsettiği sorunu çözdüm sayılır..Yazı kayarken ekranda biraz titreme yapıyor ama gerçek ortamda nasıl olur bilemiyorum...Ekrandaki titremede düzeltibilebilir bir sorun zaten..Kodlara baktığınızda bunu kolaylıkla görebilirsiniz...
Devre şeması,.pbp kodu ve .hex kodu da ektedir arkadaşlar..
İyi günler dilerim..


'****************************************************************
'*  Name    : MATRIX_PANO_SAAT_ISI_TARIH_GUN_KAYAN_YAZI.BAS     *
'*  Author  : [HAKAN_ÖZKAN]                                     *
'*  Notice  : Copyright (c) 2011 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 13.01.2012                                        *
'*  Version : 3.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************
define OSC 20
DEFINE I2C_SLOW 1
'****************************************************************
asm
    __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
    __CONFIG _CONFIG2L, _BOR_ON_2L & _BORV_20_2L & _PWRT_OFF_2L
    __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
    __CONFIG _CONFIG3H, _CCP2MX_ON_3H
    __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
    __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
    __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
    __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
    __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
    __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
    __CONFIG _CONFIG7H, _EBTRB_OFF_7H
endasm
'********************************************************
INTCON2.7=0   ' PORTB Pull-up Enable bit
INTCON.7 =1   ' GIE : Global Interrupt Enable
INTCON.6 =1   ' PEIE: Peripheral Interrupt Enable
PIE1.5   =1   ' RCIE: USART Receive Interrupt Enable
ADCON0   =0
ADCON1   =7
'****************************************************************
On Interrupt GoTo KESME
'****************************************************************
DEFINE HSERIAL_BAUD  2400
DEFINE HSERIAL_RCSTA %10010000
DEFINE HSERIAL_TXSTA %00100000
DEFINE HSERIAL_CLEAR = On
'****************************************************************
TRISA=255 : TRISB=0 : TRISD=0 : TRISE=0  : TRISC=%10110111   
PORTA=0   : PORTB=0 : PORTD=0 : PORTE=0  : PORTC=0           
'74HC595*********************************************************
Symbol CLK1     =PORTB.0
Symbol DTA1     =PORTB.1
Symbol STROBE1  =PORTB.2
'DS18B20*********************************************************
SYMBOL COMM_PIN =PORTC.3
'DS1302**********************************************************
symbol  RTC_RST =PORTB.5                'RTC nin bağlandığı portlar
symbol  RTC_SCLK=PORTB.6
symbol  RTC_DTA =PORTB.7
'24LC256**********************************************************
SCL      VAR     PORTB.3                ' Clock pin 
SDA      VAR     PORTB.4                ' Data pin                 
'24LC256_DEGISKENLERI*********************************************
adress   VAR     WORD                   ' Adres
B1       VAR     BYTE                   ' Data1
B2       VAR     Byte                   ' Data2
'****************************************************************
NEGAT_ISI CON 1                         ' Negatif_Cold = 1
'****************************************************************
TUS         VAR BYTE
T           VAR Byte
HAM         VAR WORD
ISI         var WORD
rtcsec      VAR BYTE
rtcmin      VAR BYTE
rtchour     VAR BYTE
rtcyear     VAR BYTE
rtcmonth    VAR BYTE
rtcday      VAR BYTE
rtcdate     VAR BYTE
TEMP        VAR BYTE
VERI        VAR BYTE
SAYI        VAR BYTE 
SIGN        VAR BYTE
FLOAT       var BYTE
mem         var byte
BIRLER      VAR BYTE
ONLAR       VAR BYTE
SIGN_BITI VAR HAM.Bit11   '   +/- sıcaklık İşaret biti,  1 = olursa eksi sıcaklık
'****************************************************************
SUTUN     var Byte[680]   ' 1497 adet byte tipinde değişken tanımlanabilir.
YEDEK     VAR BYTE[680]
RAKAM     VAR BYTE
ARA       VAR BYTE
I         var WORD
X         var byte
W         var Byte
M         var WORD
G         VAR WORD
'''''''''''''''''''
yazi_reg  var byte
yeri      var byte
z         var byte
y         var byte 
A         VAR WORD
B         VAR BYTE
C         VAR BYTE
E         var byte
bilgi     var byte[90]
L         VAR BYTE
F         VAR BYTE
P         VAR BYTE
j         var byte
h         VAR BYTE
n         var bYTE
d         var bit
K         VAR BIT
u         var bit
V         VAR BIT
s         var bit
'****************************************************************
gosub SENSORYAZ
GOSUB SENSOROKU
Low RTC_RST              ' RTC yi resetle
Low RTC_SCLK
'****************************************************************
clear
pause 250
'****************************************************************
HSEROUT ["KLAVYEDEN GiRiLEN HARFLERiN MATRiX DiSPLAYDE GOSTERiLMESi",13,10]
HSEROUT ["*********************************************************",10]
HSEROUT ["***************************",13,10]
'****************************************************************
GOSUB TEMIZLE : I=0 : D=D+1
'**********Harici_eeprom_temizleme*******************************
'FOR G=0 TO 1000
' BILGI=$FF
'  I2CWrite SDA,SCL,$A0,adress,[bilgi] ' Her adrese datayı yaz
'  adress=adress+1
' PAUSE 10
'NEXT
'****************************************************************
BASLA:
    IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 : GOTO BASLA
    IF A=0 THEN GOTO BASLA
IF V=1 AND A<84 THEN GOTO KONTROL2
IF V=1 AND A>84 THEN GOTO KONTROL3
GOTO BASLA
'****************************************************************
BASLA1: 
GOTO AA       
''''''''''''''''''''
EE:
M=0 : D=D+1
    IF PORTC.0=1 THEN I=0 : a=0 : adress=0 : GOSUB TEMIZLE : GOTO BASLA
FOR I=0 TO (A*8)-1
    SUTUN[I]=YEDEK[I]
NEXT
''''''''''''''''''''
AA:
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause L
      Next
M=M+1
IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
    IF M<(A*8) THEN GOSUB sola_kay1 : GOTO AA
    if M<(A*8) then M=0
GOSUB TEMIZLE : I=0
GOTO SAAT_GOSTER
'****************************************************************
BASLA3:
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause L
      Next
M=M+1
IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
    IF M<(J*8) THEN GOSUB sola_kay3 : GOTO BASLA3
    if M<(J*8) then M=0
GOSUB TEMIZLE : I=0
GOTO SAAT_GOSTER
'****************************************************************
BASLA2:
Y=0 : G=0
if p=0 then A=0 : ADRESS=0 : Y=0 : GOTO BASLA3
     IF n=1 then adress=72
     IF n=2 then adress=144
     IF n=3 then adress=216
     IF n=4 then adress=288
     IF n=5 then adress=360
     IF n=6 then adress=432
     IF n=7 then adress=504
     IF n=8 then adress=648
     IF n=9 then adress=720
     IF n=10 then adress=792
GOTO AA1       
''''''''''''''''''''
EE1:
    IF PORTC.0=1 THEN I=0 : a=0 : adress=0 : GOSUB TEMIZLE : GOTO BASLA
''''''''''''''''''''
AA1:
G=G+1
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause L
      Next
M=M+1
''''''''''''''
'IF G//8=0 and G<(J*8) THEN
if G//7=0 then
    I2CRead SDA,SCL,$A0,adress,[bilgi[Y]] 'Her adresteki datayı oku B2 ye aktar
    ADRESS=ADRESS+1 : Y=Y+1
ENDIF
''''''''''''''
IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
    IF M<577 THEN GOSUB sola_kay2 : GOTO AA1   
    if M=577 then M=0
'''''
  FOR X=0 TO 1
    I2CRead SDA,SCL,$A0,adress,[bilgi[Y]] 'Her adresteki datayı oku B2 ye aktar
    ADRESS=ADRESS+1 : Y=Y+1
  NEXT
'''''   
'GOSUB TEMIZLE
K=0 : I=0 : Y=0
p=p-1 : n=n+1
'''''''''''''''''''''''''
  FOR X=0 TO 83
    BILGI=BILGI[Y]
     Y=Y+1
        gosub YERAL1
            for Z=0 TO 7                         
                GOSUB DATA_AL1
                    SUTUN[I]=VERI   
                I=I+1
            yeri=yeri+1
        NEXT   
    next
goto BASLA2
'****************************************************************
TEMIZLE:
FOR I=0 TO 95
SUTUN[I]=$FF
NEXT
GOSUB GOSTER
RETURN
'****************************************************************
KONTROL3:
IF K=1 THEN RETURN
P=B
F=F+1 : D=D+1 : n=n+1
HIGH PORTE.1
'IF F=1 THEN adress=0 
adress=0
    IF BILGI=8 THEN GOTO GOSTER3
    FOR X=0 TO 83
''
    I2CRead SDA,SCL,$A0,adress,[bilgi] 'Her adresteki datayı oku B2 ye aktar
    ADRESS=ADRESS+1
''
gosub YERAL1
    for Z=0 TO 7
        GOSUB DATA_AL1
            SUTUN[I]=VERI   
            I=I+1
        yeri=yeri+1
    NEXT   
next     
K=K+1
LOW PORTE.1 : low porte.2       
GOTO GOSTER3
'****************************************************************
GOSTER3:
    IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
''''
    FOR Z=0 TO 2
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 1
      Next
    NEXT
GOTO BASLA2     
'****************************************************************
KONTROL2:
IF K=1 THEN RETURN
HIGH PORTE.1
adress=0
    IF BILGI=8 THEN GOTO GOSTER2
    FOR X=0 TO (A-1)
''
    I2CRead SDA,SCL,$A0,adress,[bilgi] 'Her adresteki datayı oku B2 ye aktar
    ADRESS=ADRESS+1
''
gosub YERAL1
    for Z=0 TO 7
        GOSUB DATA_AL1
            SUTUN[I]=VERI   
            I=I+1
        yeri=yeri+1
    NEXT   
next
    FOR I=0 TO ((A*8)-1)
        YEDEK[I]=SUTUN[I]
    NEXT 
K=K+1
LOW PORTE.1 : low porte.2       
GOTO GOSTER2
'****************************************************************
GOSTER2:
    IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
''''
    FOR Z=0 TO 2
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 1
      Next
    NEXT
GOTO BASLA1     
'****************************************************************
GOSTER4:
for I=0 to 95
    YEDEK[I]=$FF
next I
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[YEDEK[I+88],YEDEK[I+80],YEDEK[I+72],_
YEDEK[I+64],YEDEK[I+56],YEDEK[I+48],YEDEK[I+40],_
  YEDEK[I+32],YEDEK[I+24],YEDEK[I+16],YEDEK[I+8],YEDEK[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pauseus 5
      Next
RETURN
'****************************************************************
sola_kay3:
GOSUB GOSTER4
For I=0 To (J*8)-2
    sutun[i]= sutun[i+1]
   If i=(J*8)-1 Then sutun[(J*8)-1]=sutun[0]
Next i
pauseus 1000
    if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
    IF PORTC.0=1 THEN I=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
sola_kay2: 
GOSUB GOSTER4
For I=0 To 688
    sutun[i]= sutun[i+1]
   If i=689 Then sutun[689]=sutun[0]
Next i
pauseus 1000
    if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
    IF PORTC.0=1 THEN I=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
sola_kay1:
GOSUB GOSTER4         
For I=0 To (A*8)-2
    sutun[i]= sutun[i+1]
        If i=((A*8)-1) Then sutun[(A*8)-1]=sutun[0]
    Next i
pauseus 1000
    if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
    IF PORTC.0=1 THEN I=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
sola_kay:
GOSUB GOSTER4
For I=0 To 94
    sutun[i]= sutun[i+1]
   If i=95 Then sutun[95]=sutun[0]
Next i
pauseus 1000
    if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
    IF PORTC.0=1 THEN I=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
saga_kay:
For I=94 to 0 step -1
    sutun[i]= sutun[i-1]
   If i=0 Then sutun[0]=sutun[95]
Next i
pauseus 10000
     if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
     IF PORTC.0=1 THEN I=0 : a=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
asagi_kay:
for I=0 to 95
   ARA=SUTUN[I]
   z=ARA.7
FOR X=7 to 1 STEP -1
   ARA.0[x]=ARA.0[X-1]
NEXT
   ara.0=Z
   sutun[I]=ARA
next
pauseus 3500
     if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
     IF PORTC.0=1 THEN I=0 : a=0 : GOSUB TEMIZLE : GOTO BASLA
Return
'****************************************************************
yukari_kay:
FOR I=0 to 95
   ARA=SUTUN[I]
   z=ARA.0
FOR X=0 to 6
   ARA.0[X]=ARA.0[X+1]
NEXT
   ARA.7=Z
   SUTUN[I]=ARA
NEXT
pauseus 5000
     if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
     IF PORTC.0=1 THEN I=0 : a=0 : M=0 :  GOSUB TEMIZLE : GOTO BASLA
Return
'****************************************************************
GECIKME:
FOR VERI=0 TO 1200
PAUSEUS 1000
NEXT
RETURN
'****************************************************************
GECIKME1:
FOR VERI=0 TO 300
PAUSEUS 1000
NEXT
RETURN
'****************************************************************   
kontrol:
if rtchour=24  then rtchour=0    : rtcdate=rtcdate+1 : rtcday=rtcday+1
if rtcmin=60   then rtcmin=0
  if rtchour=255 then rtchour=23 : rtcdate=rtcdate-1 : rtcday=rtcday-1
if rtcmin=255  then rtcmin=59
gosub zaman_yaz
gosub gecikme
gosub zaman_oku
return
'****************************************************************
SAAT_GOSTER1:
gosub temizle
'''''''''''''''''''''
bb:
FOR W=0 TO 5
GOSUB ZAMAN_OKU
'''''''''''''''''''''
if portc.0=1         then u=u+1             :gosub kontrol 
if u=0 and portc.1=1 then rtchour=rtchour+1 :gosub kontrol   
if u=0 and portc.2=1 then rtchour=rtchour-1 :gosub kontrol
if u=1 and portc.1=1 then rtcmin=rtcmin+1   :gosub kontrol
if u=1 and portc.2=1 then rtcmin=rtcmin-1   :gosub kontrol
'''''''''''''''''''''
temp=" "
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
        SUTUN[I+80]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtchour dig 1
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtchour dig 0
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=":"
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmin dig 1
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmin dig 0
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=":"
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcsec dig 1
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcsec dig 0
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
GOSUB GOSTER
NEXT W
    IF PORTC.4=1 THEN gosub gecikme :GOSUB TEMIZLE :m=0: GOTO EE
goto bb
'****************************************************************
SAAT_GOSTER:
E=0
        if portc.4=1 then GOSUB TEMIZLE :goto SAAT_GOSTER1
gosub zaman_oku
C=C+1
    iF C=115 THEN C=0:gosub cc: I=0 :GOTO ISI_GOSTER
''''''''''''''''
temp=" "
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
        SUTUN[I+80]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtchour dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtchour dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=":"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmin dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmin dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=":"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcsec dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcsec dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
GOSUB GOSTER
    IF PORTC.0=1 THEN I=0 : a=0 : M=0 : adress=0 :  GOSUB TEMIZLE : GOTO BASLA
goto SAAT_GOSTER
'********************************************************
ISI_GOSTER:
gosub SENSOROKU
FF:
''''''
'FOR W=0 TO 14
        if portc.4=1 then GOSUB TEMIZLE :goto SAAT_GOSTER1
C=C+1
    iF C=100 THEN C=0: gosub cc : I=0 :GOTO TARIH_GOSTER
''''''''''''''''
temp=" "
    gosub YERAL
        for Z=0 to 23
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI       
        SUTUN[I+64]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=ISI dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=ISI dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=223
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp="C"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
GOSUB GOSTER
    IF PORTC.0=1 THEN I=0 : a=0 : M=0 : adress=0 :  GOSUB TEMIZLE : GOTO BASLA
'NEXT
'goto ISI_GOSTER
GOTO FF
'****************************************************************
TARIH_GOSTER:
        if portc.4=1 then GOSUB TEMIZLE :goto SAAT_GOSTER1
gosub zaman_oku
C=C+1
    iF C=100 THEN C=0: gosub cc:gosub gecikme1: I=0 :GOTO GUN_GOSTER
''''''''''''''''
temp=" "
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
        SUTUN[I+80]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcDATE dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcdate dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp="/"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmonth dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmonth dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp="/"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcyear dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcyear dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
GOSUB GOSTER
    IF PORTC.0=1 THEN I=0 : a=0 : M=0 : adress=0 :  GOSUB TEMIZLE : GOTO BASLA
goto TARIH_GOSTER
'****************************************************************
GUN_GOSTER: 
        if portc.4=1 then GOSUB TEMIZLE :goto SAAT_GOSTER1
c=c+1
iF C=100  and F=0 THEN C=0: gosub cc:gosub gecikme1:GOSUB TEMIZLE:GOTO ee
iF C=100  and F=1 THEN C=0: gosub cc:gosub gecikme1:GOSUB TEMIZLE:F=0:M=0:K=0:GOTO kontrol3
GOSUB ZAMAN_OKU
gosub dd
    IF PORTC.0=1 THEN I=0 : a=0 : M=0 : adress=0 :  GOSUB TEMIZLE : GOTO BASLA
GOTO GUN_GOSTER
'****************************************************************
cc:
E=E+1
If E<80                  Then gosub saga_kay    : GOTO goster1 
If E>80    and E<160     Then gosub sola_kay    : GOTO goster1
If E>160   and E<169     Then gosub asagi_kay   : GOTO goster1
if E>169   and E<178     then gosub yukari_kay  : GOTO goster1 
If E>178   then E=0
return
'****************************************************************
GOSTER1:
gosub zaman_oku
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 3
      Next
goto cc
'****************************************************************
GOSTER:
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 3
      Next
RETURN
'****************************************************************
dd:
yazi_reg=0 : i=0
For W=0 To 11
    gosub yazi1 : yazi_reg=yazi_reg+1
        gosub YERAL1
    for z=0 to 7
        GOSUB DATA_AL1
            SUTUN[I]=VERI
                I=I+1
            yeri=yeri+1
        next
    next
     gosub goster
return
'****************************************************************
yazi1:
if rtcday=1 then LookUp yazi_reg,["   PAZAR    "],bilgi
if rtcday=2 then LookUp yazi_reg,[" PAZARTESi  "],bilgi
if rtcday=3 then LookUp yazi_reg,["    SALI    "],bilgi
if rtcday=4 then LookUp yazi_reg,["  CARSAMBA  "],bilgi
if rtcday=5 then LookUp yazi_reg,["  PERSEMBE  "],bilgi
if rtcday=6 then LookUp yazi_reg,["    CUMA    "],bilgi
if rtcday=7 then LookUp yazi_reg,[" CUMARTESi  "],bilgi
Return
'****************************************************************     
YERAL:
select case temp
    case 0   : yeri=0   : return
    case 1   : yeri=8   : return
    case 2   : yeri=16  : return
    case 3   : yeri=24  : return
    case 4   : yeri=32  : return
    case 5   : yeri=40  : return
    case 6   : yeri=48  : return
    case 7   : yeri=56  : return
    case 8   : yeri=64  : return
    case 9   : yeri=72  : return
    case 223 : yeri=80  : return
    case "C" : yeri=88  : return
    case ":" : yeri=96  : return
    case "/" : yeri=104 : return
    case " " : yeri=112 : return
end select
return
'****************************************************************
data_al:
    lookup yeri,[$FF,$C1,$80,$A6,$B2,$80,$C1,$FF,_     '0
                 $FF,$BF,$BD,$80,$80,$BF,$BF,$FF,_     '1
                 $FF,$9D,$8C,$A6,$B2,$98,$9D,$FF,_     '2
                 $FF,$DD,$9C,$B6,$B6,$80,$C9,$FF,_     '3
                 $FF,$E7,$E3,$E9,$80,$80,$E7,$FF,_     '4
                 $FF,$D8,$98,$BA,$BA,$82,$C6,$FF,_     '5
                 $FF,$C3,$81,$B4,$B6,$86,$CF,$FF,_     '6
                 $FF,$FC,$FC,$8E,$86,$F0,$F8,$FF,_     '7
                 $FF,$C9,$80,$B6,$B6,$80,$C9,$FF,_     '8
                 $FF,$F9,$B0,$B6,$96,$C0,$E1,$FF,_     '9
                 $FF,$FF,$F9,$F0,$F6,$F0,$F9,$FF,_     'Derece
                 $FF,$C1,$80,$BE,$BE,$BE,$DD,$FF,_     'C
                 $FF,$FF,$FF,$99,$99,$FF,$FF,$FF,_     ':
                 $FF,$9F,$CF,$E7,$F3,$F9,$FC,$FF,_     '/
                 $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF],VERI 'Boşluk
RETURN
'****************************************************************
data_al_ters:
    lookup yeri,[$00,$3E,$71,$59,$4D,$47,$3E,$00,_     '0
                 $00,$40,$42,$7F,$7F,$40,$40,$00,_     '1
                 $00,$62,$73,$59,$4D,$67,$62,$00,_     '2
                 $00,$22,$63,$49,$49,$7F,$36,$00,_     '3
                 $00,$18,$1C,$16,$7F,$7F,$18,$00,_     '4
                 $00,$27,$67,$45,$45,$7D,$39,$00,_     '5
                 $00,$3C,$7E,$4B,$49,$79,$30,$00,_     '6
                 $00,$03,$03,$71,$79,$0F,$07,$00,_     '7
                 $00,$36,$7F,$49,$49,$7F,$36,$00,_     '8
                 $00,$06,$4F,$49,$69,$3F,$1E,$00,_     '9
                 $00,$00,$06,$0F,$09,$0F,$06,$00,_     'Derece
                 $00,$3E,$7F,$41,$41,$63,$22,$00,_     'C
                 $00,$00,$00,$36,$36,$00,$00,$00,_     ':
                 $00,$60,$30,$18,$0C,$06,$03,$00,_     '/
                 $00,$00,$00,$00,$00,$00,$00,$00],VERI 'Boşluk
RETURN
'****************************************************************
YERAL1:
select case bilgi
    case "A" : yeri=0   : return
    case "B" : yeri=8   : return
    case "C" : yeri=16  : return
    case "D" : yeri=24  : return
    case "E" : yeri=32  : return
    case "F" : yeri=40  : return
    case "G" : yeri=48  : return
    case "H" : yeri=56  : return
    case "I" : yeri=64  : return
    case "i" : yeri=72  : return
    case "J" : yeri=80  : return
    case "K" : yeri=88  : return
    case "L" : yeri=96  : return
    case "M" : yeri=104 : return
    case "N" : yeri=112 : return
    case "O" : yeri=120 : return
    case "P" : yeri=128 : return
    case "R" : yeri=136 : return
    case "S" : yeri=144 : return
    case "T" : yeri=152 : return
    case "U" : yeri=160 : return
    case "V" : yeri=168 : return
    case "Y" : yeri=176 : return
    case "Z" : yeri=184 : return
    CASE "." : YERI=192 : RETURN
    case "W" : yeri=200 : return
    case "Q" : yeri=208 : return
    case "/" : yeri=216 : return 
    case ":" : yeri=224 : return
    case "-" : yeri=232 : return 
    case " " : yeri=240 : return     
end select
return
'****************************************************************
data_al1:
    LookUp yeri,[$FF,$81,$F6,$F6,$F6,$F6,$81,$FF,_     ;  A
                 $FF,$80,$B6,$B6,$B6,$B6,$C9,$FF,_     ;  B
                 $FF,$C1,$BE,$BE,$BE,$BE,$DD,$FF,_     ;  C
                 $FF,$80,$BE,$BE,$BE,$BE,$C1,$FF,_     ;  D
                 $FF,$80,$B6,$B6,$B6,$B6,$BE,$FF,_     ;  E
                 $FF,$80,$F6,$F6,$F6,$F6,$FE,$FF,_     ;  F
                 $FF,$80,$BE,$B6,$B6,$B6,$86,$FF,_     ;  G
                 $FF,$80,$F7,$F7,$F7,$F7,$80,$FF,_     ;  H
                 $FF,$BE,$BE,$80,$80,$BE,$BE,$FF,_     ;  I
                 $FF,$BF,$BB,$82,$82,$BB,$BF,$FF,_     ;  i
                 $FF,$CE,$BE,$80,$80,$FE,$FF,$FF,_     ;  J
                 $FF,$80,$F7,$EB,$DD,$BE,$FF,$FF,_     ;  K
                 $FF,$80,$BF,$BF,$BF,$BF,$BF,$FF,_     ;  L
                 $FF,$80,$FB,$F7,$F7,$FB,$80,$FF,_     ;  M
                 $FF,$80,$FB,$F7,$EF,$DF,$80,$FF,_     ;  N
                 $FF,$C1,$BE,$BE,$BE,$BE,$C1,$FF,_     ;  O
                 $FF,$80,$F6,$F6,$F6,$F6,$F9,$FF,_     ;  P
                 $FF,$80,$F6,$F6,$E6,$D6,$B9,$FF,_     ;  R
                 $FF,$D9,$B6,$B6,$B6,$B6,$CD,$FF,_     ;  S
                 $FF,$FE,$FE,$80,$80,$FE,$FE,$FF,_     ;  T
                 $FF,$C0,$BF,$BF,$BF,$BF,$C0,$FF,_     ;  U
                 $FF,$E0,$DF,$BF,$BF,$DF,$E0,$FF,_     ;  V
                 $FF,$FC,$FB,$87,$87,$FB,$FC,$FF,_     ;  Y                     
                 $FF,$9E,$AE,$B6,$BA,$BC,$BE,$FF,_     ;  Z
                 $FF,$FF,$FF,$9F,$9F,$FF,$FF,$FF,_     ;  .
                 $FF,$80,$DF,$EF,$EF,$DF,$80,$FF,_     ;  W
                 $FF,$C1,$BE,$BE,$AE,$9E,$81,$FF,_     ;  Q
                 $FF,$9F,$CF,$E7,$F3,$F9,$FC,$FF,_     ;  /
                 $FF,$FF,$FF,$99,$99,$FF,$FF,$FF,_     ;  :
                 $FF,$E7,$E7,$E7,$E7,$E7,$E7,$FF,_     ;  _
                 $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF],veri ;  BOŞLUK
Return
'****************************************************************
'***Sensör_Oku***************************************************
SENSOROKU:
           OWOUT   Comm_Pin, 1, [$CC, $44]' ISI değerini oku
Bekle:
'           OWIN    Comm_Pin, 4, [TEMP]    ' Busy değerini oku
'           IF      TEMP = 0 THEN Bekle  ' hala meşgulmü? , evet ise goto Bekle..!
           OWOUT   Comm_Pin, 1, [$CC, $BE]' scratchpad memory oku
           OWIN    Comm_Pin, 2, [HAM.Lowbyte, HAM.Highbyte]' İki byte oku ve okumayı bitir.
           GOSUB   Hesapla
           RETURN
'****************************************************************           
SENSORYAZ:
          OWOUT   COMM_Pin, 1, [$CC, $4E, $00,$00,$31]
          return           
'****************************************************************             
Hesapla:                 ' Ham değerden Santigrat derece hesabı
    Sign  = "+"
    IF SIGN_BITI = NEGAT_ISI THEN
       Sign   = "-" 
       ham=($ffff-ham)+1
    endif
    ISI = Ham*10/16
GEC:
    FLOAT = (ISI //10)
    ISI=ISI/10
    RETURN                     
'****************************************************************
'****************************************************************
'***********Zaman Oku***********
ZAMAN_OKU:
         High RTC_RST
         SHiftOut RTC_DTA, RTC_SCLK, 0, [$BF]
         SHiftIn RTC_DTA, RTC_SCLK, 1, [rtcsec, rtcmin, rtchour,rtcdate , rtcmonth,rtcday,rtcyear, MEM]
         Low RTC_RST
         MEM=rtcsec  : GoSub CEVIR:rtcsec=SAYI 
         MEM=rtcmin  : GoSub CEVIR:rtcmin=SAYI
         MEM=rtchour : GoSub CEVIR:rtchour=SAYI
         MEM=rtcdate : GoSub CEVIR:rtcdate=SAYI
         MEM=rtcmonth: GoSub CEVIR:rtcmonth=SAYI
         MEM=rtcyear : GoSub CEVIR:rtcyear=SAYI
         MEM=rtcday  : GoSub CEVIR: rtcday=SAYI       
         Return
'***********Zaman Yaz***********
ZAMAN_YAZ:
    MEM=rtcsec   : GoSub TERSCEVIR :rtcsec=SAYI
    MEM=rtcmin   : GoSub TERSCEVIR :rtcmin=SAYI
    MEM=rtchour  : GoSub TERSCEVIR :rtchour=SAYI
    MEM=rtcdate  : GoSub TERSCEVIR :rtcdate=SAYI
    MEM=rtcmonth : GoSub TERSCEVIR :rtcmonth=SAYI
    MEM=rtcyear  : GoSub TERSCEVIR :rtcyear=SAYI
    MEM=rtcday   : GoSub TERSCEVIR :rtcday=SAYI
       
    High  RTC_RST
    SHiftOut RTC_DTA, RTC_SCLK, 0, [$8E, 0]
    Low RTC_RST:pause 1
    High RTC_RST         
    SHiftOut  RTC_DTA, RTC_SCLK, 0, [$BE, rtcsec, rtcmin, rtchour,rtcdate , rtcmonth, rtcday, rtcyear, 0]  'YAZ
    Low RTC_RST
    pause 10
Return
'***********Çevir***********               
CEVIR:
    ONLAR=MEM & %01110000
    ONLAR=ONLAR>>4
    BIRLER=MEM & %00001111
    SAYI=ONLAR*10+BIRLER
RETURN 
'***********Ters Çevir***********
TERSCEVIR:               
    ONLAR=MEM DIG 1
    ONLAR=ONLAR<<4
    BIRLER=MEM DIG 0
    SAYI=ONLAR+BIRLER
RETURN
'**************************************************************** 
Disable
KESME:
A=A+1 : K=0 : V=0
'''''
    IF A=1 THEN
        HSERIN [WAIT("SIFRE"),BILGI]
            I2CWrite SDA,SCL,$A0,adress,[bilgi] ' Her adrese datayı yaz
            adress=adress+1
            PAUSE 5
    ELSE
        HSERIN [BILGI]
            I2CWrite SDA,SCL,$A0,adress,[bilgi] ' Her adrese datayı yaz
            adress=adress+1
            PAUSE 5 
ENDIF
'''''
'IF adress>680  then high porte.2 ' Uyarı ledini yak
        IF adress<15                THEN L=4
        IF adress<15 AND adress<30  THEN L=3
        IF adress>30 AND adress<60  THEN L=2
        if adress>60 AND adress<100 THEN L=1
'''''
HSEROUT [BILGI,10]
    IF bilgi=13 THEN V=1 : p=A/84 : B=P :  J=A//84 : J=J+(p*12)      ' enter
'''''
IF bilgi=8  then                                                 ' backspace
    high porte.0
        FOR W=0 TO 1
            adress=adress-1
                bilgi=$ff
                    I2CWrite SDA,SCL,$A0,adress,[bilgi]
                PAUSE 10
            NEXT
        low porte.0
     A=A-2   
ENDIF
'''''   
PIR1.5=0                        ' RCIF : USART Receive Interrupt Flag bit
  Resume
ENABLE
Return   
'****************************************************************
end


meyer

 Kodda ufak bir düzeltme yaptım arkadaşlar..Dosyalar ektedir...
İyi günler dilerim..


'****************************************************************
'*  Name    : MATRIX_PANO_SAAT_ISI_TARIH_GUN_KAYAN_YAZI.BAS     *
'*  Author  : [HAKAN_ÖZKAN]                                     *
'*  Notice  : Copyright (c) 2011 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 13.01.2012                                        *
'*  Version : 3.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************
define OSC 20
DEFINE I2C_SLOW 1
'****************************************************************
asm
    __CONFIG _CONFIG1H, _OSCS_OFF_1H & _HS_OSC_1H
    __CONFIG _CONFIG2L, _BOR_ON_2L & _BORV_20_2L & _PWRT_OFF_2L
    __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
    __CONFIG _CONFIG3H, _CCP2MX_ON_3H
    __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
    __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
    __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
    __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
    __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
    __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
    __CONFIG _CONFIG7H, _EBTRB_OFF_7H
endasm
'********************************************************
INTCON2.7=0   ' PORTB Pull-up Enable bit
INTCON.7 =1   ' GIE : Global Interrupt Enable
INTCON.6 =1   ' PEIE: Peripheral Interrupt Enable
PIE1.5   =1   ' RCIE: USART Receive Interrupt Enable
ADCON0   =0
ADCON1   =7
'****************************************************************
On Interrupt GoTo KESME
'****************************************************************
DEFINE HSERIAL_BAUD  2400
DEFINE HSERIAL_RCSTA %10010000
DEFINE HSERIAL_TXSTA %00100000
DEFINE HSERIAL_CLEAR = On
'****************************************************************
TRISA=255 : TRISB=0 : TRISD=0 : TRISE=0  : TRISC=%10110111   
PORTA=0   : PORTB=0 : PORTD=0 : PORTE=0  : PORTC=0           
'74HC595*********************************************************
Symbol CLK1     =PORTB.0
Symbol DTA1     =PORTB.1
Symbol STROBE1  =PORTB.2
'DS18B20*********************************************************
SYMBOL COMM_PIN =PORTC.3
'DS1302**********************************************************
symbol  RTC_RST =PORTB.5                'RTC nin bağlandığı portlar
symbol  RTC_SCLK=PORTB.6
symbol  RTC_DTA =PORTB.7
'24LC256**********************************************************
SCL      VAR     PORTB.3                ' Clock pin 
SDA      VAR     PORTB.4                ' Data pin                 
'24LC256_DEGISKENLERI*********************************************
adress   VAR     WORD                   ' Adres
B1       VAR     BYTE                   ' Data1
B2       VAR     Byte                   ' Data2
'****************************************************************
NEGAT_ISI CON 1                         ' Negatif_Cold = 1
'****************************************************************
TUS         VAR BYTE
T           VAR Byte
HAM         VAR WORD
ISI         var WORD
rtcsec      VAR BYTE
rtcmin      VAR BYTE
rtchour     VAR BYTE
rtcyear     VAR BYTE
rtcmonth    VAR BYTE
rtcday      VAR BYTE
rtcdate     VAR BYTE
TEMP        VAR BYTE
VERI        VAR BYTE
SAYI        VAR BYTE 
SIGN        VAR BYTE
FLOAT       var BYTE
mem         var byte
BIRLER      VAR BYTE
ONLAR       VAR BYTE
SIGN_BITI VAR HAM.Bit11   '   +/- sıcaklık İşaret biti,  1 = olursa eksi sıcaklık
'****************************************************************
SUTUN     var Byte[680]   ' 1497 adet byte tipinde değişken tanımlanabilir.
YEDEK     VAR BYTE[570]
YEDEK1    VAR BYTE[96]
RAKAM     VAR BYTE
ARA       VAR BYTE
I         var WORD
X         var byte
W         var Byte
M         var WORD
G         VAR WORD
'''''''''''''''''''
yazi_reg  var byte
yeri      var byte
z         var byte
y         var byte 
A         VAR WORD
B         VAR BYTE
C         VAR BYTE
E         var byte
bilgi     var byte[90]
L         VAR BYTE
F         VAR BYTE
P         VAR BYTE
j         var byte
h         VAR BYTE
n         var bYTE
d         var bit
K         VAR BIT
u         var bit
V         VAR BIT
s         var bit
'****************************************************************
gosub SENSORYAZ
GOSUB SENSOROKU
Low RTC_RST              ' RTC yi resetle
Low RTC_SCLK
'****************************************************************
clear
pause 250
'****************************************************************
HSEROUT ["KLAVYEDEN GiRiLEN HARFLERiN MATRiX DiSPLAYDE GOSTERiLMESi",13,10]
HSEROUT ["*********************************************************",10]
HSEROUT ["***************************",13,10]
'****************************************************************
GOSUB TEMIZLE : I=0 : D=D+1
'**********Harici_eeprom_temizleme*******************************
'FOR G=0 TO 1000
' BILGI=$FF
'  I2CWrite SDA,SCL,$A0,adress,[bilgi] ' Her adrese datayı yaz
'  adress=adress+1
' PAUSE 10
'NEXT
'****************************************************************
BASLA:
    IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 : GOTO BASLA
    IF A=0 THEN GOTO BASLA
IF V=1 AND A<84 THEN GOTO KONTROL2
IF V=1 AND A>84 THEN GOTO KONTROL3
GOTO BASLA
'****************************************************************
BASLA1: 
GOTO AA       
''''''''''''''''''''
EE:
M=0 : D=D+1
    IF PORTC.0=1 THEN I=0 : a=0 : adress=0 : GOSUB TEMIZLE : GOTO BASLA
FOR I=0 TO (A*8)-1
    SUTUN[I]=YEDEK[I]
NEXT
''''''''''''''''''''
AA:
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause L
      Next
M=M+1
IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
    IF M<(A*8) THEN GOSUB sola_kay1 : GOTO AA
    if M<(A*8) then M=0
GOSUB TEMIZLE : I=0
GOTO SAAT_GOSTER
'****************************************************************
BASLA3:
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause L
      Next
M=M+1
IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
    IF M<(J*8) THEN GOSUB sola_kay3 : GOTO BASLA3
    if M<(J*8) then M=0
GOSUB TEMIZLE : I=0
GOTO SAAT_GOSTER
'****************************************************************
BASLA2:
Y=0 : G=0
if p=0 then A=0 : ADRESS=0 : Y=0 : GOTO BASLA3
     IF n=1 then adress=72
     IF n=2 then adress=144
     IF n=3 then adress=216
     IF n=4 then adress=288
     IF n=5 then adress=360
     IF n=6 then adress=432
     IF n=7 then adress=504
     IF n=8 then adress=648
     IF n=9 then adress=720
     IF n=10 then adress=792
GOTO AA1       
''''''''''''''''''''
EE1:
    IF PORTC.0=1 THEN I=0 : a=0 : adress=0 : GOSUB TEMIZLE : GOTO BASLA
''''''''''''''''''''
AA1:
G=G+1
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause L
      Next
M=M+1
''''''''''''''
'IF G//8=0 and G<(J*8) THEN
if G//7=0 then
    I2CRead SDA,SCL,$A0,adress,[bilgi[Y]] 'Her adresteki datayı oku B2 ye aktar
    ADRESS=ADRESS+1 : Y=Y+1
ENDIF
''''''''''''''
IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
    IF M<577 THEN GOSUB sola_kay2 : GOTO AA1   
    if M=577 then M=0
'''''
  FOR X=0 TO 1
    I2CRead SDA,SCL,$A0,adress,[bilgi[Y]] 'Her adresteki datayı oku B2 ye aktar
    ADRESS=ADRESS+1 : Y=Y+1
  NEXT
'''''   
'GOSUB TEMIZLE
K=0 : I=0 : Y=0
p=p-1 : n=n+1
'''''''''''''''''''''''''
  FOR X=0 TO 83
    BILGI=BILGI[Y]
     Y=Y+1
        gosub YERAL1
            for Z=0 TO 7                         
                GOSUB DATA_AL1
                    SUTUN[I]=VERI   
                I=I+1
            yeri=yeri+1
        NEXT   
    next
goto BASLA2
'****************************************************************
TEMIZLE:
FOR I=0 TO 95
SUTUN[I]=$FF
NEXT
GOSUB GOSTER
RETURN
'****************************************************************
KONTROL3:
IF K=1 THEN RETURN
P=B
F=F+1 : D=D+1 : n=n+1
HIGH PORTE.1
'IF F=1 THEN adress=0 
adress=0
    IF BILGI=8 THEN GOTO GOSTER3
    FOR X=0 TO 83
''
    I2CRead SDA,SCL,$A0,adress,[bilgi] 'Her adresteki datayı oku B2 ye aktar
    ADRESS=ADRESS+1
''
gosub YERAL1
    for Z=0 TO 7
        GOSUB DATA_AL1
            SUTUN[I]=VERI   
            I=I+1
        yeri=yeri+1
    NEXT   
next     
K=K+1
LOW PORTE.1 : low porte.2       
GOTO GOSTER3
'****************************************************************
GOSTER3:
    IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
''''
    FOR Z=0 TO 2
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 1
      Next
    NEXT
GOTO BASLA2     
'****************************************************************
KONTROL2:
IF K=1 THEN RETURN
HIGH PORTE.1
adress=0
    IF BILGI=8 THEN GOTO GOSTER2
    FOR X=0 TO (A-1)
''
    I2CRead SDA,SCL,$A0,adress,[bilgi] 'Her adresteki datayı oku B2 ye aktar
    ADRESS=ADRESS+1
''
gosub YERAL1
    for Z=0 TO 7
        GOSUB DATA_AL1
            SUTUN[I]=VERI   
            I=I+1
        yeri=yeri+1
    NEXT   
next
    FOR I=0 TO ((A*8)-1)
        YEDEK[I]=SUTUN[I]
    NEXT 
K=K+1
LOW PORTE.1 : low porte.2       
GOTO GOSTER2
'****************************************************************
GOSTER2:
    IF PORTC.0=1 THEN GOSUB TEMIZLE : I=0 : a=0 : M=0 : adress=0 :  GOTO BASLA
''''
    FOR Z=0 TO 2
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 1
      Next
    NEXT
GOTO BASLA1     
'****************************************************************
GOSTER4:
FOR I=0 TO 95
YEDEK1[I]=$FF
NEXT I
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[YEDEK1[I+88],YEDEK1[I+80],YEDEK1[I+72],_
YEDEK1[I+64],YEDEK1[I+56],YEDEK1[I+48],YEDEK1[I+40],_
  YEDEK1[I+32],YEDEK1[I+24],YEDEK1[I+16],YEDEK1[I+8],YEDEK1[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pauseus 5
      Next
RETURN
'****************************************************************
sola_kay3:
GOSUB GOSTER4
For I=0 To (J*8)-2
    sutun[i]= sutun[i+1]
   If i=(J*8)-1 Then sutun[(J*8)-1]=sutun[0]
Next i
pauseus 1000
    if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
    IF PORTC.0=1 THEN I=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
sola_kay2: 
GOSUB GOSTER4
For I=0 To 688
    sutun[i]= sutun[i+1]
   If i=689 Then sutun[689]=sutun[0]
Next i
pauseus 1000
    if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
    IF PORTC.0=1 THEN I=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
sola_kay1:
GOSUB GOSTER4         
For I=0 To (A*8)-2
    sutun[i]= sutun[i+1]
        If i=((A*8)-1) Then sutun[(A*8)-1]=sutun[0]
    Next i
pauseus 1000
    if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
    IF PORTC.0=1 THEN I=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
sola_kay:
GOSUB GOSTER4
For I=0 To 94
    sutun[i]= sutun[i+1]
   If i=95 Then sutun[95]=sutun[0]
Next i
pauseus 1000
    if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
    IF PORTC.0=1 THEN I=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
saga_kay:
For I=94 to 0 step -1
    sutun[i]= sutun[i-1]
   If i=0 Then sutun[0]=sutun[95]
Next i
pauseus 10000
     if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
     IF PORTC.0=1 THEN I=0 : a=0 : GOSUB TEMIZLE : GOTO BASLA
return
'****************************************************************
asagi_kay:
for I=0 to 95
   ARA=SUTUN[I]
   z=ARA.7
FOR X=7 to 1 STEP -1
   ARA.0[x]=ARA.0[X-1]
NEXT
   ara.0=Z
   sutun[I]=ARA
next
pauseus 3500
     if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
     IF PORTC.0=1 THEN I=0 : a=0 : GOSUB TEMIZLE : GOTO BASLA
Return
'****************************************************************
yukari_kay:
FOR I=0 to 95
   ARA=SUTUN[I]
   z=ARA.0
FOR X=0 to 6
   ARA.0[X]=ARA.0[X+1]
NEXT
   ARA.7=Z
   SUTUN[I]=ARA
NEXT
pauseus 5000
     if portc.4=1 then GOSUB TEMIZLE :  goto SAAT_GOSTER1
     IF PORTC.0=1 THEN I=0 : a=0 : M=0 :  GOSUB TEMIZLE : GOTO BASLA
Return
'****************************************************************
GECIKME:
FOR VERI=0 TO 1200
PAUSEUS 1000
NEXT
RETURN
'****************************************************************
GECIKME1:
FOR VERI=0 TO 300
PAUSEUS 1000
NEXT
RETURN
'****************************************************************   
kontrol:
if rtchour=24  then rtchour=0    : rtcdate=rtcdate+1 : rtcday=rtcday+1
if rtcmin=60   then rtcmin=0
  if rtchour=255 then rtchour=23 : rtcdate=rtcdate-1 : rtcday=rtcday-1
if rtcmin=255  then rtcmin=59
gosub zaman_yaz
gosub gecikme
gosub zaman_oku
return
'****************************************************************
SAAT_GOSTER1:
gosub temizle
'''''''''''''''''''''
bb:
FOR W=0 TO 5
GOSUB ZAMAN_OKU
'''''''''''''''''''''
if portc.0=1         then u=u+1             :gosub kontrol 
if u=0 and portc.1=1 then rtchour=rtchour+1 :gosub kontrol   
if u=0 and portc.2=1 then rtchour=rtchour-1 :gosub kontrol
if u=1 and portc.1=1 then rtcmin=rtcmin+1   :gosub kontrol
if u=1 and portc.2=1 then rtcmin=rtcmin-1   :gosub kontrol
'''''''''''''''''''''
temp=" "
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
        SUTUN[I+80]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtchour dig 1
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtchour dig 0
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=":"
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmin dig 1
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmin dig 0
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=":"
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcsec dig 1
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcsec dig 0
    gosub YERAL
        for z=0 to 7
            GOSUB DATA_AL
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
GOSUB GOSTER
NEXT W
    IF PORTC.4=1 THEN gosub gecikme :GOSUB TEMIZLE :m=0: GOTO EE
goto bb
'****************************************************************
SAAT_GOSTER:
E=0
        if portc.4=1 then GOSUB TEMIZLE :goto SAAT_GOSTER1
gosub zaman_oku
C=C+1
    iF C=115 THEN C=0:gosub cc: I=0 :GOTO ISI_GOSTER
''''''''''''''''
temp=" "
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
        SUTUN[I+80]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtchour dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtchour dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=":"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmin dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmin dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=":"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcsec dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcsec dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
GOSUB GOSTER
    IF PORTC.0=1 THEN I=0 : a=0 : M=0 : adress=0 :  GOSUB TEMIZLE : GOTO BASLA
goto SAAT_GOSTER
'********************************************************
ISI_GOSTER:
gosub SENSOROKU
FF:
''''''
'FOR W=0 TO 14
        if portc.4=1 then GOSUB TEMIZLE :goto SAAT_GOSTER1
C=C+1
    iF C=100 THEN C=0: gosub cc : I=0 :GOTO TARIH_GOSTER
''''''''''''''''
temp=" "
    gosub YERAL
        for Z=0 to 23
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI       
        SUTUN[I+64]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=ISI dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=ISI dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=223
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp="C"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
GOSUB GOSTER
    IF PORTC.0=1 THEN I=0 : a=0 : M=0 : adress=0 :  GOSUB TEMIZLE : GOTO BASLA
'NEXT
'goto ISI_GOSTER
GOTO FF
'****************************************************************
TARIH_GOSTER:
        if portc.4=1 then GOSUB TEMIZLE :goto SAAT_GOSTER1
gosub zaman_oku
C=C+1
    iF C=100 THEN C=0: gosub cc:gosub gecikme1: I=0 :GOTO GUN_GOSTER
''''''''''''''''
temp=" "
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
        SUTUN[I+80]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcDATE dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcdate dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp="/"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmonth dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcmonth dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp="/"
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcyear dig 1
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
temp=rtcyear dig 0
    gosub YERAL
        for z=0 to 7
            IF D=1 THEN GOSUB DATA_AL
            IF D=0 THEN GOSUB DATA_AL_TERS
        SUTUN[I]=VERI
     I=I+1
    yeri=yeri+1
NEXT
''''''''''''''''
GOSUB GOSTER
    IF PORTC.0=1 THEN I=0 : a=0 : M=0 : adress=0 :  GOSUB TEMIZLE : GOTO BASLA
goto TARIH_GOSTER
'****************************************************************
GUN_GOSTER: 
        if portc.4=1 then GOSUB TEMIZLE :goto SAAT_GOSTER1
c=c+1
iF C=100  and F=0 THEN C=0: gosub cc:gosub gecikme1:GOSUB TEMIZLE:GOTO ee
iF C=100  and F=1 THEN C=0: gosub cc:gosub gecikme1:GOSUB TEMIZLE:F=0:M=0:K=0:GOTO kontrol3
GOSUB ZAMAN_OKU
gosub dd
    IF PORTC.0=1 THEN I=0 : a=0 : M=0 : adress=0 :  GOSUB TEMIZLE : GOTO BASLA
GOTO GUN_GOSTER
'****************************************************************
cc:
E=E+1
If E<80                  Then gosub saga_kay    : GOTO goster1 
If E>80    and E<160     Then gosub sola_kay    : GOTO goster1
If E>160   and E<169     Then gosub asagi_kay   : GOTO goster1
if E>169   and E<178     then gosub yukari_kay  : GOTO goster1 
If E>178   then E=0
return
'****************************************************************
GOSTER1:
gosub zaman_oku
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 3
      Next
goto cc
'****************************************************************
GOSTER:
      X=1
      For I=0 To 7
SHiftOut DTA1,CLK1,1,[SUTUN[I+88],SUTUN[I+80],SUTUN[I+72],_
SUTUN[I+64],SUTUN[I+56],SUTUN[I+48],SUTUN[I+40],_
  SUTUN[I+32],SUTUN[I+24],SUTUN[I+16],SUTUN[I+8],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 3
      Next
RETURN
'****************************************************************
dd:
yazi_reg=0 : i=0
For W=0 To 11
    gosub yazi1 : yazi_reg=yazi_reg+1
        gosub YERAL1
    for z=0 to 7
        GOSUB DATA_AL1
            SUTUN[I]=VERI
                I=I+1
            yeri=yeri+1
        next
    next
     gosub goster
return
'****************************************************************
yazi1:
if rtcday=1 then LookUp yazi_reg,["   PAZAR    "],bilgi
if rtcday=2 then LookUp yazi_reg,[" PAZARTESi  "],bilgi
if rtcday=3 then LookUp yazi_reg,["    SALI    "],bilgi
if rtcday=4 then LookUp yazi_reg,["  CARSAMBA  "],bilgi
if rtcday=5 then LookUp yazi_reg,["  PERSEMBE  "],bilgi
if rtcday=6 then LookUp yazi_reg,["    CUMA    "],bilgi
if rtcday=7 then LookUp yazi_reg,[" CUMARTESi  "],bilgi
Return
'****************************************************************     
YERAL:
select case temp
    case 0   : yeri=0   : return
    case 1   : yeri=8   : return
    case 2   : yeri=16  : return
    case 3   : yeri=24  : return
    case 4   : yeri=32  : return
    case 5   : yeri=40  : return
    case 6   : yeri=48  : return
    case 7   : yeri=56  : return
    case 8   : yeri=64  : return
    case 9   : yeri=72  : return
    case 223 : yeri=80  : return
    case "C" : yeri=88  : return
    case ":" : yeri=96  : return
    case "/" : yeri=104 : return
    case " " : yeri=112 : return
end select
return
'****************************************************************
data_al:
    lookup yeri,[$FF,$C1,$80,$A6,$B2,$80,$C1,$FF,_     '0
                 $FF,$BF,$BD,$80,$80,$BF,$BF,$FF,_     '1
                 $FF,$9D,$8C,$A6,$B2,$98,$9D,$FF,_     '2
                 $FF,$DD,$9C,$B6,$B6,$80,$C9,$FF,_     '3
                 $FF,$E7,$E3,$E9,$80,$80,$E7,$FF,_     '4
                 $FF,$D8,$98,$BA,$BA,$82,$C6,$FF,_     '5
                 $FF,$C3,$81,$B4,$B6,$86,$CF,$FF,_     '6
                 $FF,$FC,$FC,$8E,$86,$F0,$F8,$FF,_     '7
                 $FF,$C9,$80,$B6,$B6,$80,$C9,$FF,_     '8
                 $FF,$F9,$B0,$B6,$96,$C0,$E1,$FF,_     '9
                 $FF,$FF,$F9,$F0,$F6,$F0,$F9,$FF,_     'Derece
                 $FF,$C1,$80,$BE,$BE,$BE,$DD,$FF,_     'C
                 $FF,$FF,$FF,$99,$99,$FF,$FF,$FF,_     ':
                 $FF,$9F,$CF,$E7,$F3,$F9,$FC,$FF,_     '/
                 $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF],VERI 'Boşluk
RETURN
'****************************************************************
data_al_ters:
    lookup yeri,[$00,$3E,$71,$59,$4D,$47,$3E,$00,_     '0
                 $00,$40,$42,$7F,$7F,$40,$40,$00,_     '1
                 $00,$62,$73,$59,$4D,$67,$62,$00,_     '2
                 $00,$22,$63,$49,$49,$7F,$36,$00,_     '3
                 $00,$18,$1C,$16,$7F,$7F,$18,$00,_     '4
                 $00,$27,$67,$45,$45,$7D,$39,$00,_     '5
                 $00,$3C,$7E,$4B,$49,$79,$30,$00,_     '6
                 $00,$03,$03,$71,$79,$0F,$07,$00,_     '7
                 $00,$36,$7F,$49,$49,$7F,$36,$00,_     '8
                 $00,$06,$4F,$49,$69,$3F,$1E,$00,_     '9
                 $00,$00,$06,$0F,$09,$0F,$06,$00,_     'Derece
                 $00,$3E,$7F,$41,$41,$63,$22,$00,_     'C
                 $00,$00,$00,$36,$36,$00,$00,$00,_     ':
                 $00,$60,$30,$18,$0C,$06,$03,$00,_     '/
                 $00,$00,$00,$00,$00,$00,$00,$00],VERI 'Boşluk
RETURN
'****************************************************************
YERAL1:
select case bilgi
    case "A" : yeri=0   : return
    case "B" : yeri=8   : return
    case "C" : yeri=16  : return
    case "D" : yeri=24  : return
    case "E" : yeri=32  : return
    case "F" : yeri=40  : return
    case "G" : yeri=48  : return
    case "H" : yeri=56  : return
    case "I" : yeri=64  : return
    case "i" : yeri=72  : return
    case "J" : yeri=80  : return
    case "K" : yeri=88  : return
    case "L" : yeri=96  : return
    case "M" : yeri=104 : return
    case "N" : yeri=112 : return
    case "O" : yeri=120 : return
    case "P" : yeri=128 : return
    case "R" : yeri=136 : return
    case "S" : yeri=144 : return
    case "T" : yeri=152 : return
    case "U" : yeri=160 : return
    case "V" : yeri=168 : return
    case "Y" : yeri=176 : return
    case "Z" : yeri=184 : return
    CASE "." : YERI=192 : RETURN
    case "W" : yeri=200 : return
    case "Q" : yeri=208 : return
    case "/" : yeri=216 : return 
    case ":" : yeri=224 : return
    case "-" : yeri=232 : return 
    case " " : yeri=240 : return     
end select
return
'****************************************************************
data_al1:
    LookUp yeri,[$FF,$81,$F6,$F6,$F6,$F6,$81,$FF,_     ;  A
                 $FF,$80,$B6,$B6,$B6,$B6,$C9,$FF,_     ;  B
                 $FF,$C1,$BE,$BE,$BE,$BE,$DD,$FF,_     ;  C
                 $FF,$80,$BE,$BE,$BE,$BE,$C1,$FF,_     ;  D
                 $FF,$80,$B6,$B6,$B6,$B6,$BE,$FF,_     ;  E
                 $FF,$80,$F6,$F6,$F6,$F6,$FE,$FF,_     ;  F
                 $FF,$80,$BE,$B6,$B6,$B6,$86,$FF,_     ;  G
                 $FF,$80,$F7,$F7,$F7,$F7,$80,$FF,_     ;  H
                 $FF,$BE,$BE,$80,$80,$BE,$BE,$FF,_     ;  I
                 $FF,$BF,$BB,$82,$82,$BB,$BF,$FF,_     ;  i
                 $FF,$CE,$BE,$80,$80,$FE,$FF,$FF,_     ;  J
                 $FF,$80,$F7,$EB,$DD,$BE,$FF,$FF,_     ;  K
                 $FF,$80,$BF,$BF,$BF,$BF,$BF,$FF,_     ;  L
                 $FF,$80,$FB,$F7,$F7,$FB,$80,$FF,_     ;  M
                 $FF,$80,$FB,$F7,$EF,$DF,$80,$FF,_     ;  N
                 $FF,$C1,$BE,$BE,$BE,$BE,$C1,$FF,_     ;  O
                 $FF,$80,$F6,$F6,$F6,$F6,$F9,$FF,_     ;  P
                 $FF,$80,$F6,$F6,$E6,$D6,$B9,$FF,_     ;  R
                 $FF,$D9,$B6,$B6,$B6,$B6,$CD,$FF,_     ;  S
                 $FF,$FE,$FE,$80,$80,$FE,$FE,$FF,_     ;  T
                 $FF,$C0,$BF,$BF,$BF,$BF,$C0,$FF,_     ;  U
                 $FF,$E0,$DF,$BF,$BF,$DF,$E0,$FF,_     ;  V
                 $FF,$FC,$FB,$87,$87,$FB,$FC,$FF,_     ;  Y                     
                 $FF,$9E,$AE,$B6,$BA,$BC,$BE,$FF,_     ;  Z
                 $FF,$FF,$FF,$9F,$9F,$FF,$FF,$FF,_     ;  .
                 $FF,$80,$DF,$EF,$EF,$DF,$80,$FF,_     ;  W
                 $FF,$C1,$BE,$BE,$AE,$9E,$81,$FF,_     ;  Q
                 $FF,$9F,$CF,$E7,$F3,$F9,$FC,$FF,_     ;  /
                 $FF,$FF,$FF,$99,$99,$FF,$FF,$FF,_     ;  :
                 $FF,$E7,$E7,$E7,$E7,$E7,$E7,$FF,_     ;  _
                 $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF],veri ;  BOŞLUK
Return
'****************************************************************
'***Sensör_Oku***************************************************
SENSOROKU:
           OWOUT   Comm_Pin, 1, [$CC, $44]' ISI değerini oku
Bekle:
'           OWIN    Comm_Pin, 4, [TEMP]    ' Busy değerini oku
'           IF      TEMP = 0 THEN Bekle  ' hala meşgulmü? , evet ise goto Bekle..!
           OWOUT   Comm_Pin, 1, [$CC, $BE]' scratchpad memory oku
           OWIN    Comm_Pin, 2, [HAM.Lowbyte, HAM.Highbyte]' İki byte oku ve okumayı bitir.
           GOSUB   Hesapla
           RETURN
'****************************************************************           
SENSORYAZ:
          OWOUT   COMM_Pin, 1, [$CC, $4E, $00,$00,$31]
          return           
'****************************************************************             
Hesapla:                 ' Ham değerden Santigrat derece hesabı
    Sign  = "+"
    IF SIGN_BITI = NEGAT_ISI THEN
       Sign   = "-" 
       ham=($ffff-ham)+1
    endif
    ISI = Ham*10/16
GEC:
    FLOAT = (ISI //10)
    ISI=ISI/10
    RETURN                     
'****************************************************************
'****************************************************************
'***********Zaman Oku***********
ZAMAN_OKU:
         High RTC_RST
         SHiftOut RTC_DTA, RTC_SCLK, 0, [$BF]
         SHiftIn RTC_DTA, RTC_SCLK, 1, [rtcsec, rtcmin, rtchour,rtcdate , rtcmonth,rtcday,rtcyear, MEM]
         Low RTC_RST
         MEM=rtcsec  : GoSub CEVIR:rtcsec=SAYI 
         MEM=rtcmin  : GoSub CEVIR:rtcmin=SAYI
         MEM=rtchour : GoSub CEVIR:rtchour=SAYI
         MEM=rtcdate : GoSub CEVIR:rtcdate=SAYI
         MEM=rtcmonth: GoSub CEVIR:rtcmonth=SAYI
         MEM=rtcyear : GoSub CEVIR:rtcyear=SAYI
         MEM=rtcday  : GoSub CEVIR: rtcday=SAYI       
         Return
'***********Zaman Yaz***********
ZAMAN_YAZ:
    MEM=rtcsec   : GoSub TERSCEVIR :rtcsec=SAYI
    MEM=rtcmin   : GoSub TERSCEVIR :rtcmin=SAYI
    MEM=rtchour  : GoSub TERSCEVIR :rtchour=SAYI
    MEM=rtcdate  : GoSub TERSCEVIR :rtcdate=SAYI
    MEM=rtcmonth : GoSub TERSCEVIR :rtcmonth=SAYI
    MEM=rtcyear  : GoSub TERSCEVIR :rtcyear=SAYI
    MEM=rtcday   : GoSub TERSCEVIR :rtcday=SAYI
       
    High  RTC_RST
    SHiftOut RTC_DTA, RTC_SCLK, 0, [$8E, 0]
    Low RTC_RST:pause 1
    High RTC_RST         
    SHiftOut  RTC_DTA, RTC_SCLK, 0, [$BE, rtcsec, rtcmin, rtchour,rtcdate , rtcmonth, rtcday, rtcyear, 0]  'YAZ
    Low RTC_RST
    pause 10
Return
'***********Çevir***********               
CEVIR:
    ONLAR=MEM & %01110000
    ONLAR=ONLAR>>4
    BIRLER=MEM & %00001111
    SAYI=ONLAR*10+BIRLER
RETURN 
'***********Ters Çevir***********
TERSCEVIR:               
    ONLAR=MEM DIG 1
    ONLAR=ONLAR<<4
    BIRLER=MEM DIG 0
    SAYI=ONLAR+BIRLER
RETURN
'**************************************************************** 
Disable
KESME:
A=A+1 : K=0 : V=0
'''''
    IF A=1 THEN
        HSERIN [WAIT("SIFRE"),BILGI]
            I2CWrite SDA,SCL,$A0,adress,[bilgi] ' Her adrese datayı yaz
            adress=adress+1
            PAUSE 5
    ELSE
        HSERIN [BILGI]
            I2CWrite SDA,SCL,$A0,adress,[bilgi] ' Her adrese datayı yaz
            adress=adress+1
            PAUSE 5 
ENDIF
'''''
'IF adress>680  then high porte.2 ' Uyarı ledini yak
        IF adress<15                THEN L=4
        IF adress<15 AND adress<30  THEN L=3
        IF adress>30 AND adress<60  THEN L=2
        if adress>60 AND adress<100 THEN L=1
'''''
HSEROUT [BILGI,10]
    IF bilgi=13 THEN V=1 : p=A/84 : B=P :  J=A//84 : J=J+(p*12)      ' enter
'''''
IF bilgi=8  then                                                 ' backspace
    high porte.0
        FOR W=0 TO 1
            adress=adress-1
                bilgi=$ff
                    I2CWrite SDA,SCL,$A0,adress,[bilgi]
                PAUSE 10
            NEXT
        low porte.0
     A=A-2   
ENDIF
'''''   
PIR1.5=0                        ' RCIF : USART Receive Interrupt Flag bit
  Resume
ENABLE
Return   
'****************************************************************
end




compacta

merhaba takip edip uygulamaları yapmaya ve geliştirmeye çaba sarfediyorum.8x8 uygulamasını gerçek ortamda yapıp çalıştırdım.bir başka şekildede elimdeki 5x7 dotmatrixleri değerlendirmek istedi, ve yazılımı uyarlamaya çalıştım.ama 2.  5x7 dotmatrixden sonrasında yazılar bozuldu. ilk önce satır sayısını portd satırının for döngüsünden 5'e indirdim.normalde 595'ler kalan 7.çıkışından sonra devam etmedi.beceremedim.konuyla ilgili kodlarda yardımcı olabilirseniz sevinirim..

serdar06

Selamlar
Yaklaşık 1 haftadır forumu takip ediyordum. Artık soru sorma vaktim geldi sanırım :D
Satırları kapattıktan sonra da bekleme yapmak gerekiyor mu?
Yani ilk satırı aktif edip 2ms bekliyoruz. Satırı kapattıktan sonra da yine 2ms beklemek gerekiyor mu?

1. satır
2ms açık
2ms kapalı

2.satır
2ms açık
2ms kapalı

3. satır
2ms açık
2ms kapalı
.
.
şeklinde mi gitmemiz gerekiyor. Yoksa 2ms bekledikten sonra satırı kapatıp hemen diğer satıra mı geçilmeli?
Teşekkürler!

ete

Satırı kapatıp bekerseniz karekterlerde titreme görürsünüz. İşin doğrusu şöyledir. (Satırlar 0-7 arası)
- Satır7 yi kapat
- Satır-0 'ı aktif et
- 1-2 ms bekle

- Satır-0'ı kapat
- Satır-1'i aktif et
- 1-2ms bekle

- Satır-1'i kapat
- Satır-2 yi aktif et
- 1-2 ms bekle.
...
...
...
bu şekilde olması gerekir.
Ete



serdar06

Anladım üstadım. Hemen uygulayacağım.

compacta

ete hocam ve herkese merhaba.hocam sizin örneklerinizle kayan yazıyı geliştşrmeye çalışıyorum.yukarda yazdığım son msj daki 5x7 sorununu hallettim.bunu dahada değitirerek mebran tuş takımı ekledim.yalnız acemi olduğumdan pek başarılı olamadım.tuşa basıldığında 8x8 dotmatrixde harf gösterdim ama buunu if tus=0 then lookup yazı_reg,"A",harf_reg şeklinde yaptım.bunun daha kısa ve direk hex kodundan harfi basdırabilirmiyim.bir örnek verirmisiniz.

mitec

Alıntı yapılan: xoom - 03 Nisan 2012, 23:28:44
Kodları paylaştığınızda biraz sorularım olabilir. paylaşımınızı bekliyorum tşkler..
xoom senden çok özür dilerim biraz geç kaldım ama başıma olmadık sorunlar geldi herneyse herşey yoluna girdi artık vb kodları aşağıda

Imports System.IO.Ports
Imports System.Text
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Threading



Public Class ultraconsol
    Private trd As Thread
    Dim inputData As String = ""
    Public Event DataReceived As IO.Ports.SerialDataReceivedEventHandler
    Dim sonuc
    Dim yenisonuc
    Dim myComPort As New SerialPort
    Dim atmis
    Dim tablo
    Dim tablo1
    Dim ali


    Dim data As String



    Private Sub ultraconsol_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ali = 1
        SerialPort1.Encoding = Encoding.Default
        Me.Text = ("mitec form")
        Panel1.Visible = False
        Panel2.Visible = False
        Panel3.Visible = False
        Button3.Enabled = False
        Panel4.Visible = False
        Button6.Enabled = False
        Button8.Enabled = False
        Button9.Enabled = False

        Label4.Visible = False
       
        Button12.Visible = False
        Label3.Visible = False
        TextBox2.Visible = False
        Button11.Visible = False

        Dim a As String
        InitializeForm()

        Try
            CloseComPort()

            myComPort.PortName = degis.SelectedItem.ToString


            a = myComPort.PortName

            If SerialPort1.IsOpen Then
                SerialPort1.Close()
            End If
            With SerialPort1
                .PortName = (a)
                .BaudRate = 9600
                .Parity = IO.Ports.Parity.None
                .DataBits = 8
                .StopBits = IO.Ports.StopBits.One
            End With
            SerialPort1.Open()
            myComPort.Open()

        Catch
        End Try
    End Sub
    Public Delegate Sub myDelegate()
    Public Sub updateTextBox()
        ' TextBox1.Text = ""

    End Sub


    Private Sub degis_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles degis.SelectedIndexChanged
        CloseComPort()
        myComPort.PortName = degis.SelectedItem.ToString
        OpenComPort()


    End Sub

    Private Sub tokus(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialPinChangedEventArgs) Handles SerialPort1.PinChanged

    End Sub
    Sub CloseComPort()

        Try

            Using myComPort

                If (Not (myComPort Is Nothing)) Then

                    ' The COM port exists.

                    If myComPort.IsOpen Then


                        ' Wait for the transmit buffer to empty.

                        Do While (myComPort.BytesToWrite > 0)
                        Loop

                    End If
                End If

            End Using

        Catch ex As UnauthorizedAccessException



        End Try

    End Sub
    Sub OpenComPort()


        If Not myComPort.IsOpen Then

            Try


                myComPort.PortName = degis.SelectedItem.ToString
            Catch


            End Try

            myComPort.Parity = Parity.None
            myComPort.DataBits = 8
            myComPort.StopBits = StopBits.One
            myComPort.Handshake = Handshake.None

            myComPort.ReadTimeout = 3000
            myComPort.WriteTimeout = 5000

            ' Open the port.
            Try
                myComPort.Open()

            Catch


            End Try



        End If
    End Sub
    Sub InitializeForm()

        Dim bitRates(9) As Integer
        Dim nameArray() As String

        nameArray = SerialPort.GetPortNames
        Array.Sort(nameArray)

        degis.DataSource = nameArray
        degis.DropDownStyle = ComboBoxStyle.DropDownList
        Try
            degis.SelectedIndex = 0

        Catch


            MsgBox("com yok")
        End Try



    End Sub

    Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived


        Me.Invoke(New EventHandler(AddressOf DoUpdate))
        '
        'sonuc.BeginInvoke(New myDelegate(AddressOf updateTextBox), New Object() {})

        sonuc = SerialPort1.ReadExisting
        If sonuc = "OLDU" Then
            Button1.BackColor = Color.Green


        End If


    End Sub
    Public Sub DoUpdate()
        'TextBox1.Text = myComPort.ReadExisting
    End Sub


    Private Sub TabPage2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub


    Private Sub TabPage3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Panel3_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs)

    End Sub

   


    Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub


    Private Sub Label28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label28.Click

    End Sub


    Private Sub TextBox1_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

   


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        SerialPort1.Write(">")


        Button3.Enabled = True
        Button6.Enabled = True
        Button8.Enabled = True
        Button9.Enabled = True
        Button1.Enabled = True
        Button2.Enabled = False
       
       





    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        SerialPort1.Write("<")

        Button1.BackColor = Color.Red
        Button3.Enabled = False
        Button6.Enabled = False
        Button8.Enabled = False
        Button9.Enabled = False
        Button1.Enabled = True


        Button2.BackColor = Color.Green
    End Sub


    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        SerialPort1.Write("C")
        Button9.Enabled = False
        Button8.Enabled = False
        Button3.Enabled = False
        Button2.Enabled = False
        Button6.Enabled = False
        Panel2.Visible = True

    End Sub

   

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        SerialPort1.Write("A")
        Button3.Enabled = False
        Button9.Enabled = False
        Button8.Enabled = False
        Button6.Enabled = False
        Button2.Enabled = False
        Panel1.Visible = True
    End Sub

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub ComboBox1_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If ComboBox1.Text = "HIZ 1" Then
            SerialPort1.Write("9")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
            Button3.Enabled = True

            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False



        End If
        If ComboBox1.Text = "HIZ 2" Then
            SerialPort1.Write("8")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
            Button3.Enabled = True
            Button1.BackColor = Color.Red
            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False

        End If
        If ComboBox1.Text = "HIZ 3" Then
            SerialPort1.Write("7")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
           
            Button3.Enabled = True
            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False

        End If
        If ComboBox1.Text = "HIZ 4" Then
            SerialPort1.Write("6")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
            Button1.BackColor = Color.Red
            Button3.Enabled = True
            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False

        End If
        If ComboBox1.Text = "HIZ 5" Then
            SerialPort1.Write("5")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
            Button1.BackColor = Color.Red
            Button3.Enabled = True
            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False

        End If
        If ComboBox1.Text = "HIZ 6" Then
            SerialPort1.Write("4")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
            Button1.BackColor = Color.Red
            Button3.Enabled = True
            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False
        End If
        If ComboBox1.Text = "HIZ 7" Then
            SerialPort1.Write("3")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
            Button1.BackColor = Color.Red
            Button3.Enabled = True
            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False
        End If
        If ComboBox1.Text = "HIZ 8" Then
            SerialPort1.Write("2")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
            Button1.BackColor = Color.Red
            Button3.Enabled = True
            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False
        End If
        If ComboBox1.Text = "HIZ 9" Then

            SerialPort1.Write("1")
            Button2.Enabled = True
            Button2.BackColor = Color.Green
            Button1.BackColor = Color.Red
            Button3.Enabled = True
            Button6.Enabled = True
            Button8.Enabled = True
            Button9.Enabled = True
            Button1.Enabled = False
            Panel2.Visible = False

        End If
       
    End Sub

    Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        SerialPort1.Write("1")
        Button2.Enabled = True
        Button3.Enabled = True
        Button6.Enabled = True
        Button8.Enabled = True
        Button9.Enabled = True
        Button1.Enabled = False
     

        Button2.BackColor = Color.Green
        Panel1.Visible = False



    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        SerialPort1.Write("0")
        Button2.Enabled = True
        Button3.Enabled = True
        Button6.Enabled = True
        Button8.Enabled = True
        Button9.Enabled = True
        Button1.Enabled = False
        Button2.BackColor = Color.Green

        Panel1.Visible = False
    End Sub

    Private Sub Panel2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel2.Paint

    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        SerialPort1.Write("B")
        Button9.Enabled = False
        Panel2.Visible = False
        Panel3.Visible = True
        Button8.Enabled = False
        Button3.Enabled = False
        Button6.Enabled = False
        Button2.Enabled = False
        Panel1.Visible = False


    End Sub

    Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged
        TextBox6.MaxLength = 9


    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
     
        yenisonuc = (TextBox6.Text.ToUpper & "^")
        For basamak2 = 1 To yenisonuc.Length
            SerialPort1.Write(Mid(yenisonuc, basamak2, 1))
            For bekle = 0 To 6000000
            Next
        Next
        Button2.Enabled = True
        Button3.Enabled = True
        Button6.Enabled = True
        Button8.Enabled = True
        Button9.Enabled = True
        Button1.Enabled = False
        Panel3.Visible = False

        Button2.BackColor = Color.Green
        Button1.BackColor = Color.Red


    End Sub

   
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        SerialPort1.Write("D")
        Button8.Enabled = False
        Button9.Enabled = False
        Button3.Enabled = False
        Button6.Enabled = False
        Button2.Enabled = False
        Panel4.Visible = True

        Label3.Visible = True
        TextBox2.Visible = False
        Button11.Visible = False
        Button16.Visible = False
        Label3.Visible = False
        Button15.Visible = True
        Button14.Visible = True
        Label6.Visible = True

    End Sub

    Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
        TextBox2.MaxLength = 17500
        'TextBox2.Text
       








    End Sub



    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        atmis = (TextBox2.Text.ToUpper & "         ^")



        For basamak2 = 1 To atmis.Length
            SerialPort1.Write(Mid(atmis, basamak2, 1))



            For bekle = 0 To 6000000


            Next
        Next

        Button2.Enabled = True
        Button3.Enabled = True
        Button6.Enabled = True
        Button8.Enabled = True
        Button9.Enabled = True
        Button1.Enabled = False
        Button2.BackColor = Color.Green
        Panel4.Visible = False


    End Sub

    Private Sub Panel4_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel4.Paint

    End Sub


    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Label4.Visible = True
        Button12.Visible = True

    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        Label4.Visible = False
        Button12.Visible = False
    End Sub

    Private Sub Panel3_Paint_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel3.Paint

    End Sub

   

    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressBar1.Click

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick



    End Sub

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        SerialPort1.Write(">")
        Label3.Visible = True
        Label6.Visible = False
        TextBox2.Visible = True
        Button11.Visible = True
        Button14.Visible = False
        Button15.Visible = False
        Button16.Visible = True

    End Sub

    Private Sub Button14_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
        SerialPort1.Write("<")
        Label3.Visible = True
        Label6.Visible = False
        TextBox2.Visible = True
        Button11.Visible = True
        Button14.Visible = False
        Button15.Visible = False
        Button16.Visible = True
    End Sub

    Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click

        SerialPort1.Write("^")
        Button2.Enabled = True
        Button3.Enabled = True
        Button6.Enabled = True
        Button8.Enabled = True
        Button9.Enabled = True
        Button1.Enabled = False
        Button2.BackColor = Color.Green

        Panel4.Visible = False
    End Sub

   
End Class



compacta

hocam kusura bakmayın aksilikler bu hafta üzerimde.bilgisayarda bozuldu başka yerden yapmaya çalışınca neyse.tekrar kusura bakmayın.dediğiniz gibi çizim ve yazılımı yüklüyorum.tusa basdığımda 1.harfi basıyor tekrar tusu kullanınca 2.harfi yada diğer harfi basmıyor.yazılımı ilerleticem.ama mantığımı ilerletemedim.yardımcı olursanız devamını getiricem.birde otomatik kendi tüm harfler adres_sec=adres_sec+1 satırı dolayısıyla dönüyor nasıl engelleyebilirim.teşekkürler...

meyer

 Compacta Hocam z değişkenini bit olarak tanımlamışsınız..Bunu byte olarak yazarsanız sorununuz çözülebilir...


xoom

#147
@mitec;  Estağf...  Tşk ederim.. ccs c de yapmaya çalıştığım satır taramalıda arayüz yaparken yardımcı olabilir.. ben c# ile yazacağım..tşkler..

compacta

merhaba meyer hocam.incelediğiniz ve cevabınız için teşekkürler.doğru söylüyorsunuz.orasını atlamışım.düzeltip birazda kendi mantığıma göre başka bir derleme yaptım.harfleri gösterebiliyorum.ama ikinci harf için ilk basılan harfi bir sağa iteleyip basdıramıyorum.yani mesela baba yazısını batırıcam ama türlü değişiklik yapmama rağmen tıkandım.yani "B" harfini seçtim.ilerlet tuşuna basınca "B" harfi bir sola kayacak orda basılı duruken ikinci harfi seçip onuda bir sola kaydırıcam ve istenilen yazı yazılana kadar devam edecek.bakıp yardımcı olursanız yazılımı ilerleticem.şimdiden teşekkürler....

meyer

 İyi akşamlar Compacta Hocam,
-Kodları istediğiniz gibi düzenledim..Bakar bakmaz zaten anlayacaksınız nasıl yapıldığını..
İyi günler dilerim...

'****************************************************************
'*  Name    : UNTITLED.BAS                                      *
'*  Author  : [select VIEW...EDITOR OPTIONS]                    *
'*  Notice  : Copyright (c) 2012 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 27.04.2012                                        *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************
define OSC 20
'****************************************************************
TRISB=0 : TRISD=0  : TRISA=0 : TRISC=%00000111 : TRISE=0
PORTB=0 : PORTD=0  : PORTA=0 : PORTC=0 : PORTE=0
INTCON2.7=0
'74HC595*********************************************************
Symbol CLK1   =PORTB.0
Symbol DTA1   =PORTB.1
Symbol STROBE1=PORTB.2
SYMBOL tus_1=PORTC.0
SYMBOL tus_2=PORTC.1
symbol tus_3=PORTC.2
symbol satir_1=portc.3
symbol satir_2=portc.4
symbol satir_3=portc.5
SYMBOL satir_4=PORTC.6
'****************************************************************
SUTUN     var Byte[40]
ARA       VAR BYTE   
I         var Byte
X         var Byte
W         var Byte
M         var BYTE
L         var byte
H         var byte
F         VAR BYTE
'''''''''''''''''''
z         var byte
y         var byte
t         VAR BYTE
D         VAR BYTE

clear
pause 250
'****************************************************************
FOR I=0 TO 50
SUTUN[I]=$FF
NEXT

D=0:L=0:H=0:w=0

BASLA:
'I=43
IF D=5 THEN D=0                                 
gosub yazi
aa:     
      For W=0 To 9
      X=1
      For I=0 To 4
SHiftOut DTA1,CLK1,1,[SUTUN[I+45],SUTUN[I+40],SUTUN[I+35],SUTUN[I+30],SUTUN[I+25],_
SUTUN[I+20],SUTUN[I+15],SUTUN[I+10],SUTUN[I+5],SUTUN[I]]
        PORTD=X
        High STROBE1 : pauseus 200 : Low STROBE1
        X=X*2
        pause 3
      Next
     Next
    pause 1

m=m+1
IF satir_1=0 and tus_1=0 THEN D=D+1
if satir_3=0 and tus_3=0 then ilerlet
if m<50 then m=0
goto basla
'****************************************************************

'****************************************************************
yazi:
IF D=1 THEN
i=44
for t=0 to 7
lookup t,[$81,$F6,$F6,$F6,$F6,$81,$FF],z
  SUTUN[I]=z
  I=I+1 
NEXT
ENDIF   
'''''''''''''
IF D=2 THEN
i=36
for t=0 to 7
lookup t,[$81,$F6,$F6,$F6,$F6,$81,$FF],z
  SUTUN[I]=z
  I=I+1 
NEXT
for t=0 to 7
lookup t,[$80,$B6,$B6,$B6,$B6,$C9,$FF],Z
  SUTUN[I]=Z
I=I+1
NEXT
ENDIF   
'''''''''''''
IF D=3 THEN
i=28
for t=0 to 7
lookup t,[$81,$F6,$F6,$F6,$F6,$81,$FF],z
  SUTUN[I]=z
  I=I+1 
NEXT
for t=0 to 7
lookup t,[$80,$B6,$B6,$B6,$B6,$C9,$FF],Z
  SUTUN[I]=Z
I=I+1
NEXT
for t=0 to 7
lookup t,[$C1,$BE,$BE,$BE,$BE,$DD,$FF],Z
  SUTUN[I]=Z
I=I+1
NEXT   
ENDIF
'''''''''''''
IF D=4 THEN
i=20
for t=0 to 7
lookup t,[$81,$F6,$F6,$F6,$F6,$81,$FF],z
  SUTUN[I]=z
  I=I+1 
NEXT
for t=0 to 7
lookup t,[$80,$B6,$B6,$B6,$B6,$C9,$FF],Z
  SUTUN[I]=Z
I=I+1
NEXT
for t=0 to 7
lookup t,[$C1,$BE,$BE,$BE,$BE,$DD,$FF],Z
  SUTUN[I]=Z
I=I+1
NEXT
for t=0 to 7
lookup t,[$E1,$DE,$9E,$9E,$DE,$ED,$FF],Z
  SUTUN[I]=Z
I=I+1
NEXT   
ENDIF

RETURN

ilerlet:
For I=42 To 0 STEP-1
    sutun[i]= sutun[i+8]
   If i=43 Then sutun[43]=sutun[0]
Next i
pauseus 10000
gosub basla
End





Powered by EzPortal