BELAJAR - MIKROKONTROLER

Berbagi Ilmu Itu Indah

Recent Posts

LightBlog
Responsive Ads Here

Selasa, 10 Agustus 2010

Menyalakan LED di P2

$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

Tidak ada komentar:

Posting Komentar