Havada Yazı Yazmak Çok hayret verici bir şey olduğunu hissetmiştim ilk duyduğumda. 8 tane led alt alta sıralanıyor ve bir yazı oluşturuyor. Hayret verici bir şey olmasına karşın çok kolay bir mantığı var havada yazı yazmanın. Elimizi salladığımızda havayı sütun sütun taramış oluyor ve her bir sütun da gerekli olan bilgiyi göndererek anlamlı yazılar yazabiliyoruz. |
![]() |
Yukarıda gördüğünüz simülasyonu ben oluşturdum havada yazı yazmanın mantığını anlamak için bu animasyona bakmak yeterlidir diye düşünüyorum. Devreyi yaparken zorlanacağınızı zannetmiyorum. Çok basit bir mantığı var. Picimizin B portuna ledleri A portunada butonları bağladım. Böylelikle devre bitmiş oldu. J Eğer pic16f628a kullanırsanız kristal takmanıza gerek kalmıyor ve daha fazla hafızaya sahip olduğu için (2kbyte) daha fazla yazı yazabilirsiniz. |
![]() |
![]() |
İndir |
Örnek bir kod. Eger pic basic'te biraz bilgin varsa bunun üzerinden kontrol edebilirsiniz. Pic ve pic basic konusunda bilginiz yoksa sitemizde pic'e yeni baslayanlar bölümünde örnek devrelerle kisaca açklayacagim. Not: program Proton IDE de yazilmistir.Bu programi program indir bölümünde bulabilirsiniz. |
'**************************************************************** DEVICE 16F84 TRISA=%11111111 TRISB=000000 basla: IF PORTA.1=0 THEN buton1 IF PORTA.2=0 THEN buton2 GOTO basla buton1: IF PORTA.0=0 THEN basla PORTB=000000 : DELAYMS 1 ' PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=000110 : DELAYMS 1 ' [][] PORTB=011000 : DELAYMS 1 ' [][] PORTB=000110 : DELAYMS 1 ' [][] PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01000001 : DELAYMS 1 ' [] [] PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=011001 : DELAYMS 1 ' [][] [] PORTB=101001 : DELAYMS 1 ' [] [] [] PORTB=%01000110 : DELAYMS 1 ' [] [][] PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=001000 : DELAYMS 1 ' [] PORTB=001000 : DELAYMS 1 ' [] PORTB=001000 : DELAYMS 1 ' [] PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=000000 : DELAYMS 1 PORTB=%01111110 : DELAYMS 1 ' [][][][][][] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=%01111110 : DELAYMS 1 ' [][][][][][] PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=110110 : DELAYMS 1 ' [][] [][] PORTB=000000 : DELAYMS 1 PORTB=%01111110 : DELAYMS 1 ' [][][][][][] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=%01111110 : DELAYMS 1 ' [][][][][][] PORTB=0 : DELAYMS 200 GOTO buton1 buton2: IF PORTA.0=0 THEN basla PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01000001 : DELAYMS 1 ' [] [] PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=000110 : DELAYMS 1 ' [][] PORTB=011000 : DELAYMS 1 ' [][] PORTB=000110 : DELAYMS 1 ' [][] PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=011001 : DELAYMS 1 ' [][] [] PORTB=101001 : DELAYMS 1 ' [] [] [] PORTB=%01000110 : DELAYMS 1 ' [] [][] PORTB=000000 : DELAYMS 1 PORTB=%01111110 : DELAYMS 1 ' [][][][][][] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=001001 : DELAYMS 1 ' [] [] PORTB=%01111110 : DELAYMS 1 ' [][][][][][] PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=001000 : DELAYMS 1 ' [] PORTB=001000 : DELAYMS 1 ' [] PORTB=001000 : DELAYMS 1 ' [] PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=000000 : DELAYMS 1 PORTB=100110 : DELAYMS 1 ' [] [][] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=110010 : DELAYMS 1 ' [][] [] PORTB=000000 : DELAYMS 1 PORTB=%01111111 : DELAYMS 1 ' [][][][][][][] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01001001 : DELAYMS 1 ' [] [] [] PORTB=%01000001 : DELAYMS 1 ' [] [] PORTB=0 : DELAYMS 300 GOTO buton2 |
2 Ağustos 2010 Pazartesi
Havada Yazı Yazmak (pic basic pro)
Etiketler:
havaya yazı yazmak,
pic,
pic basic pro
Kaydol:
Kayıtlar (Atom)