15 February, 2012

TEXT LED



Salam jumpa..,

Ok tmen2 kali ni ane mo share sama kalian tentang job yg pernah ane dapet suruh buat tulisan pake led tapi dengan biaya murah..,(lain waktu akan ane share cara buat running text).
Yang ini trbilang ckup mudah meskipun sudah berbasis microcontroller.,tpi hnya sebagai switching, so cek aja langsung di sini…,

Pertama mesti siapin komponennya :

  • Led (terserah warna apa sesuai selera, disini ane pake merah)
  • Papan PCB matrik alias Pcb lobang
  • Transistor NPN 2N222
  • Microcontroller (ane pake ATtiny26)kbetulan sisa proyek.,pikir2 hemat ongkos hehe
  • Kabel secukupnya (bisa pake kabel pelangi)
  • tentunya solder & timah  

Dan untuk power supply 5V bisa dlihat di artikel ni http://qabulbee.blogspot.com/2012/02/power-suppy-5v-9v-dan-12v.html

 buat ja supply yg 5 volt.,tentunya untuk rangkaian TEXT LED diatas.


dan untuk contoh skema rangkaian sebagai berikut :




diatas adalah sampel untuk huruf I sedangkan huruf laen kreasi sendiri sesuaikan dengan tulisan yg mau dibuat..,

dan untuk program ane buat pake BASCOM, ni sampelnya :

 '###########################################
'#        
'# By qabulbee.blogspot.com
'#
'###########################################

$regfile = "Attiny26.dat"
$crystal = 12000000

Do

'lampu hidup semua
Porta = &HFF
Portb = &HFF
Waitms 400


'lampu mati semua
Porta = &B00000000
Portb = &B00000000
Waitms 500


'lampu satu persatu lampu hidup
Porta.0 = 1                                                 'I
Waitms 100

Porta.1 = 1                                                 'P
Waitms 100

Porta.2 = 1                                                 'M
Waitms 100

Porta.3 = 1                                                 'R
Waitms 100

Porta.4 = 1                                                 'spasi
Waitms 100

Porta.5 = 1                                                 'S 1
Waitms 100

Porta.6 = 1                                                 'U
Waitms 100

Porta.7 = 1                                                 'M
Waitms 100

Portb.0 = 1                                                 'S 2
Waitms 100

Portb.6 = 1                                                 'E
Waitms 100

Portb.1 = 1                                                 'L
Waitms 500


'lampu satu persatu lampu mati
Portb.1 = 0
Waitms 100

Portb.6 = 0
Waitms 100

Portb.0 = 0
Waitms 100

Porta.7 = 0
Waitms 100

Porta.6 = 0
Waitms 100

Porta.5 = 0
Waitms 100

Porta.4 = 0
Waitms 100

Porta.3 = 0
Waitms 100

Porta.2 = 0
Waitms 100

Porta.1 = 0
Waitms 100

Porta.0 = 0
Waitms 500


'lampu hidup acak
Portb.1 = 1
Waitms 100

Porta.0 = 1
Waitms 100

Portb.6 = 1
Waitms 100

Porta.1 = 1
Waitms 100

Portb.0 = 1
Waitms 100

Porta.2 = 1
Waitms 100

Porta.7 = 1
Waitms 100

Porta.3 = 1
Waitms 100

Porta.6 = 1
Waitms 100

Porta.4 = 1
Waitms 100

Porta.5 = 1
Waitms 500

'lampu 2 persatu lampu hidup
Porta.0 = 1                                                 'I
Porta.1 = 1                                                 'P
Waitms 100

Porta.2 = 1                                                 'M
Porta.3 = 1                                                 'R
Waitms 100

Porta.4 = 1                                                 'spasi
Porta.5 = 1                                                 'S 1
Waitms 100

Porta.6 = 1                                                 'U
Porta.7 = 1                                                 'M
Waitms 100

Portb.0 = 1                                                 'S 2
Portb.6 = 1                                                 'E
Waitms 100

Portb.1 = 1                                                 'L
Waitms 500


'lampu dua persatu lampu mati
Portb.1 = 0
Portb.6 = 0
Waitms 100

