lcd ekranda 1234 sayısını nasıl yazdırabilirim

Başlatan emreemre, 23 Nisan 2015, 14:54:18

dedim

Device =16F877A
Xtal  4

TRISB=%00000111

Dim TUS  As Byte
Dim SIRA  As Byte
Dim SAYI  As Word


Declare  LCD_Type ALPHA   ; LCD type - alphanumeric
Declare  LCD_DTPin  PORTD.4   ; LCD data port
Declare  LCD_ENPin  PORTD.3   ; E line
Declare  LCD_RSPin  PORTD.2   ; RS line
Declare  LCD_Interface 4   ; Word length of the tyre of data
Declare  LCD_Lines   2   ; LCD lines number

Symbol YATAY_A= PORTB.4
Symbol YATAY_B= PORTB.5
Symbol YATAY_C= PORTB.6
Symbol YATAY_D= PORTB.7
Symbol DIKEY_1= PORTB.0
Symbol DIKEY_2= PORTB.1
Symbol DIKEY_3= PORTB.2




CMCON=7
OPTION_REG.7=0

TUS=0
DelayMS  200
Print At 1,1,"SIFRE GIR"
Print At 2,1,"SIFRE=>        "
BASLA:
PORTB =254
YATAY_A=0
If DIKEY_1=0 Then
  TUS=1:GoSub EKRAN
  While DIKEY_1=0:Wend
EndIf

If DIKEY_2=0 Then
  TUS=2:GoSub EKRAN
  While DIKEY_2=0:Wend
EndIf
       
If DIKEY_3=0 Then
TUS=3:GoSub EKRAN
While DIKEY_3=0
Wend
EndIf
High YATAY_A

YATAY_B=0
If DIKEY_1=0 Then
TUS=4:GoSub EKRAN
While DIKEY_1=0
Wend
EndIf

If DIKEY_2=0 Then
TUS=5:GoSub EKRAN
While DIKEY_2=0
Wend
EndIf

If DIKEY_3=0 Then
TUS=6:GoSub EKRAN
While DIKEY_3=0
Wend
EndIf
High YATAY_B

YATAY_C=0
If DIKEY_1=0 Then
TUS=7:GoSub EKRAN
While DIKEY_1=0
Wend
EndIf

If DIKEY_2=0 Then
TUS=8:GoSub EKRAN
While DIKEY_2=0
Wend
EndIf

If DIKEY_3=0 Then
TUS=9:GoSub EKRAN
While DIKEY_3=0
Wend
EndIf
High YATAY_C
YATAY_D=0
If DIKEY_1=0 Then
'Tus=11:THEN PROGRAMA_GIRIS
While DIKEY_1=0
Wend
EndIf

If DIKEY_2=0 Then
TUS=0:GoSub EKRAN
While DIKEY_2=0
Wend
EndIf

If DIKEY_3=0 Then
SAYI=SAYI/10
Print At 2,(11+SIRA)," "
SIRA=SIRA-1
While DIKEY_3=0
Wend
EndIf
High YATAY_D
DelayMS 100
GoTo BASLA
EKRAN:

SAYI=SAYI*10+TUS
ATLA:
Print At 2,(8+SIRA),"*"
SIRA=SIRA+1
If SIRA=4 Then SIRA=0
Return
End


ete ustam kusuruma bakma code tag nasıl yapılıyor bilmedigim den dolayı mecburen böyle gönderdim.
emreemre bunu protonda denermısın.istedigin bunun gibi mi??

ETE EDIT: MESAJ EKRANINDA YUKARIDA ÜZERİNDE "#" İŞARETİ OLAN BUTON "KOD EKLE" BUTONUDUR. ONA BASINCA {code] {/code] ŞEKLİNDE BİR EKLENTİ YAPAR MESAJA İKİ KÖŞELİ PARANTEZ ARASINA KOD'U EKLEMENİZ GEREKİR.
SONUÇTA ŞUNU GÖRMENİZ GEREKİYOR ;
{CODE] SİZİN KODUNUZ {/code]

dedim

Device =16F877A
Xtal  4

TRISB=%00000111

Dim TUS  As Byte
Dim SIRA  As Byte
Dim SAYI  As Word


Declare  LCD_Type ALPHA   ; LCD type - alphanumeric
Declare  LCD_DTPin  PORTD.4   ; LCD data port
Declare  LCD_ENPin  PORTD.3   ; E line
Declare  LCD_RSPin  PORTD.2   ; RS line
Declare  LCD_Interface 4   ; Word length of the tyre of data
Declare  LCD_Lines   2   ; LCD lines number

Symbol YATAY_A= PORTB.4
Symbol YATAY_B= PORTB.5
Symbol YATAY_C= PORTB.6
Symbol YATAY_D= PORTB.7
Symbol DIKEY_1= PORTB.0
Symbol DIKEY_2= PORTB.1
Symbol DIKEY_3= PORTB.2




CMCON=7
OPTION_REG.7=0

TUS=0
DelayMS  200
Print At 1,1,"SIFRE GIR"
Print At 2,1,"SIFRE=>        "
BASLA:
PORTB =254
YATAY_A=0
If DIKEY_1=0 Then
  TUS=1:GoSub EKRAN
  While DIKEY_1=0:Wend
EndIf

If DIKEY_2=0 Then
  TUS=2:GoSub EKRAN
  While DIKEY_2=0:Wend
EndIf
       
If DIKEY_3=0 Then
TUS=3:GoSub EKRAN
While DIKEY_3=0
Wend
EndIf
High YATAY_A

YATAY_B=0
If DIKEY_1=0 Then
TUS=4:GoSub EKRAN
While DIKEY_1=0
Wend
EndIf

If DIKEY_2=0 Then
TUS=5:GoSub EKRAN
While DIKEY_2=0
Wend
EndIf

If DIKEY_3=0 Then
TUS=6:GoSub EKRAN
While DIKEY_3=0
Wend
EndIf
High YATAY_B

YATAY_C=0
If DIKEY_1=0 Then
TUS=7:GoSub EKRAN
While DIKEY_1=0
Wend
EndIf

If DIKEY_2=0 Then
TUS=8:GoSub EKRAN
While DIKEY_2=0
Wend
EndIf

If DIKEY_3=0 Then
TUS=9:GoSub EKRAN
While DIKEY_3=0
Wend
EndIf
High YATAY_C
YATAY_D=0
If DIKEY_1=0 Then
'Tus=11:THEN PROGRAMA_GIRIS
While DIKEY_1=0
Wend
EndIf

If DIKEY_2=0 Then
TUS=0:GoSub EKRAN
While DIKEY_2=0
Wend
EndIf

If DIKEY_3=0 Then
SAYI=SAYI/10
Print At 2,(11+SIRA)," "
SIRA=SIRA-1
While DIKEY_3=0
Wend
EndIf
High YATAY_D
DelayMS 100
GoTo BASLA
EKRAN:

SAYI=SAYI*10+TUS
ATLA:
Print At 2,(8+SIRA),"*"
SIRA=SIRA+1
If SIRA=4 Then SIRA=0
Return
End

dedim

tesekkür ederim ete ustam bundan sonra bu sekılde gönderirim.

emreemre

kardeşim verdigin programda silme tuşu iki defaya mahsus çalışıyor ama ben hepsini silicegim oyüzden sıkıntı  kolay gelsin

Powered by EzPortal