PINTU GARASI OTOMATIS DENGAN TOMBOL
Kelompok : D3
Kelas : EK2D
Nama anggota :
1. Aditya Wahyu Pamungkas (3.32.19.3.01)
2. Calvin Maulana Pratama (3.32.19.3.07)
3. Fathur Rohman (3.32.19.3.10)
4. Karisma Nadila Danastri (3.32.19.3.13)
- Input : Push Button
- Output : LED, Motor DC
ORG 0000H
START:
MOVP2,#11111111B
MOVP0,#11111111B
MAIN :
JNB P2.0 ,KANAN
JNB P2.1 ,KIRI
SJMP MAIN
KANAN :
CLR P0.1
ACALL DELAY
setb P0.1
CLR P0.2
SETB P0.7
ACALL DELAY
clr P0.1
CLR P0.3
SETB P0.2
ACALL DELAY
setb P0.1
CLR P0.4
SETB P0.3
ACALL DELAY
clr P0.1
CLR P0.5
SETB P0.4
ACALL DELAY
setb P0.1
CLR P0.6
SETB P0.5
ACALL DELAY
clr P0.1
CLR P0.7
SETB P0.6
ACALL DELAY
SJMP stop
KIRI :
CLR P0.0
ACALL DELAY
SETB P0.0
SETB P0.2
CLR P0.7
ACALL DELAY
clr P0.0
SETB P0.7
CLR P0.6
ACALL DELAY
SETB P0.0
SETB P0.6
CLR P0.5
ACALL DELAY
clr P0.0
SETB P0.5
CLR P0.4
ACALL DELAY
SETB P0.0
SETB P0.4
CLR P0.3
ACALL DELAY
clr P0.0
SETB P0.3
CLR P0.2
ACALL DELAY
setb p0.0
SJMP stop
STOP:
SETB P0.1
SETB P0.0
JMP MAIN
DELAY: MOVR0,#0FFH
DELAY1: MOVR1,#200
DELAY2:
JNB P2.2 ,STOP
DJNZ R1,DELAY2
DJNZ R0,DELAY1
RET
END
0 Response to "PINTU GARASI OTOMATIS DENGAN TOMBOL"
Posting Komentar