; ======;
Judul: Program Output Motor DC;
Port : Port0 => CONTROL MOTOR DC;
Port1 => -;
Port2 => -;
Port3 =>
P3.0,
P3.1;
Ket : MOTOR DC berputar CW dan CCW bergantian;
-------------; By : ARC Robotika Club;
================$
MOD51
ORG 0000H AJMP
START
ORG
0100H
MOV
P0,
#0H
DELAY: MOV R5,
#08HDEL1:
MOV R6,
#0FFHDEL2:
MOV R7,
#0FFH DJNZ R7,
$ DJNZ R6,
DEL2 DJNZ R5,
DEL1 RETSTART:LOOP:
MOV P0,
#0 CALL CW CALL CCW SJMP LOOP
ENDCW:
CLR P3.0 ;
read switch1 CALL DELAY
SETB P0.0
CALL DELAY
CLR P0.0
CALL DELAY RET
CCW: CLR
P3.1 ; read switch2
CALL DELAY
SETB P0.1
CALL DELAY
CLR P0.1
CALL DELAY
RET
Pemrograman Assembly - MOTOR DC berputar CW dan CCW bergantian
Add Comments
8/06/2016
comment 0 komentar
more_vert