PC-Link Application Note

dokumen-dokumen yang mirip
PC-Link Application Note

PC-Link Application Note

DT-BASIC Mini System. Gambar 1 Blok Diagram AN132

PC-Link Application Note

DT-BASIC Application Note

PC-Link. Gambar 1 Blok Diagram AN201. AGND (J3 pin 1) Pin 1 VCC (J3 pin 2) Pin 3 Dapat dipilih salah satu dari A0 s.d. A7 (J3 pin 3 s.d.

PC-Link. 1x Komputer / Laptop dengan OS Windows 2000, Windows XP atau yang lebih tinggi. Gambar 1 Blok Diagram AN200

DT-IO Application Note

DT-51 Application Note

AVR Application Note AN95 Wireless Chatting with PC

SPC Application Note. SPC Blue-Link (J2) Tabel 1 Hubungan SPC Blue-Link Dengan Komputer

PC-Link Application Note

PC-Link. PC-Link. Application Note AN202

DT-Sense Current Sensor With OpAmp Gambar 1 Blok Diagram AN212

asic Application Note AN97 BASIC Chatting

PC-Link Application Note

DT-SENSE Application Note

DT-AVR Application Note

DT-AVR Application Note

DT-AVR Application Note AN191 SMS Gateway dengan GSM STARTER KIT

DT-AVR Application Note

DT-51 Application Note

DT-I/O. I/O Application Notes AN164 Komunikasi Jarak Jauh antara 2 PC dengan RS-485. Application Note AN164

DT-AVR Application Note

DT-51 Application Note

de KITS Application Note AN51 How 2 Use de KITS SPC Character LCD w/ PC

DT-51 Application Note

SureLink A. Gambar 1 Blok Diagram AN63

Gambar 1 Blok Diagram AN190. P1.0 (J3 pin 3) IN1 (J1 pin3) Tabel 1 Hubungan antar PC-Link Serial PPI dan DT-I/O Quad Relay Board12V

de KITS Application Note AN20 - How 2 Use de KITS SPC Alphanumeric Display with StarTech PPI Card

DT-SENSE Application Note AN168 Color Game. Gambar 1 Blok Diagram AN168

DT-AVR. Application Note AN214

DT-BASIC Application Note

DT-51Application Note

DT-PROTO Application Note AN219 Kontrol Lampu Secara Nirkabel berbasiskan Smarphone Android dan

DT-51 Application Note

DT-BASIC Application Note

DT-AVR Application Note

DT-AVR DT-AVR ApplicationNote

DT-51 Application Note

DT-AVR Application Note

DT-51 Application Note

WIZnet. Application Note AN179 Wireless IP Printer 2 Oleh : Tim IE

DT Series Application Note

DT-AVR Application Note. AN186 Digital Compass

DT-51 Application Note

DHT11 Temperature and Humidity Sensor Board Gambar 1 Blok Diagram AN196. 5V (Power) GND (Power)

DT-51 Application Note

DT-AVR Application Note

GPS Starter Kit Application Note AN GPS - GPS Navigator. Oleh: Tim IE

SPC Application Note

DT-AVR. AVR Application Note AN160 Graphic LCD Dengan Bahasa C. Application Note AN160

DT-AVR Low Cost Micro System. Gambar 1 Blok Diagram AN154. RXD (J13 Pin 3) TXD (J8 Pin 4) GND (J10/J11/J12/J13 Pin 1) GND (J7/J8 Pin 1)

Akses SD Card & FRAM Menggunakan MCS-51. Oleh: Tim IE

de KITS Application Note AN30 Rotating Display with DT-51 MinSys & de KITS SPC DC Motor

Application Note. Adapun blok diagram secara keseluruhan adalah sebagai berikut: AN156 Touch Screen Panel Graphic LCD 320 x 240

de KITS Application Note AN17 - How 2 Use de KITS Relay Board with StarTech PPI Card

Gambar 1 Blok Diagram AN190. P1.0 (J3 pin 3) IN1 (J1 pin3) Tabel 1 Hubungan antar PC-Link Serial PPI dan DT-I/O Quad Relay Board12V

EMS Application Note. 1x Kabel USB 1x Komputer (Memiliki wireless adapter, serta wireless network melalui router atau program Connectify)

DT-AVR Application Note

DT-51 Application Note

DT-AVR Application Note

DT-AVR Application Note

DT-51 Application Note

DT-I/O DT-I/O. Application Note AN171

de KITS Application Note AN18 - How 2 Use de KITS SPC Stepper Motor with StarTech PPI Card

DT-ARM Application Note. AN221 Web Server I/O Remote

DT-I/O. Application Note AN211. Komunikasi data saat ini terus dikembangkan dan diimplementasikan di dalam setiap bidang, seperti proses

DT-AVR. Application Note AN213

DT-SENSE Application Note

de KITS Application Note AN9-8 Channel Temperature Display

DT-I/O. DT-I/O Application Note

DT-51 Application Note

DT-AVR Application Note

Gambar 1 Blok Diagram AN72. (a) (b) (c) Gambar 2 SPC Seven Segment (a), DT-51 Low Cost Micro System (b), dan DT-51 Low Cost Nano System (c)

WIZnet. Application Note AN178 Wireless IP Printer 1 Oleh : Tim IE

BAB III PERANCANGAN ALAT

de KITS Application Note AN44 - Morse Code Generator

DT-Sense Application Note

DT-AVR Application Note

DT-AVR. DT-AVR Application Note AN207 Library USB Controller untuk Komunikasi Serial pada DT-AVR Inoduino

BAB IV PENERAPAN DAN ANALISA

de KITS Application Note AN19 - How 2 Use de KITS SPC DC Motor with StarTech PPI Card

a b c Gambar 1 DT-BASIC Nano System (a), DT-BASIC Micro System (b), DT-BASIC Mini System (c), de KITS Phone Interface ver 2.0 (d)

Starter Kit Application Note AN165 - Update Tampilan Character LCD Berbasis USB Flash Disk

BAB III ANALISIS DAN PERANCANGAN

Antarmuka PC Keyboard dengan DST-AVR

Akses SD Card & FRAM Menggunakan AVR. Oleh: Tim IE

STARTER KIT Application Note AN162 Web Scrapping Dengan GSM STARTER KIT

SPC SPC. SPC Application Note AN175 Bluetooth Mobile Robot. Application Note AN175

BAB III DESKRIPSI MASALAH

AVR Application Note AN187 Monitoring Suhu Nirkabel (Bahasa C)

How2Use DT-51 AT89C51XXX BMS. Oleh: Tim IE. Gambar 1 Tata Letak DT-51 AT89C51XXX BMS

DT-AVR Low Cost Nano System. Gambar 1 Blok Diagram Remote TV Berbasis ATtiny2313. DT-I/O I/O Logic Tester

DT-SENSE Application Note

SPC Application Note. SPC IR Transceiver. Gambar 1 Blok Diagram AN159. RX (PORTD.0 J13 pin3 / J4 pin2)

DT-BASIC Application Note

de KITS Application Note AN34 Jam Pasir Digital

Apllication Note AN155 Mini Reklame pada Graphic LCD 320 x 240

de KITS Application Note AN45 Type Another Way

Transkripsi:

PC-Link Application Note AN109 Password Keypad Oleh: Tim IE Artikel berikut akan memberikan contoh penggunaan input dan output pada PC-Link Serial PPI dengan memanfaatkan perintah byte transfer untuk membaca keypad matriks 4x4. Adapun hasil pembacaan keypad tersebut akan digunakan sebagai masukan password dalam sebuah aplikasi komputer sederhana. Aplikasi komputer ini dikembangkan menggunakan Borland Delphi 5.0 serta dibantu dengan komponen komunikasi serial ComPort Library versi 2.64. Aplikasi ini memerlukan modul-modul: - 1 PC-Link Serial PPI, - 1 DT-I/O 4x4 Keypad Module. Adapun blok diagram sistem secara keseluruhan adalah sebagai berikut: Komputer PC-Link Serial PPI DT-I/O 4x4 Keypad Module Gambar 1 Blok Diagram AN109 Hubungan antara modul-modul tersebut adalah sebagai berikut: PC-Link Serial PPI (J3) VCC P1.0* P1.1* P1.2* P1.3* P2.0* P2.1* P2.2* P2.3* DT-I/O 4x4 Keypad Module (J3) VCC C1 C2 C3 C4 R1 R2 R3 R4 Tabel 1 Hubungan PC-Link Serial PPI dengan DT-I/O 4x4 Keypad Module Hubungkan DT-I/O 4x4 Keypad Module ke PC-Link Serial PPI sesuai dengan Tabel 1, pin I/O yang bertanda * dapat diganti dengan pin I/O lainnya tetapi tentunya juga harus mengubah program. Setelah itu, hubungkan PC- Link Serial PPI ke port serial komputer dan berilah catu daya DC 9 12 Volt pada terminal J2 (VIN) PC-Link Serial PPI. Kemudian jalankan program aplikasi PassKeypad.exe pada komputer. Page 1 of 1

Flowchart dari event penekanan tombol Connect / Disconnect pada program PassKeypad.exe adalah sebagai berikut: Tombol Connect Port serial terbuka? Port serial ditutup Tulisan pada tombol = Connect Port serial dibuka Tulisan pada tombol = Disconnect Run End Gambar 2 Flowchart dari Event Penekanan Tombol Connect / Disconnect Cara kerja rutin yang menangani event penekanan tombol Connect / Disconnect secara garis besar adalah sebagai berikut: 1. Program akan memeriksa apakah port serial komputer dalam keadaan terbuka. 2. Jika port serial komputer dalam keadaan terbuka maka port serial komputer akan ditutup, lalu program mengubah tulisan pada tombol menjadi Connect dan mengubah label status port serial komputer menjadi COMx Disconnected. 3. Jika port serial komputer dalam keadaan tertutup maka port serial komputer akan dibuka, lalu program mengubah tulisan pada tombol menjadi Disconnect dan mengubah label status port serial komputer menjadi COMx Connected. Page 2 of 2

Flowchart dari rutin Run pada program PassKeypad.exe adalah sebagai berikut: Run Deklarasi variabel i = 1 Port serial terhubung? Return I > 4? i = 1 label lblout = password? Lakukan scan keypad baris ke-i Ambil data kolom ( = intinput ) Nolkan 4 bit MSB dari intinput label lblout dihapus Tampilkan pesan Password Accepted label lblout dihapus Tampilkan pesan Wrong Password Terjemahkan data kolom (intinput) menjadi kode tombol dan simpan dalam variabel int Tutup port serial Return Terjadi penekanan tombol? Tombol = enter? Tambahkan variabel int ke dalam tampilan label lblout i = i + 1 Gambar 3 Flowchart Rutin Run Page 3 of 3

Cara kerja rutin Run pada program PassKeypad.exe secara garis besar adalah sebagai berikut: 1. Pertama program melakukan deklarasi variabel dan melakukan inisialisasi nilai awal dari masing-masing variabel tersebut. Beberapa variabel utama antara lain: a. intinput, digunakan untuk menampung hasil pembacaan data kolom keypad. b. i, digunakan sebagai indeks baris yang akan dibaca. Variabel ini diberi nilai awal 1. c. int, digunakan untuk menampung hasil pembacaan keypad yang sudah diterjemahkan menjadi nilai desimal 0 ~ 14. Variabel ini diberi nilai awal 0. 2. Program memeriksa apakah port serial dalam keadaan terbuka. Jika port serial dalam keadaan tertutup maka rutin selesai. Sedangkan jika port serial dalam keadaan terbuka maka rutin akan mulai melakukan scanning baris demi baris untuk membaca penekanan tombol pada keypad. 3. Program memeriksa nilai variabel i, jika lebih besar dari 4 maka i diberi nilai 1. 4. Program mengeluarkan kode scanning 1110 (baris 1), 1101 (baris 2), 1011 (baris 3), atau 0111 (baris 4) pada port 2 sesuai dengan nilai indeks i saat ini. 5. Kemudian program mengambil data kolom yang diterima dari port 1, diambil hanya 4 bit LSB-nya saja dan disimpan dalam variabel intinput. 6. Program menerjemahkan tombol yang ditekan berdasarkan indeks baris (variabel i) dan data kolom (variabel intinput). Data tombol yang sudah diterjemahkan disimpan dalam variabel int, jika tidak ada tombol yang ditekan maka variabel int diberi nilai 0Fh. 7. Jika variabel int tidak sama dengan 0Fh maka program akan mengartikan data tombol tersebut. Jika variabel int sama dengan 0Fh maka program meneruskan ke langkah 10. 8. Jika tombol yang ditekan adalah enter maka program akan memeriksa apakah isi label lblout sama/sesuai dengan password yang telah ditentukan (default password yang digunakan adalah 123 ). Jika label lblout sama dengan 123 maka program akan menampilkan pesan Password Accepted, tetapi jika tidak sama maka program akan menampilkan pesan Wrong Password. Setelah itu program menutup port serial dan rutin selesai. 9. Jika tombol yang ditekan bukan enter maka program menambahkan data tombol tersebut (variabel int) ke tampilan label lblout. Konfigurasi tombol terdapat pada Gambar 5. 10. Kemudian program menambah nilai variabel i dengan 1 dan kembali ke langkah 3. Tombol untuk menyambung/memutus komunikasi serial komputer dengan PC-Link Serial PPI Label yang menampilkan status dari komunikasi serial komputer Tombol untuk membuka jendela pengaturan komunikasi serial komputer Label yang menampilkan input password yang diterima dari keypad Gambar 4 Tampilan Program PassKeypad.exe Page 4 of 4

1 2 3 a 4 5 6 b 7 8 9 c Del all 0 enter d Gambar 5 Konfigurasi Tombol Keypad Listing program terdapat pada AN109.ZIP. Selamat berinovasi! Borland Delphi 5.0 is copyright by Inprise Corporation. ComPort Library version 2.64 is created by Dejan Crnila. Page 5 of 5