Koding Membuat Topview Simolator Lampu LED Dasar
Sebenarnya ini adalah tugas dalam perkuliahan yang sengaja saya upload untuk membantu teman-teman yang belum menyelesaikan tugas ini.
1
. $mod51
Org 0h
Start:
Mov p1,#10100111b
Mov p2,#00011101b
Mov p3,#01111101b
Ret
End
Biner berdasarkan NPM |
2
$mod51
Org 0h
Start: Mov P0,#11111111b;
Call Delay ;
Mov P0,#00000000b ;
Call Delay ;
Sjmp start
;
Delay:
mov R1,#255
Del1:
mov R2,#255
Del2:
djnz R2,del2
djnz R1,del1
ret
end
3
$mod51
Org 0h
Start: Mov P0,#11111111b;
Call Delay ;
Mov P0,#00000000b ;
Call Delay ;
Sjmp start
;
Delay:
mov R1,#255
Del1:
mov R2,#255
Del2:
mov R3,#10
Del3:
djnz R3,del3
djnz R2,del2
djnz R1,del1
ret
end
4
$mod51
Org 0h
Start: Mov P0,#10100111b;
Call Delay ;
Mov P0,#00011101b ;
Call Delay ;
Mov P0,#01111101b ;
Call Delay ;
Sjmp start
;
Delay:
mov R1,#255
Del1:
mov R2,#255
Del2:
mov R3,#10
Del3:
djnz R3,del3
djnz R2,del2
djnz R1,del1
ret
end
5
$mod51
Org 0h
Start: Mov P0,#01111111b;
Call Delay ;
Mov P0,#00111111b ;
Call Delay ;
Mov P0,#00011111b ;
Call Delay ;
Mov P0,#00001111b ;
Call Delay ;
Mov P0,#00000111b ;
Call Delay ;
Mov P0,#00000011b ;
Call Delay ;
Mov P0,#01111101b ;
Call Delay ;
Mov P0,#11111110b ;
Call Delay ;
Mov P0,#00111100b ;
Call Delay ;
Mov P0,#11111000b ;
Call Delay ;
Mov P0,#11110000b ;
Call Delay ;
Mov P0,#11100000b ;
Call Delay ;
Mov P0,#11000000b ;
Call Delay ;
Mov P0,#10000000b ;
Call Delay ;
Mov P1,#11110000b ;
Call Delay ;
Mov P1,#00001111b ;
Call Delay ;
Mov P1,#00111100b ;
Call Delay ;
Mov P2,#00111111b ;
Call Delay ;
Mov P2,#00011111b ;
Call Delay ;
Mov P2,#00001111b ;
Call Delay ;
Mov P2,#00000111b ;
Call Delay ;
Mov P2,#00000011b ;
Call Delay ;
Mov P2,#01111101b ;
Call Delay ;
Mov P2,#11111110b ;
Call Delay ;
Mov P3,#00111111b ;
Call Delay ;
Mov P3,#11111100b ;
Call Delay ;
Sjmp start
;
Delay:
mov R1,#255
Del1:
mov R2,#255
Del2:
mov R3,#5
Del3:
djnz R3,del3
djnz R2,del2
djnz R1,del1
ret
end
Biner berdasarkan karya kami |
Silahkan anda coba !!!