Tutorial Top View Simulator
Buka top simulator� Select device 89c52
� Frequency 12 Mhz ----> OK
� File --> External module setting --> LED
LATIHAN :
KEDIP KEDIP TOP VIEW SIMULATOR MENAMPILKAN 1039
$mod51
org 0h
start:
mov p0,#10000110b
mov p1,#00000000b
mov p2,#00000000b
mov p3,#00000000b
call delay
mov p0,#10000110b
mov p1,#10111111b
mov p2,#00000000b
mov p3,#00000000b
call delay
sjmp satu
satu:
mov p0,#10000110b
mov p1,#10111111b
mov p2,#11001111b
mov p3,#00000000b
call tunggu
mov p0,#10000110b
mov p1,#10111111b
mov p2,#11001111b
mov p3,#11101111b
call delay
sjmp start
delay:mov R1,#250
delay1:mov R2,#250
delay2:mov R3,#210
delay3:DJNZ R3,delay3
DJNZ R2,delay2
DJNZ R1,delay1
ret
tunggu:mov R1,#250
tunggu1:mov R2,#250
tunggu2:mov R3,#210
tunggu3:DJNZ R3,tunggu3
DJNZ R2,tunggu2
DJNZ R1,tunggu1
ret
end
Tidak ada komentar:
Posting Komentar