RSS

>Menyalakan LED di P2

10 Agu

>$mod51
org 0h
start: mov P2,#11111110b
call delay
mov P2,#11111101b
call delay
mov P2,#11111011b
call delay
mov P2,#11110111b
call delay
mov P2,#11101111b
call delay
mov P2,#11011111b
call delay
mov P2,#10111111b
call delay
mov P2,#01111111b
call delay
sjmp start

delay: mov r0,#5
del1: mov r1,#200
del2: mov r2,#100
djnz r2,$
djnz r1,del2
djnz r0,del1
ret
end

 
Tinggalkan komentar

Ditulis oleh pada Selasa, Agustus 10, 2010 in Uncategorized

 

Jangan Lupa Tinggalkan Komentar Anda !

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

 
%d blogger menyukai ini: