Senin, 08 November 2010

Program Seven Segment

September–2009
Contoh Program LED-32
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$04;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup semua.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$0a;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup baris teratas.

● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$09;
  •  Until Keypressed
  •  End.
  • Penjelasan Program
  •  Lampu LED-32 hidup baris ke dua.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$0f;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup baris ke tiga.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$03;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup baris terbawah.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$01;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup baris ke dua dan ke empat.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$02;
  •  Until Keypressed
  •  End.
  • Penjelasan Program
  •  Lampu LED-32 hidup baris pertama dan ke empat.
  • ● ● ● ● ● ● ● ●
  • ● ● ● ● ● ● ● ●
  • ● ● ● ● ● ● ● ●
  • ● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$05;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup baris ke dua, ke tiga dan ke empat.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$06;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup baris pertama, ke tiga dan ke empat.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$07;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup baris ke tiga dan ke empat.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$00; { Rangkaian Terbalik }
  •  Port[$37a] :=$08;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup baris pertama dan ke dua.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$f8; { Rangkaian Terbalik }
  •  Port[$37a] :=$02;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup 3 LED baris Pertama dan 3 LED baris terakhir.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program LED-32
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$fd; { Rangkaian Terbalik }
  •  Port[$37a] :=$04;
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup kolom ke dua.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program Huruf I
  •  Uses crt;
  •  Begin
  •  Repeat;
  •  Port[$378] :=$F8;
  •  Port[$37a] :=$02;
  •  Delay(10);
  •  Port[$378] :=$Fd;
  •  Port[$37a] :=$04;
  •  Delay(10);
  •  Until Keypressed
  •  End.
Penjelasan Program
  •  Lampu LED-32 hidup membentuk huruf I.
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ●
  •  Program while
  •  Uses crt;
  •  var i=integer;
  •  begin
  •  clrscr;
  •  i:=0;
  •  while i<5 do  begin  writeln(‘aku’);  i:=i+1;  end;  repeat  untul keypressed;  end. Penjelasan Program  Program akan menampilkan tulisan AKU berulang.

0 komentar:

Posting Komentar