Portb.0 = 0
Porta.7 = 0
Waitms 100

Porta.6 = 0
Porta.5 = 0
Waitms 100

Porta.4 = 0
Porta.3 = 0
Waitms 100

Porta.2 = 0
Porta.1 = 0
Waitms 100

Porta.0 = 0
Waitms 500


'lampu hidup acak
Portb.1 = 1
Waitms 30

Porta.0 = 1
Waitms 30

Portb.6 = 1
Waitms 30

Porta.1 = 1
Waitms 30

Portb.0 = 1
Waitms 30

Porta.2 = 1
Waitms 30

Porta.7 = 1
Waitms 30

Porta.3 = 1
Waitms 30

Porta.6 = 1
Waitms 30

Porta.4 = 1
Waitms 30

Porta.5 = 1
Waitms 500

'lampu mati semua
Porta = &B00000000
Portb = &B00000000
Waitms 500

' MODE LAMPU TAHAP DUA


'lampu hidup semua
Porta = &HFF
Portb = &HFF
Waitms 200


'lampu mati semua
Porta = &B00000000
Portb = &B00000000
Waitms 200


'lampu satu persatu lampu hidup
Porta.0 = 1                                                 'I
Waitms 10

Porta.1 = 1                                                 'P
Waitms 10

Porta.2 = 1                                                 'M
Waitms 10

Porta.3 = 1                                                 'R
Waitms 10

Porta.4 = 1                                                 'spasi
Waitms 10

Porta.5 = 1                                                 'S 1
Waitms 10

Porta.6 = 1                                                 'U
Waitms 10

Porta.7 = 1                                                 'M
Waitms 10

Portb.0 = 1                                                 'S 2
Waitms 10

Portb.6 = 1                                                 'E
Waitms 10

Portb.1 = 1                                                 'L
Waitms 200


'lampu satu persatu lampu mati
Portb.1 = 0
Waitms 10

Portb.6 = 0
Waitms 10

Portb.0 = 0
Waitms 10

Porta.7 = 0
Waitms 10

Porta.6 = 0
Waitms 10

Porta.5 = 0
Waitms 10

Porta.4 = 0
Waitms 10

Porta.3 = 0
Waitms 10

Porta.2 = 0
Waitms 10

Porta.1 = 0
Waitms 10

Porta.0 = 0
Waitms 200


'lampu hidup acak
Portb.1 = 1
Waitms 10

Porta.0 = 1
Waitms 10

Portb.6 = 1
Waitms 10

Porta.1 = 1
Waitms 10

Portb.0 = 1
Waitms 10

Porta.2 = 1
Waitms 10

Porta.7 = 1
Waitms 10

Porta.3 = 1
Waitms 10

Porta.6 = 1
Waitms 10

Porta.4 = 1
Waitms 10

Porta.5 = 1
Waitms 200

'lampu 2 persatu lampu hidup
Porta.0 = 1                                                 'I
Porta.1 = 1                                                 'P
Waitms 10

Porta.2 = 1                                                 'M
Porta.3 = 1                                                 'R
Waitms 10

Porta.4 = 1                                                 'spasi
Porta.5 = 1                                                 'S 1
Waitms 10

Porta.6 = 1                                                 'U
Porta.7 = 1                                                 'M
Waitms 10

Portb.0 = 1                                                 'S 2
Portb.6 = 1                                                 'E
Waitms 10

Portb.1 = 1                                                 'L
Waitms 200


'lampu dua persatu lampu mati
Portb.1 = 0
Portb.6 = 0
Waitms 10

Portb.0 = 0
Porta.7 = 0
Waitms 10

Porta.6 = 0
Porta.5 = 0
Waitms 10

Porta.4 = 0
Porta.3 = 0
Waitms 10

Porta.2 = 0
Porta.1 = 0
Waitms 10

Porta.0 = 0
Waitms 200


'lampu hidup acak
Portb.1 = 1
Waitms 50

Porta.0 = 1
Waitms 50

Portb.6 = 1
Waitms 50

