Elektrotekno.com Ana Sayfa || Programlanabilir Cihaz ve Elemanlar || Microchip Pic Serisi


16F877 ile seri kontrol devresi

Açıklama:
Elektrik, Elektronik, Haberleşme ve Otomasyon konularının ağırlıklı olarak konuşulduğu, tartışıldığı ve bilgi paylaşımı yapıldığı forumumuza hoşgeldiniz.
Şu an Kod Paylaşım ve Soru Cevap Alanı kategorisi içerisindeki Microchip Pic Serisi forumunda bulunuyorsunuz.
Bu sayfada üyelerimizin "18f452 eeprom'a değer yazma sorunu" konusundaki problem, görüş ve önerileri okuyabilir ayrıca konu hakkındaki doküman, resim, proje, devre ve programlara ücretsiz olarak ulaşabilirsiniz. Üye olduktan sonra sizler de konu hakkında sorular sorabilir ya da yorum ve paylaşım yaparak birikimlerinizi aktarabilirsiniz.
Forumdan tam olarak yararlanabilmek için üye olmayı unutmayınız!
Kayıt: 11 Mar 2006
Mesajlar: 116

Offline
melih
Tarih: 11 01 2008 13:55

merhaba arkadaşlar 16f877 kullanarak 2 pic arasında seri haberleşme gerçekleştirerek uzaktan motor kontrolu yapmak istiyorum.bazı kaynaklardan yararlanarak projeyi yaptım.ancak verici bölümündeki butona basınca alıcı bölümündeki led butona basıldığı sürece yanıyor.ben bunu butona basıldığında sürekli olarak yanmasını ve tekrar butona basıldığında sönmesini istiyorum.nasıl yapabilirim ?
16F877 ile seri kontrol devresi



alıcı.bas

ınclude "modedefs.bas"

trısb=%00000000
portb=%00000000
adcon1=7




oku var byte
oku=0

basla:
serın porta.0,n2400,["a"],#oku

ıf oku=0 then
portb=%00000000
endıf

ıf oku=1 then
portb=%00000001
endıf

ıf oku=2 then
portb=%00000010
endıf

ıf oku=3 then
portb=%00000100
endıf

ıf oku=4 then
portb=%00001000
endıf

ıf oku=5 then
portb=%00010000
endıf

ıf oku=6 then
portb=%00100000
endıf

ıf oku=7 then
portb=%01000000
endıf

ıf oku=8 then
portb=%10000000
endıf
ıf oku=9 then
portb=%00001001
endıf
ıf oku=10 then
portb=%00000101
endıf
ıf oku=11 then
portb=%00010001
endıf
ıf oku=12 then
portb=%00100001
endıf
ıf oku=13 then
portb=%01000001
endıf
ıf oku=14 then
portb=%10000001
endıf
ıf oku=15 then
portb=%00000110
endıf
ıf oku=16 then
portb=%00001010
endıf
ıf oku=17 then
portb=%00010010
endıf
ıf oku=18 then
portb=%00100010
endıf
ıf oku=19 then
portb=%01000010
endıf
ıf oku=20 then
portb=%10000010
endıf
ıf oku=21 then
portb=%00010100
endıf
ıf oku=22 then
portb=%00100100
endıf
ıf oku=23 then
portb=%01000100
endıf
ıf oku=24 then
portb=%10000100
endıf
ıf oku=25 then
portb=%00011000
endıf
ıf oku=26 then
portb=%00101000
endıf
ıf oku=27 then
portb=%01001000
endıf
ıf oku=28 then
portb=%10001000
endıf
ıf oku=29 then
portb=%01010000
endıf
ıf oku=30 then
portb=%10010000
endıf
ıf oku=31 then
portb=%01100000
endıf
ıf oku=32 then
portb=%10100000
endıf
goto basla
end


verici.bas


ınclude "modedefs.bas"

define lcd_dreg portb
defıne lcd_dbıt 0
defıne lcd_rsreg portc
defıne lcd_rsbıt 0
defıne lcd_ereg portc
defıne lcd_ebıt 1
defıne lcd_bıts 8
defıne lcd_lınes 2

adcon1=7

trısd=%11111111
output portc.2

m1sol var portd.0
m1sag var portd.1
m2sol var portd.2
m2sag var portd.3
m3sol var portd.4
m3sag var portd.5
m4sol var portd.6
m4sag var portd.7


gon var byte
gon=0


basla:

ıf m1sol=1 and m2sag=1 then
gon=9

lcdout $fe,1,"1. motor = sol"
lcdout $fe,$c0,"2. motor = sag"

endıf

ıf m1sol=1 and m2sol=1 then
gon=10

lcdout $fe,1,"1. motor = sol"
lcdout $fe,$c0,"2. motor = sol"
goto ser
endıf

ıf m1sol=1 and m3sol=1 then
gon=11

lcdout $fe,1,"1. motor = sol"
lcdout $fe,$c0,"3. motor = sol"
goto ser
endıf

ıf m1sol=1 and m3sag=1 then
gon=12
lcdout $fe,1,"1. motor = sol"
lcdout $fe,$c0,"3. motor = sag"
goto ser
endıf

ıf m1sol=1 and m4sol=1 then
gon=13
lcdout $fe,1,"1. motor = sol"
lcdout $fe,$c0,"4. motor = sol"
goto ser
endıf

ıf m1sol=1 and m4sag=1 then
gon=14
lcdout $fe,1,"1. motor = sol"
lcdout $fe,$c0,"4. motor = sag"
goto ser
endıf

ıf m1sag=1 and m2sol=1 then
gon=15
lcdout $fe,1,"1. motor = sag"
lcdout $fe,$c0,"2. motor = sol"
goto ser
endıf

