shadow1905
Üye
- Katılım
- 30 Ara 2010
- Mesajlar
- 7
- Puanları
- 1
- Yaş
- 41
'****************************************************************
'* Name : UNTITLED.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2007 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 20.06.2007 *
'* Version : 1.0 *
'* Notes : *
'* : *
'****************************************************************
Include "MODEDEFS.BAS" 'Seri İletişim İçin Gerekli
Define OSC 20
DEFINE I2C_SLOW 1
ADCON1 = 7
TrisA=0:TrisB=0:TrisC=0:TrisC.7=1:TrisC.6=0:TrisD=0:TrisE=0
PortA=0:PortB=%00000001:PortC=0:PortD=0:PortE=0:
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_BAUD 2400
RCIF VAR PIR1.5 ' Alias RCIF (USART Receive Interrupt Flag)
OERR VAR RCSTA.1 ' Alias OERR (USART Overrun Error Flag)
CREN VAR RCSTA.4 ' Alias CREN (USART Continuous Receive Enable)
E_Data var PortE.2
E_Clear var PortE.0
E_Clock var PortE.1
I2C_SDA var PortC.4
I2C_SCL var PortC.3
'Saat İçin Gerekli Port Tanımlamaları
'*******************************************************************************
RST var PORTC.0 'Reset
IO var PORTC.2 'I/O
SCLK var PORTC.1 'Clock
'Gerekli Saat Ayarlamaları
Low RST ' Reset RTC
Low SCLK
'Sensör Tanımlamaları
'*******************************************************************************
Comm_Pin VAR PortC.5 ' One-wire Data-Pin "DQ" PortB.0 da
Busy VAR BIT ' Busy Status-Bit
HAM VAR WORD ' Sensör HAM okuma değeri
ISI VAR WORD ' Hesaplanmış ISI değeri
Float VAR WORD ' Holds remainder for + temp C display
X VAR WORD
SIGN_BITI VAR HAM.Bit11 ' +/- sıcaklık İşaret biti, 1 = olursa eksi sıcaklık
NEGAT_ISI CON 1 ' Negatif_Cold = 1
Deg CON 223 ' ° işareti
SIGN VAR BYTE ' ISI değeri için +/- işaret
TEMP VAR BYTE
INTCON = %11000000
ON INTERRUPT GoTo Com_Oku
PIE1.5 = 1
Gelen var byte
Okunan var byte
Mem var byte[1000]
Hafiza var byte[200]
Di0 var byte
Adres var word
Pointer var word
i var byte
j var byte
l var byte
m var byte
n var byte
'Sat_Uz satır uzunluk değişkeni
Sat_Uz var byte
T_Hiz var byte
Tar_Hiz var byte
Sutun var byte
Sutun2 var byte
Dizi var byte[96]
Adr var word
C_Durum var bit
K_Say var word
Sayac var word
Sayac1 var word
Sayac2 var byte
T var byte
O_Kar var byte
A_Say1 var word
A_Say2 var word
A_Say3 var byte
Animasyon var byte
Uzunluk var byte
Font Var byte
A_Hiz var byte
Bek_Sur var byte
Header var byte
Karakter var byte
Degisken var Bit
K_Uz var byte
Da0 var byte
Da1 var byte
Onlar var byte
Birler var byte
Saat var byte[2]
D var byte
D0 var bit[96]
D1 var bit[96]
D2 var bit[96]
D3 var bit[96]
D4 var bit[96]
D5 var bit[96]
D6 var bit[96]
D7 var bit[96]
Sonuc var byte
Zaman var byte[8]
Zaman1 var byte[8]
Z var bit
Y var byte
Adres=0
T_Hiz=1
C_Durum=0
Degisken=0
Z=0
Y=0
Sat_Uz=96
'Clear
E_Clear=1
Basla:
if Z=1 then'Zamanı Ayarla
Z=0
Y=0
Gosub Zaman_Ayarla
endif
if C_Durum=1 then
Gosub Uyari1
C_Durum=0
Adr=0
n=8
Header=0
Okunan=251
Pointer=0
Sayac=0
Sayac1=(Uzunluk*K_Uz)-Sat_Uz
A_Say1=Sat_Uz-1
A_Say2=Sat_Uz-1
gosub EEPROM_OKU
else
gosub EEPROM_OKU
endif
goto Basla
'*******************************************************************************
EEPROM_Oku:
Adr=0
Header=0
Okunan=0
Pointer=0
Sayac=0
Tar_Hiz=1000
while Okunan<>251
i2cread I2C_SDA, I2C_SCL,$A0,Adr, [Okunan]
if Okunan=255 then
Header=Header+1
Hafiza[Pointer]=Okunan
Pointer=Pointer+1
Adr=Adr+1
else
Hafiza[Pointer]=Okunan
Pointer=Pointer+1
Adr=Adr+1
endif
if Header=2 then
Animasyon=Hafiza[1]
Select case Animasyon
case 1'Uzun Metin Kaydır
Gosub B_Ata1
Gosub B_Ata3
for Sayac1=0 to (Uzunluk*K_Uz)-Sat_Uz
gosub Animasyon1
Gosub Tara
A_Say2=A_Say2+1
next
case 2 'Soldan Sağa Kay
Gosub B_Ata1
Gosub B_Ata3
for Sayac1=0 to (Uzunluk)*K_Uz
gosub Animasyon1
Gosub Tara
A_Say2=A_Say2+1
next
For Sayac1=1 to Bek_Sur*60
gosub Tara
next
case 3 'Sağdan Sola Kay
Gosub B_Ata1
Gosub B_Ata3
A_Say2=(Uzunluk)*K_Uz
for Sayac1=0 to (Uzunluk)*K_Uz
gosub Animasyon1
Gosub Tara
A_Say2=A_Say2-1
next
For Sayac1=1 to Bek_Sur*60
gosub Tara
next
case 4 'Yukarıdan Aşağıya Kay
Gosub B_Ata1
Gosub B_Ata3
gosub Bosalt
Sutun2=$0
for A_Say1=7 to 0 step -1
gosub Animasyon4
gosub Tara
next
For Sayac1=1 to Bek_Sur*60
gosub Tara
next
case 5 'Aşağıdan Yukarıya Kay
Gosub B_Ata1
Gosub B_Ata3
gosub Bosalt
Sutun2=$0
for A_Say1=7 to 0 step -1
gosub Animasyon5
gosub Tara
next
For Sayac1=1 to Bek_Sur*60
gosub Tara
next
case 6 'Tarih
Gosub B_Ata2
For Sayac1=1 to Bek_Sur*60
Gosub Tarih_Yaz
gosub Tara
next
case 7 'Saat
Gosub B_Ata2
For Sayac1=1 to Bek_Sur*60
Gosub Saat_Yaz
gosub Tara
next
case 8 'Sıcaklık
Gosub B_Ata2
Gosub Sicaklik_Yaz
For Sayac1=1 to Bek_Sur*60
gosub Tara
next
case 9 'İçten Dışa Açıl
Gosub B_Ata1
Gosub B_Ata3
gosub Bosalt
A_Say1=Sat_Uz/2
A_Say2=Sat_Uz/2
for Sayac1=1 to Sat_Uz/2
gosub Animasyon9
Gosub Tara
A_Say1=A_Say1-1
A_Say2=A_Say2+1
next
For Sayac1=1 to Bek_Sur*60
gosub Tara
next
case 10 'Dıştan İçe Kapan
Gosub B_Ata1
Gosub B_Ata3
for A_Say1=0 to Sat_Uz-1
Dizi[A_Say1]=Mem[A_Say1]
next
A_Say1=Sat_Uz-1
A_Say2=0
for Sayac1=0 to 99 'Bekle
gosub Tara
next
for Sayac1=1 to Sat_Uz/2
gosub Animasyon10
Gosub Tara
A_Say1=A_Say1-1
A_Say2=A_Say2+1
next
For Sayac1=1 to Bek_Sur*60
gosub Tara
next
case 11 'DUR
Gosub B_Ata1
Gosub B_Ata3
gosub Animasyon11
for Sayac1=1 to Bek_Sur*60
gosub Tara
next
CASE 12 'FLASH
Gosub B_Ata1
Gosub B_Ata3
Degisken=0
T_Hiz=T_Hiz*10
for Sayac1=1 to Bek_Sur*60
gosub Animasyon12
gosub Tara
next
case 13 'Satır Satır Gel
Gosub B_Ata1
Gosub B_Ata3
for A_Say1=0 to Sat_Uz-1
D0[A_Say1]=0
D1[A_Say1]=0
D2[A_Say1]=0
D3[A_Say1]=0
D4[A_Say1]=0
D5[A_Say1]=0
D6[A_Say1]=0
D7[A_Say1]=0
next
For n=0 to 7
if n//2=0 then
A_Say2=0
for Sayac1=0 to (Uzunluk)*K_Uz
gosub Animasyon13
Gosub Birlestir
Tar_Hiz=1400
Gosub Tara
A_Say2=A_Say2+1
next
eLSE
A_Say2=((Uzunluk)*K_Uz)+Sat_Uz
for Sayac1=0 to (Uzunluk)*K_Uz
gosub Animasyon13
Gosub Birlestir
Tar_Hiz=1400
Gosub Tara
A_Say2=A_Say2-1
next
endif
next
end select
Header=0
Pointer=0
Sayac=0
endif
wend
return
'*******************************************************************************
Birlestir:
gosub Bosalt
For A_Say1=0 to Sat_Uz-1
D.0=D0[A_Say1]
D.1=D1[A_Say1]
D.2=D2[A_Say1]
D.3=D3[A_Say1]
D.4=D4[A_Say1]
D.5=D5[A_Say1]
D.6=D6[A_Say1]
D.7=D7[A_Say1]
Dizi[A_Say1]=D
next
return
'*******************************************************************************
Uyari1:
Hafiza[0]=" ":Hafiza[1]="Y":Hafiza[2]="Ü":Hafiza[3]="K":Hafiza[4]="L":Hafiza[5]="E":Hafiza[6]="N":Hafiza[7]="İ":Hafiza[8]="Y":Hafiza[9]="O":Hafiza[10]="R":Hafiza[11]=" ":
Sayac=0
fOR m=0 to 11
Karakter=Hafiza[m]
Gosub Tablo2
next
fOR m=0 to Sat_Uz-1
Dizi[m]=mEM[m]
next
T_Hiz=10
for m=0 to 20
gosub Tara
next
gosub Bosalt
return
'*******************************************************************************
Tara:
for l=1 to T_Hiz
For i=1 to 8
Select Case i
case 1
PortD=%11111111
for j=0 to Sat_Uz-1
Sutun=Dizi[j]
E_Data=Sutun.0
E_Clock=1
E_Clock=0
next
PortD=%11111110
case 2
PortD=%11111111
for j=0 to Sat_Uz-1
Sutun=Dizi[j]
E_Data=Sutun.1
E_Clock=1
E_Clock=0
next
PortD=%11111101
case 3
PortD=%11111111
for j=0 to Sat_Uz-1
Sutun=Dizi[j]
E_Data=Sutun.2
E_Clock=1
E_Clock=0
next
PortD=%11111011
case 4
PortD=%11111111
for j=0 to Sat_Uz-1
Sutun=Dizi[j]
E_Data=Sutun.3
E_Clock=1
E_Clock=0
next
PortD=%11110111
case 5
PortD=%11111111
for j=0 to Sat_Uz-1
Sutun=Dizi[j]
E_Data=Sutun.4
E_Clock=1
E_Clock=0
next
PortD=%11101111
case 6
PortD=%11111111
for j=0 to Sat_Uz-1
Sutun=Dizi[j]
E_Data=Sutun.5
E_Clock=1
E_Clock=0
next
PortD=%11011111
case 7
PortD=%11111111
for j=0 to Sat_Uz-1
Sutun=Dizi[j]
E_Data=Sutun.6
E_Clock=1
E_Clock=0
next
PortD=%10111111
case 8
PortD=%11111111
for j=0 to Sat_Uz-1
Sutun=Dizi[j]
E_Data=Sutun.7
E_Clock=1
E_Clock=0
next
PortD=%01111111
end select
pauseus Tar_Hiz
next
next
return
'*******************************************************************************
Animasyon1: 'Uzun Metin Kaydır
gosub Bosalt
for A_Say1=0 to Sat_Uz-1
Dizi[A_Say1]=Mem[A_Say1+A_Say2]
next
return
'*******************************************************************************
Animasyon4: 'Yukarıdan Aşağıya Kay
for A_Say2=0 to Sat_Uz-1
Sutun2=Mem[A_Say2]>>A_Say1
Dizi[A_Say2]=Sutun2
next
return
'*******************************************************************************
Animasyon5: 'Aşağıdan Yukarıya Kay
for A_Say2=0 to Sat_Uz-1
Sutun2=Mem[A_Say2]<<A_Say1
Dizi[A_Say2]=Sutun2
next
return
'*******************************************************************************
Animasyon9:'içten Dışa Açıl
Dizi[A_Say1]=Mem[A_Say1]
Dizi[A_Say2]=Mem[A_Say2]
return
'*******************************************************************************
Animasyon10:'Dıştan İçe Kapan
Dizi[A_Say1]=$0
Dizi[A_Say2]=$0
return
'*******************************************************************************
Animasyon11:'Dur
for A_Say1=0 to Sat_Uz-1
Dizi[A_Say1]=Mem[A_Say1]
next
return
'*******************************************************************************
Animasyon12:'Flash
toggle Degisken
select case Degisken
case 0
gosub Bosalt
CASe 1
for A_Say2=0 to Sat_Uz-1
Dizi[A_Say2]=Mem[A_Say2]
next
end select
return
'*******************************************************************************
Animasyon13:'Satır Satır Gel
for A_Say1=0 to Sat_Uz-1
Sutun=Mem[A_Say1+A_Say2]
select case n
case 0
D0[A_Say1]=Sutun.0
case 1
D1[A_Say1]=Sutun.1
case 2
D2[A_Say1]=Sutun.2
case 3
D3[A_Say1]=Sutun.3
case 4
D4[A_Say1]=Sutun.4
case 5
D5[A_Say1]=Sutun.5
case 6
D6[A_Say1]=Sutun.6
case 7
D7[A_Say1]=Sutun.7
end select
next
return
'*******************************************************************************
Tarih_Yaz:
gosub Zaman_Al
Hafiza[0]=" "
For m=3 to 5
Da0=Zaman[m] & $0F
Da1=(Zaman[m] & $F0)>>4
Sonuc=((Da1 *10)+Da0)
Saat[0]=Sonuc/10
Saat[1]=Sonuc//10
select case m
case 3
Hafiza[1]=Saat[0]+48:Hafiza[2]=Saat[1]+48:Hafiza[3]="-"
case 4
Hafiza[4]=Saat[0]+48:Hafiza[5]=Saat[1]+48:Hafiza[6]="-"
case 5
Hafiza[7]="2":Hafiza[8]="0":Hafiza[9]=Saat[0]+48:Hafiza[10]=Saat[1]+48:
end select
next
Hafiza[11]=" "
Sayac=0
fOR A_Say1=0 to 11
Karakter=Hafiza[A_Say1]
Gosub Tablo2
next
For A_Say1=0 to Sat_Uz
Dizi[A_Say1]=Mem[A_Say1]
next
return
'*******************************************************************************
Saat_Yaz:
gosub Zaman_Al
for m=0 to 1
Hafiza[m]=" "
next
For m=0 to 2
Da0=Zaman[m] & $0F
Da1=(Zaman[m] & $F0)>>4
Sonuc=((Da1 *10)+Da0)
Saat[0]=Sonuc/10
Saat[1]=Sonuc//10
select case m
case 0
Hafiza[2]=Saat[0]+48:Hafiza[3]=Saat[1]+48:Hafiza[4]=":"
case 1
Hafiza[5]=Saat[0]+48:Hafiza[6]=Saat[1]+48:Hafiza[7]=":"
case 2
Hafiza[8]=Saat[0]+48:Hafiza[9]=Saat[1]+48:
end select
next
for m=10 to 11
Hafiza[m]=" "
next
Sayac=0
fOR A_Say1=0 to 11
Karakter=Hafiza[A_Say1]
Gosub Tablo2
next
For A_Say1=0 to Sat_Uz-1
Dizi[A_Say1]=Mem[A_Say1]
next
return
'*******************************************************************************
B_Ata1:
A_Say2=0
Uzunluk=Hafiza[2]
Font=Hafiza[3]
A_Hiz=Hafiza[4]
Bek_Sur=Hafiza[5]
T_Hiz=A_Hiz
Tar_Hiz=1000
return
'*******************************************************************************
B_Ata2:
A_Hiz=Hafiza[2]
Bek_Sur=Hafiza[3]
T_Hiz=A_Hiz
return
'*******************************************************************************
B_Ata3:
for K_Say=6 to Pointer-1
Karakter=Hafiza[K_Say]
Select case Font
case 1
gosub Tablo1
K_Uz=6
case 2
gosub Tablo2
K_Uz=8
end select
next
return
'*******************************************************************************
Sicaklik_Yaz:
OWOUT Comm_Pin, 1, [$CC, $44]' ISI değerini oku
Bekle:
OWIN Comm_Pin, 4, [Busy] ' Busy değerini oku
IF Busy = 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
Hesapla:
Sign = "+"
IF SIGN_BITI = NEGAT_ISI THEN
Sign = "-"
temp=($ffff-ham+1)*625
ISI = DIV32 10
GOTO GEC
endif
TEMP = 625 * (HAM+1) '
ISI = DIV32 10 ' Div32 hassas derece hesabı için 32 bit bölme yapıyoruz.
GEC:
ISI=ISI/1000
Onlar=ISI/10
Birler=ISI//10
Hafiza[0]=Sign:Hafiza[1]=Onlar+48:Hafiza[2]=Birler+48:
Sayac=28
fOR A_Say1=0 to 2
Karakter=Hafiza[A_Say1]
Gosub Tablo2
next
For A_Say1=0 to Sat_Uz-1
Dizi[A_Say1]=Mem[A_Say1]
next
'Derece İşareti
Dizi[52]=$00:Dizi[53]=$06:Dizi[54]=$09:Dizi[55]=$09:Dizi[56]=$06:Dizi[57]=$00:
'C
Dizi[58]=$3E:Dizi[59]=$7F:Dizi[60]=$41:Dizi[61]=$41:Dizi[62]=$41:Dizi[63]=$63:Dizi[64]=$22:Dizi[65]=$00:
for A_Say1=0 to 27
Dizi[A_Say1]=$0
next
for A_Say1=66 to Sat_Uz-1
Dizi[A_Say1]=$0
next
return
'*******************************************************************************
Tablo2:
Select case Karakter
case "A"
For T=0 to 7
lookup2 T,[$7C,$7E,$13,$11,$13,$7E,$7C,$00],O_Kar
Gosub Ata
next
case "B"
For T=0 to 7
lookup2 T,[$7F,$7F,$49,$49,$49,$7F,$36,$00],O_Kar
Gosub Ata
next
case "C"
For T=0 to 7
lookup2 T,[$3E,$7F,$41,$41,$41,$63,$22,$00],O_Kar
Gosub Ata
next
case 199 'Ç
For T=0 to 7
lookup2 T,[$3E,$7F,$C1,$C1,$41,$63,$22,$00],O_Kar
Gosub Ata
next
case "D"
For T=0 to 7
lookup2 T,[$7F,$7F,$41,$41,$7F,$3E,$00,$00],O_Kar
Gosub Ata
next
case "E"
For T=0 to 7
lookup2 T,[$7F,$7F,$49,$49,$49,$63,$63,$00],O_Kar
Gosub Ata
next
case "F"
For T=0 to 7
lookup2 T,[$7F,$7F,$09,$09,$09,$03,$03,$00],O_Kar
Gosub Ata
next
case "G"
For T=0 to 7
lookup2 T,[$3E,$7F,$41,$49,$49,$7B,$32,$00],O_Kar
Gosub Ata
next
case 208 'Ğ
For T=0 to 7
lookup2 T,[$3C,$7E,$43,$53,$53,$76,$24,$00],O_Kar
Gosub Ata
next
case "H"
For T=0 to 7
lookup2 T,[$7F,$7F,$08,$08,$08,$7F,$7F,$00],O_Kar
Gosub Ata
next
case "I"
For T=0 to 7
lookup2 T,[$00,$00,$41,$7F,$7F,$41,$00,$00],O_Kar
Gosub Ata
next
case 221 'İ
For T=0 to 7
lookup2 T,[$00,$00,$44,$7D,$7D,$44,$00,$00],O_Kar
Gosub Ata
next
case "J"
For T=0 to 7
lookup2 T,[$20,$60,$40,$41,$7F,$3F,$01,$00],O_Kar
Gosub Ata
next
case "K"
For T=0 to 7
lookup2 T,[$7F,$7F,$08,$1C,$36,$63,$41,$00],O_Kar
Gosub Ata
next
case "L"
For T=0 to 7
lookup2 T,[$7F,$7F,$40,$40,$40,$60,$60,$00],O_Kar
Gosub Ata
next
case "M"
For T=0 to 7
lookup2 T,[$7F,$7F,$02,$0C,$02,$7F,$7F,$00],O_Kar
Gosub Ata
next
case "N"
For T=0 to 7
lookup2 T,[$7F,$7F,$06,$0C,$18,$7F,$7F,$00],O_Kar
Gosub Ata
next
case "O"
For T=0 to 7
lookup2 T,[$3E,$7F,$41,$41,$41,$7F,$3E,$00],O_Kar
Gosub Ata
next
case 214 'Ö
For T=0 to 7
lookup2 T,[$3C,$7E,$43,$42,$43,$7E,$3C,$00],O_Kar
Gosub Ata
next
case "P"
For T=0 to 7
lookup2 T,[$7F,$7F,$09,$09,$09,$06,$06,$00],O_Kar
Gosub Ata
next
case "R"
For T=0 to 7
lookup2 T,[$7F,$7F,$09,$09,$09,$76,$76,$00],O_Kar
Gosub Ata
next
case "S"
For T=0 to 7
lookup2 T,[$26,$6F,$49,$49,$49,$7B,$32,$00],O_Kar
Gosub Ata
next
case 222 'Ş
For T=0 to 7
lookup2 T,[$26,$6F,$49,$C9,$C9,$7B,$32,$00],O_Kar
Gosub Ata
next
case "T"
For T=0 to 7
lookup2 T,[$01,$01,$7F,$7F,$01,$01,$00,$00],O_Kar
Gosub Ata
next
case "U"
For T=0 to 7
lookup2 T,[$3F,$7F,$40,$40,$40,$7F,$3F,$00],O_Kar
Gosub Ata
next
case 220 'Ü
For T=0 to 7
lookup2 T,[$3D,$7D,$40,$40,$40,$7D,$3D,$00],O_Kar
Gosub Ata
next
case "V"
For T=0 to 7
lookup2 T,[$1F,$3F,$70,$70,$30,$1F,$0F,$00],O_Kar
Gosub Ata
next
case "Y"
For T=0 to 7
lookup2 T,[$07,$0F,$18,$70,$18,$0F,$07,$00],O_Kar
Gosub Ata
next
case "Z"
For T=0 to 7
lookup2 T,[$63,$73,$59,$4D,$47,$63,$61,$00],O_Kar
Gosub Ata
next
case "Q"
For T=0 to 7
lookup2 T,[$3E,$7F,$41,$51,$61,$7F,$3E,$00],O_Kar
Gosub Ata
next
case "W"
For T=0 to 7
lookup2 T,[$3F,$7F,$40,$38,$40,$7F,$3F,$00],O_Kar
Gosub Ata
next
case "X"
For T=0 to 7
lookup2 T,[$43,$66,$3C,$18,$3C,$66,$43,$00],O_Kar
Gosub Ata
next
case " "
For T=0 to 7
lookup2 T,[$00,$00,$00,$00,$00,$00,$00,$00],O_Kar
Gosub Ata
next
case "0"
For T=0 to 7
lookup2 T,[$3E,$7F,$51,$49,$45,$7F,$3E,$00],O_Kar
Gosub Ata
next
case "1"
For T=0 to 7
lookup2 T,[$00,$42,$7F,$7F,$40,$00,$00,$00],O_Kar
Gosub Ata
next
case "2"
For T=0 to 7
lookup2 T,[$42,$63,$71,$59,$4D,$47,$42,$00],O_Kar
Gosub Ata
next
case "3"
For T=0 to 7
lookup2 T,[$22,$63,$41,$49,$49,$7F,$36,$00],O_Kar
Gosub Ata
next
case "4"
For T=0 to 7
lookup2 T,[$30,$38,$2C,$26,$7F,$7F,$20,$00],O_Kar
Gosub Ata
next
case "5"
For T=0 to 7
lookup2 T,[$27,$67,$45,$45,$45,$7D,$39,$00],O_Kar
Gosub Ata
next
case "6"
For T=0 to 7
lookup2 T,[$38,$7C,$4E,$4B,$79,$30,$00,$00],O_Kar
Gosub Ata
next
case "7"
For T=0 to 7
lookup2 T,[$01,$01,$71,$79,$0D,$07,$03,$00],O_Kar
Gosub Ata
next
case "8"
For T=0 to 7
lookup2 T,[$36,$7F,$49,$49,$49,$7F,$36,$00],O_Kar
Gosub Ata
next
case "9"
For T=0 to 7
lookup2 T,[$06,$0F,$49,$49,$69,$3F,$1E,$00],O_Kar
Gosub Ata
next
case ":"
For T=0 to 7
lookup2 T,[$00,$00,$00,$66,$66,$00,$00,$00],O_Kar
Gosub Ata
next
case "-"
For T=0 to 7
lookup2 T,[$00,$00,$08,$08,$08,$08,$00,$00],O_Kar
Gosub Ata
next
case "+"
For T=0 to 7
lookup2 T,[$00,$18,$18,$7E,$7E,$18,$18,$00],O_Kar
Gosub Ata
next
case "."
For T=0 to 7
lookup2 T,[$00,$00,$60,$60,$00,$00,$00,$00],O_Kar
Gosub Ata
next
case ","
For T=0 to 7
lookup2 T,[$00,$00,$B0,$70,$00,$00,$00,$00],O_Kar
Gosub Ata
next
case ";"
For T=0 to 7
lookup2 T,[$00,$00,$B6,$76,$00,$00,$00,$00],O_Kar
Gosub Ata
next
case "&"
For T=0 to 7
lookup2 T,[$00,$36,$49,$55,$22,$50,$00,$00],O_Kar
Gosub Ata
next
CASE "'"
For T=0 to 7
lookup2 T,[$00,$00,$03,$07,$07,$00,$00,$00],O_Kar
Gosub Ata
next
CASE "!"
For T=0 to 7
lookup2 T,[$00,$00,$00,$5F,$5F,$00,$00,$00],O_Kar
Gosub Ata
next
CASE "%"
For T=0 to 7
lookup2 T,[$42,$25,$12,$08,$24,$52,$21,$00],O_Kar
Gosub Ata
next
CASE "?"
For T=0 to 7
lookup2 T,[$02,$52,$51,$09,$09,$06,$06,$00],O_Kar
Gosub Ata
next
case else
For T=0 to 7
lookup2 T,[$00,$00,$00,$00,$00,$00,$00,$00],O_Kar
Gosub Ata
next
end select
return
'*******************************************************************************
Tablo1:
select case Karakter
case "A"
For T=0 to 5
lookup2 T,[$7C,$12,$11,$12,$7C,$00],O_Kar
Gosub Ata
next
case "B"
For T=0 to 5
lookup2 T,[$41,$7F,$49,$49,$36,$00],O_Kar
Gosub Ata
next
case "C"
For T=0 to 5
lookup2 T,[$3E,$41,$41,$41,$22,$00],O_Kar
Gosub Ata
next
case 199 'Ç
For T=0 to 5
lookup2 T,[$3E,$41,$C1,$41,$22,$00],O_Kar
Gosub Ata
next
case "D"
For T=0 to 5
lookup2 T,[$41,$7F,$41,$41,$3E,$00],O_Kar
Gosub Ata
next
case "E"
For T=0 to 5
lookup2 T,[$7F,$49,$49,$49,$41,$00],O_Kar
Gosub Ata
next
case "F"
For T=0 to 5
lookup2 T,[$7F,$09,$09,$09,$01,$00],O_Kar
Gosub Ata
next
case "G"
For T=0 to 5
lookup2 T,[$3E,$41,$49,$49,$32,$00],O_Kar
Gosub Ata
next
case 208 'Ğ
For T=0 to 5
lookup2 T,[$3C,$43,$53,$53,$24,$00],O_Kar
Gosub Ata
next
case "H"
For T=0 to 5
lookup2 T,[$7F,$08,$08,$08,$7F,$00],O_Kar
Gosub Ata
next
case "I"
For T=0 to 5
lookup2 T,[$00,$41,$7F,$41,$00,$00],O_Kar
Gosub Ata
next
case 221 'İ
For T=0 to 5
lookup2 T,[$00,$44,$7D,$44,$00,$00],O_Kar
Gosub Ata
next
case "J"
For T=0 to 5
lookup2 T,[$20,$40,$41,$3F,$01,$00],O_Kar
Gosub Ata
next
case "K"
For T=0 to 5
lookup2 T,[$7F,$08,$14,$22,$41,$00],O_Kar
Gosub Ata
next
case "L"
For T=0 to 5
lookup2 T,[$7F,$40,$40,$40,$40,$00],O_Kar
Gosub Ata
next
case "M"
For T=0 to 5
lookup2 T,[$7F,$02,$0C,$02,$7F,$00],O_Kar
Gosub Ata
next
case "N"
For T=0 to 5
lookup2 T,[$7F,$04,$08,$10,$7F,$00],O_Kar
Gosub Ata
next
case "O"
For T=0 to 5
lookup2 T,[$3E,$41,$41,$41,$3E,$00],O_Kar
Gosub Ata
next
case 214 'Ö
For T=0 to 5
lookup2 T,[$3C,$43,$42,$43,$3C,$00],O_Kar
Gosub Ata
next
case "P"
For T=0 to 5
lookup2 T,[$7F,$09,$09,$09,$06,$00],O_Kar
Gosub Ata
next
case "R"
For T=0 to 5
lookup2 T,[$7F,$09,$09,$09,$76,$00],O_Kar
Gosub Ata
next
case "S"
For T=0 to 5
lookup2 T,[$26,$49,$49,$49,$32,$00],O_Kar
Gosub Ata
next
case 222 'Ş
For T=0 to 5
lookup2 T,[$26,$49,$C9,$49,$32,$00],O_Kar
Gosub Ata
next
case "T"
For T=0 to 5
lookup2 T,[$01,$01,$7F,$01,$01,$00],O_Kar
Gosub Ata
next
case "U"
For T=0 to 5
lookup2 T,[$3F,$40,$40,$40,$3F,$00],O_Kar
Gosub Ata
next
case 220 'Ü
For T=0 to 5
lookup2 T,[$3D,$40,$40,$40,$3D,$00],O_Kar
Gosub Ata
next
case "V"
For T=0 to 5
lookup2 T,[$1F,$20,$40,$20,$1F,$00],O_Kar
Gosub Ata
next
case "Y"
For T=0 to 5
lookup2 T,[$07,$08,$70,$08,$07,$00],O_Kar
Gosub Ata
next
case "Z"
For T=0 to 5
lookup2 T,[$61,$51,$49,$45,$43,$00],O_Kar
Gosub Ata
next
case "Q"
For T=0 to 5
lookup2 T,[$3E,$41,$51,$61,$7E,$00],O_Kar
Gosub Ata
next
case "W"
For T=0 to 5
lookup2 T,[$3F,$40,$30,$40,$3F,$00],O_Kar
Gosub Ata
next
case "X"
For T=0 to 5
lookup2 T,[$63,$14,$08,$14,$63,$00],O_Kar
Gosub Ata
next
case "0"
For T=0 to 5
lookup2 T,[$3E,$51,$49,$45,$3E,$00],O_Kar
Gosub Ata
next
case "1"
For T=0 to 5
lookup2 T,[$00,$42,$7F,$40,$00,$00],O_Kar
Gosub Ata
next
case "2"
For T=0 to 5
lookup2 T,[$42,$61,$51,$49,$46,$00],O_Kar
Gosub Ata
next
case "3"
For T=0 to 5
lookup2 T,[$22,$41,$49,$49,$36,$00],O_Kar
Gosub Ata
next
case "4"
For T=0 to 5
lookup2 T,[$18,$14,$12,$7F,$10,$00],O_Kar
Gosub Ata
next
case "5"
For T=0 to 5
lookup2 T,[$27,$45,$45,$45,$39,$00],O_Kar
Gosub Ata
next
case "6"
For T=0 to 5
lookup2 T,[$3C,$4A,$49,$49,$30,$00],O_Kar
Gosub Ata
next
case "7"
For T=0 to 5
lookup2 T,[$01,$71,$09,$05,$03,$00],O_Kar
Gosub Ata
next
case "8"
For T=0 to 5
lookup2 T,[$36,$49,$49,$49,$36,$00],O_Kar
Gosub Ata
next
case "9"
For T=0 to 5
lookup2 T,[$06,$49,$49,$29,$1E,$00],O_Kar
Gosub Ata
next
case "a"
For T=0 to 5
lookup2 T,[$20,$54,$54,$54,$38,$00],O_Kar
Gosub Ata
next
case "b"
For T=0 to 5
lookup2 T,[$7F,$28,$44,$44,$38,$00],O_Kar
Gosub Ata
next
case "c"
For T=0 to 5
lookup2 T,[$38,$44,$44,$44,$44,$00],O_Kar
Gosub Ata
next
case 231 'ç
For T=0 to 5
lookup2 T,[$38,$44,$C4,$44,$44,$00],O_Kar
Gosub Ata
next
case "d"
For T=0 to 5
lookup2 T,[$38,$44,$44,$28,$7F,$00],O_Kar
Gosub Ata
next
case "e"
For T=0 to 5
lookup2 T,[$38,$54,$54,$54,$18,$00],O_Kar
Gosub Ata
next
case "f"
For T=0 to 5
lookup2 T,[$08,$7E,$09,$09,$02,$00],O_Kar
Gosub Ata
next
case "g"
For T=0 to 5
lookup2 T,[$08,$54,$54,$54,$3C,$00],O_Kar
Gosub Ata
next
case 240 'ğ
For T=0 to 5
lookup2 T,[$08,$54,$56,$56,$3C,$00],O_Kar
Gosub Ata
next
case "h"
For T=0 to 5
lookup2 T,[$7F,$08,$04,$04,$78,$00],O_Kar
Gosub Ata
next
case 253 'ı
For T=0 to 5
lookup2 T,[$00,$44,$7C,$40,$00,$00],O_Kar
Gosub Ata
next
case "i"
For T=0 to 5
lookup2 T,[$00,$44,$7D,$40,$00,$00],O_Kar
Gosub Ata
next
case "j"
For T=0 to 5
lookup2 T,[$20,$40,$44,$3D,$00,$00],O_Kar
Gosub Ata
next
case "k"
For T=0 to 5
lookup2 T,[$7F,$10,$28,$44,$00,$00],O_Kar
Gosub Ata
next
case "l"
For T=0 to 5
lookup2 T,[$00,$41,$7F,$40,$00,$00],O_Kar
Gosub Ata
next
case "m"
For T=0 to 5
lookup2 T,[$7C,$04,$08,$04,$78,$00],O_Kar
Gosub Ata
next
case "n"
For T=0 to 5
lookup2 T,[$7C,$08,$04,$04,$78,$00],O_Kar
Gosub Ata
next
case "o"
For T=0 to 5
lookup2 T,[$38,$44,$44,$44,$38,$00],O_Kar
Gosub Ata
next
case 246 'ö
For T=0 to 5
lookup2 T,[$38,$46,$44,$46,$38,$00],O_Kar
Gosub Ata
next
case "p"
For T=0 to 5
lookup2 T,[$7C,$14,$14,$14,$08,$00],O_Kar
Gosub Ata
next
case "r"
For T=0 to 5
lookup2 T,[$7C,$08,$04,$04,$08,$00],O_Kar
Gosub Ata
next
case "s"
For T=0 to 5
lookup2 T,[$48,$54,$54,$54,$24,$00],O_Kar
Gosub Ata
next
case 254 'ş
For T=0 to 5
lookup2 T,[$48,$54,$D4,$54,$24,$00],O_Kar
Gosub Ata
next
case "t"
For T=0 to 5
lookup2 T,[$00,$04,$3F,$44,$44,$00],O_Kar
Gosub Ata
next
case "u"
For T=0 to 5
lookup2 T,[$3C,$40,$40,$20,$7C,$00],O_Kar
Gosub Ata
next
case 252 'ü
For T=0 to 5
lookup2 T,[$3A,$40,$40,$20,$7A,$00],O_Kar
Gosub Ata
next
case "v"
For T=0 to 5
lookup2 T,[$1C,$20,$40,$20,$1C,$00],O_Kar
Gosub Ata
next
case "y"
For T=0 to 5
lookup2 T,[$0C,$50,$50,$50,$3C,$00],O_Kar
Gosub Ata
next
case "z"
For T=0 to 5
lookup2 T,[$44,$64,$54,$4C,$44,$00],O_Kar
Gosub Ata
next
case "q"
For T=0 to 5
lookup2 T,[$0C,$12,$12,$7E,$00,$00],O_Kar
Gosub Ata
next
case "w"
For T=0 to 5
lookup2 T,[$30,$40,$30,$40,$30,$00],O_Kar
Gosub Ata
next
case "x"
For T=0 to 5
lookup2 T,[$44,$28,$10,$28,$44,$00],O_Kar
Gosub Ata
next
case " "
For T=0 to 5
lookup2 T,[$00,$00,$00,$00,$00,$00],O_Kar
Gosub Ata
next
case "+"
For T=0 to 5
lookup2 T,[$08,$08,$3E,$08,$08,$00],O_Kar
Gosub Ata
next
case ":"
For T=0 to 5
lookup2 T,[$00,$00,$66,$66,$00,$00],O_Kar
Gosub Ata
next
case "-"
For T=0 to 5
lookup2 T,[$00,$08,$08,$08,$08,$00],O_Kar
Gosub Ata
next
case "."
For T=0 to 5
lookup2 T,[$00,$60,$60,$00,$00,$00],O_Kar
Gosub Ata
next
case ","
For T=0 to 5
lookup2 T,[$00,$B0,$70,$00,$00,$00],O_Kar
Gosub Ata
next
case "&"
For T=0 to 5
lookup2 T,[$36,$49,$55,$22,$50,$00],O_Kar
Gosub Ata
next
CASE "'"
For T=0 to 5
lookup2 T,[$00,$00,$03,$07,$00,$00],O_Kar
Gosub Ata
next
CASE "!"
For T=0 to 5
lookup2 T,[$00,$00,$5F,$5F,$00,$00],O_Kar
Gosub Ata
next
CASE "%"
For T=0 to 5
lookup2 T,[$22,$15,$0A,$14,$2A,$11],O_Kar
Gosub Ata
next
CASE "?"
For T=0 to 5
lookup2 T,[$02,$01,$51,$09,$06,$00],O_Kar
Gosub Ata
next
case else
For T=0 to 5
lookup2 T,[$00,$00,$00,$00,$00,$00],O_Kar
Gosub Ata
next
end select
return
'*******************************************************************************
Ata:
Mem[Sayac]=O_Kar
Sayac=Sayac+1
return
'*******************************************************************************
Bosalt:
for A_Say1=0 to Sat_Uz-1
Dizi[A_Say1]=$00
next
return
'*******************************************************************************
Zaman_Al:
RST = 1 ' Ready for transfer
Shiftout IO, SCLK, LSBFIRST, [$bf] ' Read all 8 RTC registers in burst mode
Shiftin IO, SCLK, LSBPRE, [Zaman[2],Zaman[1],Zaman[0],Zaman[3],Zaman[4],Zaman[6],Zaman[5],Zaman[7]]
RST = 0 ' Reset RTC
Return
'*******************************************************************************
Zaman_Ayarla:
RST = 1
Shiftout IO, SCLK, LSBFIRST, [$8e, 0]
RST = 0
RST = 1
Shiftout IO, SCLK, LSBFIRST, [$be, Zaman1[1],Zaman1[2],Zaman1[3],Zaman1[4],Zaman1[5],Zaman1[6],Zaman1[7], 0]
RST = 0
Return
'*******************************************************************************
Disable
Com_Oku:
hserin [Gelen]
if Gelen=250 then Z=1
if Z=0 then
i2cwrite I2C_SDA, I2C_SCL,$A0, Adres, [Gelen]
Adres=Adres+1
else
Zaman1[y]=Gelen
Y=Y+1
endif
if Gelen=251 then
Adres=0
C_Durum=1
n=8
Adr=0
Header=0
Okunan=251
Pointer=0
Sayac=0
Sayac1=(Uzunluk*K_Uz)-Sat_Uz
A_Say1=Sat_Uz-1
A_Say2=Sat_Uz-1
endif
INTCON = %11000000
PIE1.5 = 1
resume
End
ilk önce devrenin bpb dosya içindeki bilgiler yukarıda
HATA olarak "ADCON1 = 7" yeri kırmızı işartliyor
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?