biotec
Üye
- Katılım
- 7 Şub 2009
- Mesajlar
- 25
- Puanları
- 1
- Yaş
- 44
***************** 16F877 BİLGİLERİ *****************
@ DEVICE pic16F877
@ DEVICE pic16F877, WDT_on
@ DEVICE pic16F877, PWRT_off
@ DEVICE pic16F877, PROTECT_OFF
@ DEVICE pic16F877, HS_OSC
OPTION_REG.7=1 'PULL UP DİRENÇLERİNİN HEPSİ İPTAL
adcon1=7 'tum bacaklar dıgıtal ,ad converterler kapatılır
DEFINE OSC 4
'********** TÜRKÇE KARAKTERLİ SABİT YAZI **************'
LCDOUT $FE,$40,$0A,$00,$11,$11,$11,$11,$0E,$00 'Ü = 0
LCDOUT $FE,$48,$0E,$11,$10,$10,$11,$0E,$04,$00 'Ç = 1
LCDOUT $FE,$50,$04,$00,$0E,$04,$04,$04,$0E,$00 'I = 2
LCDOUT $FE,$58,$0A,$00,$0E,$11,$11,$11,$0E,$00 'Ö = 3
LCDOUT $FE,$60,$0E,$00,$0F,$10,$13,$11,$0F,$00 'Ğ = 4
LCDOUT $FE,$68,$0E,$11,$10,$0E,$01,$15,$0E,$04 'Ş = 5
'******************************************************'
'***************** LCD TANIMLAMALARI ******************'
DEFINE LCD_DREG PORTD 'LCD DATA BACAKLARI PORTB'YE BAĞLI
DEFINE LCD_DBIT 4 'LCD DATA BACAKLARI PORTB.4 BAĞLI
DEFINE LCD_EREG PORTD 'LCD ENABLE PİNİ PORTB'YE BAĞLI
DEFINE LCD_EBIT 3 'LCD ENABLE PİNİ PORTB.3 BAĞLI
DEFINE LCD_RSREG PORTD 'LCD RS PİNİ PORTB'YE BAĞLI
DEFINE LCD_RSBIT 2 'LCD RS PİNİ PORTB.2 BAĞLI
DEFINE LCD_BITS 4 'LCD 4 BIT BAĞLI
DEFINE LCD_LINES 4 'LCD 4*20
'*******************************************************'
'************ GİRİŞ VE ÇIKIŞLARI TANIT *********************
TRISA=%011111
TRISB=0
TRISC=0
TRISD=0
TRISE=0
PORTB=0
PORTC=0
PORTD=0
PORTE=0
'***************** MENÜ BUTONLARI *********************
SYMBOL YUKARI=PORTA.0
SYMBOL ASAGI=PORTA.1
SYMBOL GIR=PORTA.2
SYMBOL CIK=PORTA.3
SYMBOL MENU=PORTA.4
ANA VAR BYTE
MAKINA_1 VAR BYTE
'************** BİLGİLERİ TEMİZLEME İŞLEMİ *************
LCDOUT $FE,1 'LCD EKRANI TEMİZLE
pause 500 'LCD HAZIRLANIYOR
ANA = 0
MAKINA_1 = 0
CLEAR 'BÜTÜN DEĞİŞKENLERİ SIFIRLA
'************* PROGRAM BAŞLANGICI ******************
BASLA:
IF ANA = 0 AND MENU = 0 THEN
PAUSE 200
ANA = 1
WHILE menu = 0
wend
ENDIF
IF ASAGI = 0 THEN
ANA = ANA + 1
PAUSE 200
WHILE ASAGI = 0
wend
ENDIF
IF YUKARI = 0 THEN
ANA = ANA - 1
PAUSE 200
WHILE YUKARI = 0
wend
ENDIF
IF ANA > 5 THEN
ANA = 1
PAUSE 200
ENDIF
'***************************** LCD ANA DİZİNLER *******************************
ANA_EKRAN:
select case ANA
case 1:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, "*1. MAKINA "
lcdout $FE, $94, " 2. MAKINA "
lcdout $FE, $D4, " 3. MAKINA "
case 2:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, " 1. MAKINA "
lcdout $FE, $94, "*2. MAKINA "
lcdout $FE, $D4, " 3. MAKINA "
case 3:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, " 2. MAKINA "
lcdout $FE, $94, "*3. MAKINA "
lcdout $FE, $D4, " 4. MAKINA "
case 4:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, " 3. MAKINA "
lcdout $FE, $94, "*4. MAKINA "
lcdout $FE, $D4, " 5. MAKINA "
case 5:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, " 5. MAKINA "
lcdout $FE, $94, "*6. ",1,"IKI",5," "
lcdout $FE, $D4, " 1. MAKINA "
end select
'******************************************************************************
'**************************** LCD 1. MAKİNA DİZİNLER **************************
MAKINA_1_EKRANI:
select case MAKINA_1
case 1:
lcdout $FE, $2, "1. MAKiNA MEN",0,"S",0,":",#MAKINA_1
lcdout $FE, $C0, "*1. G",2,"R",2,5
lcdout $FE, $94, " 2. G",2,"R",2,5
lcdout $FE, $D4, " 3. ",1,"IKI",5," "
case 2:
lcdout $FE, $2, "1. MAKiNA MEN",0,"S",0,":",#MAKINA_1
lcdout $FE, $C0, " 1. G",2,"R",2,5
lcdout $FE, $94, "*2. G",2,"R",2,5
lcdout $FE, $D4, " 3. ",1,"IKI",5," "
case 3:
lcdout $FE, $2, "1. MAKiNA MEN",0,"S",0,":",#MAKINA_1
lcdout $FE, $C0, " 2. G",2,"R",2,5
lcdout $FE, $94, "*3. ",1,"IKI",5," "
lcdout $FE, $D4, " 1. G",2,"R",2,5
end select
'******************************************************************************
GOTO BASLA
end
---------------------------------
çizimler:
Dosyalar, Dosya Paylaşım Sitesinden Silindiği İçin Bu Konu Çöpe Taşınmıştır.
@ DEVICE pic16F877
@ DEVICE pic16F877, WDT_on
@ DEVICE pic16F877, PWRT_off
@ DEVICE pic16F877, PROTECT_OFF
@ DEVICE pic16F877, HS_OSC
OPTION_REG.7=1 'PULL UP DİRENÇLERİNİN HEPSİ İPTAL
adcon1=7 'tum bacaklar dıgıtal ,ad converterler kapatılır
DEFINE OSC 4
'********** TÜRKÇE KARAKTERLİ SABİT YAZI **************'
LCDOUT $FE,$40,$0A,$00,$11,$11,$11,$11,$0E,$00 'Ü = 0
LCDOUT $FE,$48,$0E,$11,$10,$10,$11,$0E,$04,$00 'Ç = 1
LCDOUT $FE,$50,$04,$00,$0E,$04,$04,$04,$0E,$00 'I = 2
LCDOUT $FE,$58,$0A,$00,$0E,$11,$11,$11,$0E,$00 'Ö = 3
LCDOUT $FE,$60,$0E,$00,$0F,$10,$13,$11,$0F,$00 'Ğ = 4
LCDOUT $FE,$68,$0E,$11,$10,$0E,$01,$15,$0E,$04 'Ş = 5
'******************************************************'
'***************** LCD TANIMLAMALARI ******************'
DEFINE LCD_DREG PORTD 'LCD DATA BACAKLARI PORTB'YE BAĞLI
DEFINE LCD_DBIT 4 'LCD DATA BACAKLARI PORTB.4 BAĞLI
DEFINE LCD_EREG PORTD 'LCD ENABLE PİNİ PORTB'YE BAĞLI
DEFINE LCD_EBIT 3 'LCD ENABLE PİNİ PORTB.3 BAĞLI
DEFINE LCD_RSREG PORTD 'LCD RS PİNİ PORTB'YE BAĞLI
DEFINE LCD_RSBIT 2 'LCD RS PİNİ PORTB.2 BAĞLI
DEFINE LCD_BITS 4 'LCD 4 BIT BAĞLI
DEFINE LCD_LINES 4 'LCD 4*20
'*******************************************************'
'************ GİRİŞ VE ÇIKIŞLARI TANIT *********************
TRISA=%011111
TRISB=0
TRISC=0
TRISD=0
TRISE=0
PORTB=0
PORTC=0
PORTD=0
PORTE=0
'***************** MENÜ BUTONLARI *********************
SYMBOL YUKARI=PORTA.0
SYMBOL ASAGI=PORTA.1
SYMBOL GIR=PORTA.2
SYMBOL CIK=PORTA.3
SYMBOL MENU=PORTA.4
ANA VAR BYTE
MAKINA_1 VAR BYTE
'************** BİLGİLERİ TEMİZLEME İŞLEMİ *************
LCDOUT $FE,1 'LCD EKRANI TEMİZLE
pause 500 'LCD HAZIRLANIYOR
ANA = 0
MAKINA_1 = 0
CLEAR 'BÜTÜN DEĞİŞKENLERİ SIFIRLA
'************* PROGRAM BAŞLANGICI ******************
BASLA:
IF ANA = 0 AND MENU = 0 THEN
PAUSE 200
ANA = 1
WHILE menu = 0
wend
ENDIF
IF ASAGI = 0 THEN
ANA = ANA + 1
PAUSE 200
WHILE ASAGI = 0
wend
ENDIF
IF YUKARI = 0 THEN
ANA = ANA - 1
PAUSE 200
WHILE YUKARI = 0
wend
ENDIF
IF ANA > 5 THEN
ANA = 1
PAUSE 200
ENDIF
'***************************** LCD ANA DİZİNLER *******************************
ANA_EKRAN:
select case ANA
case 1:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, "*1. MAKINA "
lcdout $FE, $94, " 2. MAKINA "
lcdout $FE, $D4, " 3. MAKINA "
case 2:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, " 1. MAKINA "
lcdout $FE, $94, "*2. MAKINA "
lcdout $FE, $D4, " 3. MAKINA "
case 3:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, " 2. MAKINA "
lcdout $FE, $94, "*3. MAKINA "
lcdout $FE, $D4, " 4. MAKINA "
case 4:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, " 3. MAKINA "
lcdout $FE, $94, "*4. MAKINA "
lcdout $FE, $D4, " 5. MAKINA "
case 5:
lcdout $FE, $2, "MEN",0," S",2,"STEM",2," :",#ANA
lcdout $FE, $C0, " 5. MAKINA "
lcdout $FE, $94, "*6. ",1,"IKI",5," "
lcdout $FE, $D4, " 1. MAKINA "
end select
'******************************************************************************
'**************************** LCD 1. MAKİNA DİZİNLER **************************
MAKINA_1_EKRANI:
select case MAKINA_1
case 1:
lcdout $FE, $2, "1. MAKiNA MEN",0,"S",0,":",#MAKINA_1
lcdout $FE, $C0, "*1. G",2,"R",2,5
lcdout $FE, $94, " 2. G",2,"R",2,5
lcdout $FE, $D4, " 3. ",1,"IKI",5," "
case 2:
lcdout $FE, $2, "1. MAKiNA MEN",0,"S",0,":",#MAKINA_1
lcdout $FE, $C0, " 1. G",2,"R",2,5
lcdout $FE, $94, "*2. G",2,"R",2,5
lcdout $FE, $D4, " 3. ",1,"IKI",5," "
case 3:
lcdout $FE, $2, "1. MAKiNA MEN",0,"S",0,":",#MAKINA_1
lcdout $FE, $C0, " 2. G",2,"R",2,5
lcdout $FE, $94, "*3. ",1,"IKI",5," "
lcdout $FE, $D4, " 1. G",2,"R",2,5
end select
'******************************************************************************
GOTO BASLA
end
---------------------------------
çizimler:
Dosyalar, Dosya Paylaşım Sitesinden Silindiği İçin Bu Konu Çöpe Taşınmıştır.