; ==========
; Judul: Program Output LED
; Port: Port0 => DISPLAY LED
; Port1 => -
; Port2 => -
; Port3 => -
; Ket: LED menyala satu bergeser ke kiri
; -----------------
; By: ARC Robotika Club
; =========
$MOD51
ORG 0000H
AJMP START
ORG 0100H
DELAY: MOV R5, #04H
DEL1: MOV R6, #0FFH
DEL2: MOV R7, #0FFH
DJNZ R7, $
DJNZ R6, DEL2
DJNZ R5, DEL1
RET
START:
MOV SP, #30H
LOOP:
MOV P0, #11111111B
ACALL DELAY
MOV P0, #00000000B
ACALL DELAY
MOV P0, #00000001B
ACALL DELAY
MOV P0, #00000010B
ACALL DELAY
MOV P0, #00000100B
ACALL DELAY
MOV P0, #00001000B
ACALL DELAY
MOV P0, #00010000B
ACALL DELAY
MOV P0, #00100000B
ACALL DELAY
MOV P0, #01000000B
ACALL DELAY
MOV P0, #10000000B
ACALL DELAY
SJMP LOOP
END
Pemrograman Assembly - Program Pengatur Roda berputar dengan kecepatan berbeda
Add Comments
8/06/2016
comment 0 komentar
more_vert