19
PROGRAMMABLE PERIPHERAL PROGRAMMABLE PERIPHERAL INTERFACE -8255 INTERFACE -8255 Features: Features: It is a programmable device. It is a programmable device. It has 24 I/O programmable pins like It has 24 I/O programmable pins like PA,PB,PC (3-8 pins). PA,PB,PC (3-8 pins). T T L compatible. T T L compatible. Improved dc driving capability Improved dc driving capability

PROGRAMMABLE PERIPHERAL INTERFACE -8255

  • Upload
    mavis

  • View
    186

  • Download
    9

Embed Size (px)

DESCRIPTION

PROGRAMMABLE PERIPHERAL INTERFACE -8255. Features: It is a programmable device. It has 24 I/O programmable pins like PA,PB,PC (3-8 pins). T T L compatible. Improved dc driving capability. Pin Diagram. Function of pins:. - PowerPoint PPT Presentation

Citation preview

Page 1: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

PROGRAMMABLE PROGRAMMABLE PERIPHERAL INTERFACE PERIPHERAL INTERFACE

-8255-8255

Features:Features:• It is a programmable device.It is a programmable device.

• It has 24 I/O programmable pins like PA,PB,PC It has 24 I/O programmable pins like PA,PB,PC (3-8 pins).(3-8 pins).

T T L compatible. T T L compatible.

Improved dc driving capability Improved dc driving capability

Page 2: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

Pin DiagramPin Diagram

Page 3: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

Function of pins:Function of pins:• Data bus(DData bus(D00-D-D77)):These are 8-bit bi-:These are 8-bit bi-

directional buses, connected to 8085 data directional buses, connected to 8085 data bus for transferring data.bus for transferring data.

• CS: This is Active Low signal. When it is CS: This is Active Low signal. When it is low, then data is transferred from 8085.low, then data is transferred from 8085.

• Read: This is Active Low signal, when it is Read: This is Active Low signal, when it is Low read operation will start.Low read operation will start.

• Write: This is Active Low signal, when it is Write: This is Active Low signal, when it is Low Write operation will start.Low Write operation will start.

Page 4: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

• Address (AAddress (A00-A-A11):This is used to select ):This is used to select the ports. like thisthe ports. like this

A1A1 A0A0 SelectSelect

00 00 PAPA

00 11 PBPB

11 00 PCPC

11 11Control Control

reg.reg.

Page 5: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

• RESET: This is used to reset the device. That RESET: This is used to reset the device. That means clear control registers.means clear control registers.

• PAPA00-PA-PA77:It is the 8-bit bi-directional I/O pins :It is the 8-bit bi-directional I/O pins used to send the data to peripheral orused to send the data to peripheral or

or to receive the data from peripheral. or to receive the data from peripheral.

• PBPB00-PB-PB77:Similar to PA:Similar to PA

• PCPC00-PC-PC77:This is also 8-bit bidirectional I/O :This is also 8-bit bidirectional I/O pins. These lines are divided into two groups.pins. These lines are divided into two groups.

1.1. PCPC00 to PC to PC33(Lower Groups)(Lower Groups)2.2. PCPC44 to PC to PC77 (Higher groups) (Higher groups) These two groups working in separately using These two groups working in separately using

4 data’s.4 data’s.

Page 6: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

Block DiagramBlock Diagram

Page 7: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

Data Bus bufferData Bus buffer::• It is a 8-bit bidirectional Data bus.It is a 8-bit bidirectional Data bus.

• Used to interface between 8255 data Used to interface between 8255 data bus with system bus.bus with system bus.

• The internal data bus and Outer pins The internal data bus and Outer pins DD00-D-D77 pins are connected in internally. pins are connected in internally.

• The direction of data buffer is The direction of data buffer is decided by Read/Control Logic.decided by Read/Control Logic.

Page 8: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

Read/Write Control Logic:Read/Write Control Logic:• This is getting the input signals This is getting the input signals

from control bus and Address busfrom control bus and Address bus

• Control signal are RD and WR.Control signal are RD and WR.

• Address signals are A0,A1,and Address signals are A0,A1,and CS.CS.

• 8255 operation is enabled or 8255 operation is enabled or disabled by CS.disabled by CS.

Page 9: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

Group A and Group B control:Group A and Group B control:• Group A and B get the Control Group A and B get the Control

Signal from CPU and send the command to the Signal from CPU and send the command to the individual control blocks. individual control blocks.

• Group A send the control signal to port A and Group A send the control signal to port A and Port C (Upper) PCPort C (Upper) PC77-PC-PC44..

• Group B send the control signal to port B and Group B send the control signal to port B and Port C (Lower) PCPort C (Lower) PC33-PC-PC00..

• PORT APORT A::

• This is a 8-bit buffered I/O latch.This is a 8-bit buffered I/O latch.

• It can be programmed by mode 0 , mode 1, It can be programmed by mode 0 , mode 1, mode 2 .mode 2 .

Page 10: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

PORT B:PORT B:• This is a 8-bit buffer I/O latch.This is a 8-bit buffer I/O latch.

• It can be programmed by mode 0 and It can be programmed by mode 0 and mode 1.mode 1.

