LAPORAN PRAKTEK 8 Membuat Kendali 4 Motor DC untuk Berjalan & Mati Secara Berurutan
- Tujuan:
A.Setelah siswa praktek diharapkan dapat :- Melakukan pemrograman mikrokontroler dengan bahasa Basic (Bascom)
- Membuat rangkaian pengendali 4 Motor DC untuk Berjalan & Mati Secara Berurutan
- Menguji coba rangkaian dengan benar
- Alat & Bahan :
A.Alat :- Komputer dengan simulator Proteus
- Gambar rencana kerja
- Rencana program
B.Bahan :- IC AT89C51
- LCD LM044L
- Dioda
- Transistor 2N2219
- Button
- LED BLUE
- LED RED
- LED GREEN
- LED YELLOW
- Resistor 1K
- Motor DC
- Relay
- RESPACK-8
- Keselamatan Kerja
- Berdo'a sebelum melakukan praktik
- Tidak boleh bersendau gurau saat pelaksanaan praktik
- Menghidupkan & mematikan komputer dengan prosuder yang benar
- Instruksi Kerja
- Memastikan alat & bahan siap digunakan
- Memastikan telah memahami gambar kerja & source code program
- Menulis source program dengan Bascom 89s51
- Membuat rangkaian simulator rangkaian dengan Proteus
- Membuat complier kode program untuk mendapatkan file #HEX
- Melakukan uji coba rangkaian simulator
- Gambar
- Source Code
$regfile = "reg51.dat" $crystal = 12000000 Config Lcdpin = Pin , Db4 = P0.4 , Db5 = P0.5 , Db6 = P0.6 ,Db7 = P0.7 , E = P0.1 , Rs = P0.0 Config Lcd = 20 * 4 Cursor Off P2 = 128 P3 = 255 P1 = 0 Locate 1 , 1 Lcd "PENGENDALI MOTOR DC" Locate 2 , 1 Lcd " DENGAN AT89S51" Wait 2 Locate 1 , 1 Lcd "TEK.OTOMASI INDUSTRI " Locate 2 , 1 Lcd " SMK BINAWIYATA SRG " Wait 3 Locate 3 , 1 Lcd " .:: MOTOR READY ::. " Do 'Star Motor 1 If P3.0 = 0 And P2 = 128 Then P1 = 1 P2 = 1 Locate 1 , 1 Lcd " PENGENDALI MOTOR DC " Locate 2 , 1 Lcd "--------------------" Locate 3 , 2 Lcd "M1 :((=))" Locate 3 , 12 Lcd "M2 : 0 " Locate 4 , 2 Lcd "M3 : 0 " Locate 4 , 12 Lcd "M4 : 0 " End If 'Star Motor 2 If P3.1 = 0 And P1 = 1 Then P1 = 3 P2 = 3 Locate 1 , 1 Lcd " PENGENDALI MOTOR DC " Locate 2 , 1 Lcd "--------------------" Locate 3 , 2 Lcd "M1 :((=))" Locate 3 , 12 Lcd "M2 :((=))" Locate 4 , 2 Lcd "M3 : 0 " Locate 4 , 12 Lcd "M4 : 0 " End If 'Star Motor 3 If P3.2 = 0 And P1 = 3 Then P1 = 7 P2 = 7 Locate 1 , 1 Lcd " PENGENDALI MOTOR DC " Locate 2 , 1 Lcd "--------------------" Locate 3 , 2 Lcd "M1 :((=))" Locate 3 , 12 Lcd "M2 :((=))" Locate 4 , 2 Lcd "M3 :((=))" Locate 4 , 12 Lcd "M4 : 0 " End If 'Star Motor 4 If P3.3 = 0 And P1 = 7 Then P1 = 15 P2 = 15 Locate 1 , 1 Lcd " PENGENDALI MOTOR DC " Locate 2 , 1 Lcd "--------------------" Locate 3 , 2 Lcd "M1 :((=))" Locate 3 , 12 Lcd "M2 :((=))" Locate 4 , 2 Lcd "M3 :((=))" Locate 4 , 12 Lcd "M4 :((=))" End If 'Stop Motor 4 If P3.7 = 0 And P1 = 15 Then P1 = 7 P2 = 7 Locate 1 , 1 Lcd " PENGENDALI MOTOR DC " Locate 2 , 1 Lcd "--------------------" Locate 3 , 2 Lcd "M1 :((=))" Locate 3 , 12 Lcd "M2 :((=))" Locate 4 , 2 Lcd "M3 :((=))" Locate 4 , 12 Lcd "M4 : 0" End If 'Stop Motor 3 If P3.6 = 0 And P1 = 7 Then P1 = 3 P2 = 3 Locate 1 , 1 Lcd " PENGENDALI MOTOR DC " Locate 2 , 1 Lcd "--------------------" Locate 3 , 2 Lcd "M1 :((=))" Locate 3 , 12 Lcd "M2 :((=))" Locate 4 , 2 Lcd "M3 : 0 " Locate 4 , 12 Lcd "M4 : 0 " End If 'Stop Motor 2 If P3.5 = 0 And P1 = 3 Then P1 = 1 P2 = 1 Locate 1 , 1 Lcd " PENGENDALI MOTOR DC " Locate 2 , 1 Lcd "--------------------" Locate 3 , 2 Lcd "M1 :((=))" Locate 3 , 12 Lcd "M2 : 0 " Locate 4 , 2 Lcd "M3 : 0 " Locate 4 , 12 Lcd "M4 : 0 " End If 'Stop Motor 1 If P3.4 = 0 And P1 = 1 Then P1 = 0 P2 = 128 Locate 1 , 1 Lcd " PENGENDALI MOTOR DC " Locate 2 , 1 Lcd "--------------------" Locate 3 , 2 Lcd "M1 : 0 " Locate 3 , 12 Lcd "M2 : 0 " Locate 4 , 2 Lcd "M3 : 0 " Locate 4 , 12 Lcd "M4 : 0 " End If Loop
- Kesimpulan
Dalam membuat rangkaian maupun pemrograman mikrokontroler,harus benar-benar paham/mengerti
teori yang di berikan oleh instruktur,setelah sudah memahaminya,mulai memraktekannya dengan kete-
litian & kesabaran.
INTRUKTUR NAMA SISWA ( Suparno,Spd. ) ( Rabindreas ,P )
No comments:
Post a Comment