ıf m1sag=1 and m2sag=1 then
gon=16
lcdout $fe,1,"1. motor = sag"
lcdout $fe,$c0,"2. motor = sag"
goto ser
endıf

ıf m1sag=1 and m3sol=1 then
gon=17
lcdout $fe,1,"1. motor = sag"
lcdout $fe,$c0,"3. motor = sol"
goto ser
endıf

ıf m1sag=1 and m3sag=1 then
gon=18
lcdout $fe,1,"1. motor = sag"
lcdout $fe,$c0,"3. motor = sag"
goto ser
endıf

ıf m1sag=1 and m4sol=1 then
gon=19
lcdout $fe,1,"1. motor = sag"
lcdout $fe,$c0,"4. motor = sol"
goto ser
endıf

ıf m1sag=1 and m4sag=1 then
gon=20
lcdout $fe,1,"1. motor = sag"
lcdout $fe,$c0,"4. motor = sag"
goto ser
endıf

ıf m2sol=1 and m3sol=1 then
gon=21
lcdout $fe,1,"2. motor = sol"
lcdout $fe,$c0,"3. motor = sol"
goto ser
endıf

ıf m2sol=1 and m3sag=1 then
gon=22
lcdout $fe,1,"2. motor = sol"
lcdout $fe,$c0,"3. motor = sag"
goto ser
endıf

ıf m2sol=1 and m4sol=1 then
gon=23
lcdout $fe,1,"2. motor = sol"
lcdout $fe,$c0,"4. motor = sol"
goto ser
endıf

ıf m2sol=1 and m4sag=1 then
gon=24
lcdout $fe,1,"2. motor = sol"
lcdout $fe,$c0,"4. motor = sag"
goto ser
endıf

ıf m2sag=1 and m3sol=1 then
gon=25
lcdout $fe,1,"2. motor = sag"
lcdout $fe,$c0,"3. motor = sol"
goto ser
endıf

ıf m2sag=1 and m3sag=1 then
gon=26
lcdout $fe,1,"2. motor = sag"
lcdout $fe,$c0,"3. motor = sag"
goto ser
endıf

ıf m2sag=1 and m4sol=1 then
gon=27
lcdout $fe,1,"2. motor = sag"
lcdout $fe,$c0,"4. motor = sol"
goto ser
endıf

ıf m2sag=1 and m4sag=1 then
gon=28
lcdout $fe,1,"2. motor = sag"
lcdout $fe,$c0,"4. motor = sag"
goto ser
endıf

ıf m3sol=1 and m4sol=1 then
gon=29
lcdout $fe,1,"3. motor = sol"
lcdout $fe,$c0,"4. motor = sol"
goto ser
endıf

ıf m3sol=1 and m4sag=1 then
gon=30
lcdout $fe,1,"3. motor = sol"
lcdout $fe,$c0,"4. motor = sag"
goto ser
endıf

ıf m3sag=1 and m4sol=1 then
gon=31
lcdout $fe,1,"3. motor = sag"
lcdout $fe,$c0,"4. motor = sol"
goto ser
endıf

ıf m3sag=1 and m4sag=1 then
gon=32
lcdout $fe,1,"3. motor = sag"
lcdout $fe,$c0,"4. motor = sag"
goto ser
endıf

ıf m1sol=1 then
gon=1
lcdout $fe,1,"1. motor = sol"
goto ser
endıf

ıf m1sag=1 then
gon=2
lcdout $fe,1,"1. motor = sag"
goto ser
endıf

ıf m2sol=1 then
gon=3
lcdout $fe,1,"2. motor = sol"
goto ser
endıf

ıf m2sag=1 then
gon=4
lcdout $fe,1,"2. motor = sag"
goto ser
endıf

ıf m3sol=1 then
gon=5
lcdout $fe,1,"3. motor = sol"
goto ser
endıf

ıf m3sag=1 then
gon=6
lcdout $fe,1,"3. motor = sag"
goto ser
endıf

ıf m4sol=1 then
gon=7
lcdout $fe,1,"4. motor = sol"
goto ser
endıf

ıf m4sag=1 then
gon=8
lcdout $fe,1,"4. motor = sag"
goto ser
endıf

gon=0

ser:
serout portc.6,n2400,[#gon,"a"]
pause 50

goto basla
end



16F877 ile seri kontrol devresi


Benzer Konular

- tda 1524 stereo ton kontrol + baskı devresi

- Telefon arama devresi
- kalpli animasyon devresi
- Bluetooth kontrol
- kablo test devresi !
- Kuru akü için şarj devresi ?
- Pic ile servo motor kontrol devresi
- pnomatik kontrol devreleri
- Fırçasız D.A Motoru FUZZY Kontrol ACİLLL Yardım

- seri port a byte göndermek

- 16f628 ile yapılmış 7 adet saat ve termometre devresi

Sitemize üyelik ve içeriğin indirilmesi tamamen ücretsizdir. Sitemizde paylaşılan tüm dokümanlar (Tezler, makaleler, ders notları, sınav soru cevaplar, projeler) paylaşımcıların bireysel çalışmaları olup telif hakları kendilerine aittir ya da açık bir şekilde kamusal alana yerleştirilmiş dokümanların birer kopyalarıdır. Kişilerin bireysel çalışmalarını sitemizde yüklemesinde, sitemizde paylaşıma teşvik eden puanlama sisteminin de etkisi büyüktür. Bunlara rağmen hala size ait olan ve burada bulunmasına izin vermediğiniz dokümanlar varsa iletişim bölümünden yöneticilere bildirmeniz durumunda derhal silineceklerdir.
Powered by phpBB | Translated by phpBB Türkiye | Ads by Google Adsense | Design by Crazy Bat based
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72