1 / 18

Input / Output (I/O)

Input / Output (I/O). Kuliah 11 TKE 321 R. Arief Setyawan, ST. MT. Input/Output. Input/Output pada mikroprosesor berfungsi untuk berkomunikasi dengan piranti lain diluar mikroprosesor. Komponen I/O dapat berupa timer, ADC, DAC, PPI dan lain-lain.

mason-cook
Download Presentation

Input / Output (I/O)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Input / Output (I/O) Kuliah 11 TKE 321 R. Arief Setyawan, ST. MT.

  2. Input/Output • Input/Output pada mikroprosesor berfungsi untuk berkomunikasi dengan piranti lain diluar mikroprosesor. • Komponen I/O dapat berupa timer, ADC, DAC, PPI dan lain-lain. • Salah satu contoh yang sering digunakan sebagai I/O pada sistem mikroprosesor adalah PPI (Programmable Peripheral Interface) 8255

  3. PPI • Terdiri dari 3 port A,B,C • Masing-masing port terdiri dari 8 bit • PA0 – PA7 • PB0 – PB7 • PC0 – PC7 • Fungsi masing-masing port dapat diprogram sebagai input/output. • Bus Data : D0 – D7 • Bus Alamat : A0,A1 • Bus kontrol : CS,RD,WR

  4. Karena memiliki 2 bit bus alamat, maka PPI memiliki 4 buat alamat. • 4 alamat tersebut berfungsi sebagai berikut :

  5. Catatan • Lebar bus alamat suatu mikroprosesor untuk akses memory dan I/O biasanya berbeda. Jika bus alamat memory dapat selebar 16 bit atau lebih, bus alamat untuk I/O biasanya dibatasi selebar 10 bit. • Untuk mikroprosesor 8085, 8088, dll. Pada umumnya bus alat untuk I/O adalah sebesar 10bit. Sehingga alokasi alamat untuk I/O adalah 000 H sampai 3FFH.

  6. Soal • Buat rangkaian mikroprosesor – PPI, dengan memetakan PPI pada alamat 300H.

  7. Jawaban • Alamat : 300H Ke Address Dekoder Ke PPI

  8. Hubungan Dengan PPI • Alamat : 300H Dari Latch Dari Mikroprosesor

  9. Rangkaian Mikroprosesor - Memory Memory Microprocessor D0 . . . . D7 AD0 . . . . AD7 Latch A0 A1 Address Dekoder CS LE A8 A9 ALE IO/Memory Dekoder I/O w IO/M WR WR I/O r RD RD

  10. Control World • Berfungsi untuk mengatur fungsi keseluruhan port yang digunakan. • Misal untuk mengatur port A sebagai Input, port B output, port C output dll.

  11. Fungsi masing2 bit control world

  12. Mode pada PPI • Mode 0 • Basic Input Output • Mode 1 • Strobe Input Output • Mode 2 • Bi Directional Bus

  13. Contoh : • Inisialisasi PPI untuk konfigurasi sebagai berikut : • Port A : input • Port B : Output • Port C : Output • Mode : 0

  14. Berdasarkan data sheet dapat ditentukan control work sebagai berikut : • Dalam hex :90H

  15. Penggunaan PPI • Sebelum PPI dapat digunakan, langkah awal yang harus dilakukan adalah inisialisasi port melalui control world. • Seperti contoh, control word merupakan alamat saat A0 dan A1 = 11. maka jika alamat awal ppi 300H maka alamat control world adalah 303H.

  16. Menggunakan PPI • Untuk menginisialisasi PPI, dilakukan pemrograman assembler sbb: • Mov A,80H -> A = 80H • Movx 303H,A -> alamat 303H = A • Untuk mengeluarkan data FFH pada port B: • Mov A,0FFH -> A = FFH • Movx 301H,A -> 301H = A

  17. Tugas 1 • Buat rangkaian mikroprosesor 8085 dengan memory 64k pada alamat 0000H dan PPI pada alamat 200H.

  18. Kita lanjutkan pada pertemuan berikutnya

More Related