Minggu, 12 Desember 2010

Aplikasi Shift Register Untuk Penampil Seven Segmen

Komponen
  • 2 buah IC 4094
  • 2 buah seven Segmen
  • Mikrokontroler
Rangkaian




























Program:

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

Config Portb.0 = Output
Config Portb.1 = Output
Config Portb.2 = Output

Datain Alias Portb.0
Clock Alias Portb.1
Strobe Alias Portb.2

Dim Kodesat As Byte , Npul As Integer , Nsat As Integer , Kodepul As Byte

Mulai:
Npul = 3
Nsat = 0

Do
Gosub Tampil
  If Nsat = 0 Then
  Nsat = 9
  Decr Npul
  End If

  If Npul = 0 And Nsat = 0 Then
  Goto Mulai
  End If
Gosub Tampil
Decr Nsat
Loop

Tampil:
Reset Strobe
Kodesat = Lookup(nsat , Kode)
Kodepul = Lookup(npul , Kode)
Shiftout Datain , Clock , Kodesat , 1
Shiftout Datain , Clock , Kodepul , 1
Waitms 500
Set Strobe
Return

Kode:
Data &H40 , &H79 , &H24 , &H30 , &H19 , &H12 , &H02 , &H78 , &H00 , &H10

Download Link:
Simulasi Proteus --- klik disini
program ----------- klik disini

wasalam

    4 komentar:

    1. Postingan yang bermanfaat, masnya kuliah dimana mas?

      BalasHapus
    2. Alhamdulillah, Sebenarnya sih dah lulus tapi belum kerja, hehehe masih nganggur. Daripada nganggur mending blogging.

      BalasHapus
    3. mas link bwt donlot programnya udah gak valid postingan yg edisi ini sangat bermanfaat terima kasih mas

      BalasHapus
    4. As reported by Stanford Medical, It is indeed the ONLY reason women in this country live 10 years more and weigh 42 lbs lighter than us.

      (And actually, it has NOTHING to do with genetics or some secret exercise and really, EVERYTHING to do with "HOW" they eat.)

      P.S, What I said is "HOW", not "what"...

      TAP on this link to discover if this quick test can help you release your true weight loss possibility

      BalasHapus