1
Pertemuan 3 & 4Interface Mikroprosesor
secara Paralel
Matakuliah : H0194/ Aplikasi Mikroprosesor dan Interfacing
Tahun : 2005
Versi : <<versi/revisi>>
2
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Menjelaskan interface mikroprosesor secara parallel
3
Outline Materi
• Komunikasi Paralel
• Paralel Port Interface
• Programmable Peripheral Interface
4
Komunikasi Paralel
• Pengertian komunikasi paralel
• Metode komunikasi paralel
DATA
STB
STB
ACK
DATA
STB
ACK
DATA
(a)
DATA
(b)
(c)
(d)
5
Paralel Port Interface
• Pengenalan Paralel Port
• Mode Operasi pada Standard Paralel Port:– Compatibility Mode– Nibble Mode– Byte Mode– EPP Mode– ECP Mode
6
Paralel Port Interface
• Standard Paralel Port (SPP)
• Transfer Rate: 50 – 150 KB/s
STROBE
DATA[7:0]
BUSY
ACKNLG
PE
SLCT
AUTO FEED XT
ERROR
PrinterMicrocomputer
INIT
SLCT IN
GND
7
Paralel Port Interface
• SPP Centronics Handshake
• SPP Port Address
• SPP Software Registers
8
Paralel Port Interface
• Enhanced Paralel Port (EPP)
• Transfer Rate: 500KB/S – 2MB/s
9
Paralel Port Interface
• EPP Handshake– Data write cycle– Address write cycle– Data read cycle– Address read cycle
• EPP Software Registers
• http://www.beyondlogic.org/epp/epp.htm
10
Paralel Port Interface
• Extended Capabilities Port (ECP)
• DMA Enabled
• FIFO• Run Length
Encoding (RLE)
11
Paralel Port Interface
• ECP Handshake– ECP Forward Data Cycle– ECP Forward Command Cycle– ECP Reverse Data Cycle– ECP Reverse Command Cycle
• ECP Run Length Encoding (RLE)• ECP Software Registers
– ECP Extended Control Register (ECR)– ECP Configuration Register A– ECP Configuration Register B
• http://www.beyondlogic.org/ecp/ecp.htm
12
Programmable Peripheral Interface
• PPI 8255• Programmable I/O Device• Spesifikasi:
– Memiliki 3 Port 8-bit• Port A• Port B• Port C
– Memiliki 3 Mode Operasi• Mode 0 (Basic I/O)• Mode 1 (Strobed I/O)• Mode 3 (Bidirectional I/O)
13
Programmable Peripheral Interface
• Blok Diagram– Group A
• Port A[7:0]• Port C[7:4]
– Group B• Port B[7:0]• Port C[3:0]
14
Programmable Peripheral Interface
• Alamat dan control pada PPI 8255
15
Programmable Peripheral Interface
• Control Word untuk mode operasi
Control Group A
Control Group B
Port C ( low order 4 bit )1 = input
0 = outputPort B
1 = Input0 = Output
Select Mode0 = mode 01 = mode 1
Port C ( high order 4 bit )1 = input
0 = outputPort A
1 = Input0 = Output
Select Mode00 = mode 001 = mode 110 = mode 21x = mode 3
Mode flag setting1 = enable
D7 D6 D5 D4 D3 D2 D1 D0
16
Programmable Peripheral Interface
• Control Word untuk set/reset port C
17
Programmable Peripheral Interface
• PPI 8255 Mode 0:
• Tidak ada fasilitas handshaking
• Masing-masing port hanya dapat dioperasikan sebagai input atau output saja
• Tersedia latch untuk output
18
Programmable Peripheral Interface
• PPI 8255 Mode 1 (Strobed Input):
Sebagian pin Port C digunakan untuk , IBF, dan INTRSTB
19
Programmable Peripheral Interface
• PPI 8255 Mode 1 (Strobed Output):
Sebagian pin Port C digunakan untuk , IBF, dan INTRSTB
20
Programmable Peripheral Interface
• PPI 8255 Mode 2 (Strobed Bidirectional):
INTR
WR
OBF
ACK
STB
IBF
INTR
RD
RD WRData Bus