Porta.1 = 1
Waitms 50

Portb.0 = 1
Waitms 50

Porta.2 = 1
Waitms 50

Porta.7 = 1
Waitms 50

Porta.3 = 1
Waitms 50

Porta.6 = 1
Waitms 50

Porta.4 = 1
Waitms 50

Porta.5 = 1
Waitms 300

'lampu mati semua
Porta = &B00000000
Portb = &B00000000
Waitms 300

' MODE LAMPU TAHAP TIGA

'lampu hidup semua
Porta = &HFF
Portb = &HFF
Waitms 100


'lampu mati semua
Porta = &B00000000
Portb = &B00000000
Waitms 100


'lampu satu persatu lampu hidup
Porta.0 = 1                                                 'I
Waitms 50

Porta.1 = 1                                                 'P
Waitms 50

Porta.2 = 1                                                 'M
Waitms 50

Porta.3 = 1                                                 'R
Waitms 50

Porta.4 = 1                                                 'spasi
Waitms 50

Porta.5 = 1                                                 'S 1
Waitms 50

Porta.6 = 1                                                 'U
Waitms 50

Porta.7 = 1                                                 'M
Waitms 50

Portb.0 = 1                                                 'S 2
Waitms 50

Portb.6 = 1                                                 'E
Waitms 50

Portb.1 = 1                                                 'L
Waitms 100


'lampu satu persatu lampu mati
Portb.1 = 0
Waitms 50

Portb.6 = 0
Waitms 50

Portb.0 = 0
Waitms 50

Porta.7 = 0
Waitms 50

Porta.6 = 0
Waitms 50

Porta.5 = 0
Waitms 50

Porta.4 = 0
Waitms 50

Porta.3 = 0
Waitms 50

Porta.2 = 0
Waitms 50

Porta.1 = 0
Waitms 50

Porta.0 = 0
Waitms 100


'lampu hidup acak
Portb.1 = 1
Waitms 50

Porta.0 = 1
Waitms 50

Portb.6 = 1
Waitms 50

Porta.1 = 1
Waitms 50

Portb.0 = 1
Waitms 50

Porta.2 = 1
Waitms 50

Porta.7 = 1
Waitms 50

Porta.3 = 1
Waitms 50

Porta.6 = 1
Waitms 50

Porta.4 = 1
Waitms 50

Porta.5 = 1
Waitms 100

'lampu 2 persatu lampu hidup
Porta.0 = 1                                                 'I
Porta.1 = 1                                                 'P
Waitms 50

Porta.2 = 1                                                 'M
Porta.3 = 1                                                 'R
Waitms 50

Porta.4 = 1                                                 'spasi
Porta.5 = 1                                                 'S 1
Waitms 50

Porta.6 = 1                                                 'U
Porta.7 = 1                                                 'M
Waitms 50

Portb.0 = 1                                                 'S 2
Portb.6 = 1                                                 'E
Waitms 50

Portb.1 = 1                                                 'L
Waitms 100


'lampu dua persatu lampu mati
Portb.1 = 0
Portb.1 = 0
Waitms 50

Portb.0 = 0
Porta.7 = 0
Waitms 50

Porta.6 = 0
Porta.5 = 0
Waitms 50

Porta.4 = 0
Porta.3 = 0
Waitms 50

Porta.2 = 0
Porta.1 = 0
Waitms 50

Porta.0 = 0
Waitms 100


'lampu hidup acak
Portb.1 = 1
Waitms 10

Porta.0 = 1
Waitms 10

Portb.6 = 1
Waitms 10

Porta.1 = 1
Waitms 10

Portb.0 = 1
Waitms 10

Porta.2 = 1
Waitms 10

Porta.7 = 1
Waitms 10

Porta.3 = 1
Waitms 10

Porta.6 = 1
Waitms 10

Porta.4 = 1
Waitms 10

Porta.5 = 1
Waitms 100

'lampu mati semua
Porta = &B00000000
Portb = &B00000000
Waitms 100

Loop


trakhir ni contoh yang dah ane buat.,he he





Semoga bermanfaat, selamat mencoba..,n_n