•PORT CPORT C::

• This is a 8-bit Unlatched buffer Input This is a 8-bit Unlatched buffer Input and an Output latch.and an Output latch.

• It is splitted into two parts.It is splitted into two parts.

• It can be programmed by bit set/reset It can be programmed by bit set/reset operation.operation.

Page 11: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

Operation modes:Operation modes:BIT SET/RESET MODE:BIT SET/RESET MODE:• The PORT C can be Set or Reset by sending OUT The PORT C can be Set or Reset by sending OUT

instruction to the CONTROL registers.instruction to the CONTROL registers.

I/O MODES:I/O MODES:

• MODE 0(Simple input / Output):MODE 0(Simple input / Output):• In this mode , port A, port B and port C is used In this mode , port A, port B and port C is used

as individually (Simply).as individually (Simply).

• Features:Features:• Outputs are latched , Inputs are buffered not Outputs are latched , Inputs are buffered not

latched.latched.

• Ports do not have Handshake or interrupt Ports do not have Handshake or interrupt capability.capability.

Page 12: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

• MODE 1 :(Input/output with Hand MODE 1 :(Input/output with Hand shake)shake)

• In this mode, input or output is In this mode, input or output is transferred by hand shaking Signals.transferred by hand shaking Signals.

• Handshaking signals is used to transfer Handshaking signals is used to transfer data between whose data transfer is data between whose data transfer is not same.not same.

Computer

Printer DATA BUS STB ACK

Busy

Page 13: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

• Example:Example:

• The computer send the data to the printer The computer send the data to the printer large speed compared to the printer.large speed compared to the printer.

• When computer send the data according When computer send the data according to the printer speed at the time only, to the printer speed at the time only, printer can accept. printer can accept.

• If printer is not ready to accept the data If printer is not ready to accept the data then after sending the data bus , then after sending the data bus , computer uses another handshaking computer uses another handshaking signal to tell printer that valid data is signal to tell printer that valid data is available on the data bus.available on the data bus.

• Each port uses three lines from port C as Each port uses three lines from port C as handshake signalshandshake signals

Page 14: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

MODE 2:bi-directional I/O data transfer:MODE 2:bi-directional I/O data transfer:

• This mode allows bidirectional data This mode allows bidirectional data transfer over a single 8-bit data bus transfer over a single 8-bit data bus using handshake signals.using handshake signals.

• This feature is possible only Group AThis feature is possible only Group A

• Port A is working as 8-biy bidirectional.Port A is working as 8-biy bidirectional.

• PCPC33-PC-PC77 is used for handshaking purpose. is used for handshaking purpose.

• The data is sent by CPU through this port The data is sent by CPU through this port , when the peripheral request it., when the peripheral request it.

• CONTROL WORD FORMATS:CONTROL WORD FORMATS:

• In the INPUT mode , When RESET is High In the INPUT mode , When RESET is High all 24 pins (3-ports) be a input mode.all 24 pins (3-ports) be a input mode.

Page 15: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

• i.e all flip flops are cleared and the i.e all flip flops are cleared and the interrupts are rest.interrupts are rest.

• This condition is maintained even after This condition is maintained even after RESET goes low.RESET goes low.

• This can be avoid by writing single This can be avoid by writing single control word to the control registers , control word to the control registers , when required.when required.

Page 16: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

FOR BIT SET/RESET MODE:FOR BIT SET/RESET MODE:

• This is bit set/reset control word format.This is bit set/reset control word format.

X X XX X X Don’t careDon’t care

Bit selectBit select

BB00

BB11

BB22

D7 D6 D5 D4 D3 D2 D1 D0

0 1 2 3 4 5 6 7

0 1 0 1 0 1 0 1

0 0 1 1 0 0 1 1

0 0 0 0 1 1 1 1

BIT SET/RESET1=SET0=RESET

BIT SET/RESET FLAG =0 Active

Page 17: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

• PCPC00-PC-PC77 is set or reset as per the status is set or reset as per the status of Dof D0.0.

• A BSR word is written for each bitA BSR word is written for each bit

• Example:Example:

• PCPC33 is Set then control register will be is Set then control register will be 0XXX0111.0XXX0111.

• PCPC44 is Reset then control register will be is Reset then control register will be 0XXX01000.0XXX01000.

• X is a don’t care.X is a don’t care.

Page 18: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

• FOR I/O MODE:FOR I/O MODE:

The mode format for I/O as shown in figureThe mode format for I/O as shown in figure

D7

D6

D5

D4

D3

D2

D1

D0

Group A

Port C Upper 1=Input0=Output

Port B 1=Input0=Output

Mode selection00=mode 001=mode 11x=mode 2

Group B

Port C Lower 1=Input0=Output

Port B 1=Input0=Output

Mode selection0=mode 01=mode 1

Mode set flag=1=Active

Page 19: PROGRAMMABLE PERIPHERAL INTERFACE      -8255

•The control word for both mode is same.

•Bit D7 is used for specifying whether word loaded in to Bit set/reset mode or Mode definition word.

•D7=1=Mode definition mode.

•D7=0=Bit set/Reset mode.