SlideShare a Scribd company logo
1 of 30
The Programmable Peripheral Interface
(8255A)
* *
Learning Objectives
• List the elements of 8255A Programmable
Peripheral Interface (PPI)
• Explain its various operating modes
* *
Features of the 8255A
 The 8255A is a programmable universal I/O interface for digital
signals. It has been designed for compatibility with the 8085A
microprocessor (and other processors with 8-bit data bus
structures)
 It features :
– 24-bits of digital I/O
 2x 8-bit ports plus 2x 4-bit ports or 3x 8-bit ports
– 2x 8-bit Unidirectional Ports with Handshaking
– 1x 8-bit Bidirectional Port with Handshaking plus 1x 8-bit port
– Bit set / bit reset on 8-bits ( port C)
* *
Pin Layout
* *
Architecture of the 8255A
* *
8255A Block Functions
• Data Bus Buffers
– Are bi-directional tri-state buffers to interface the internal 8-
bit bus of the 8255A to the system data bus.
• Read/Write Control Logic
– The CS/ input is driven by the decoded address lines A2 - A7.
The A1, A0 inputs identify any one of four internal registers.
The reset input, when asserted, resets the 8255A to a default
configuration (it is usually driven by the processors resetout
control line). RD/ and WR/ specify the direction of data flow.
• Ports
– There are four ports which can be configured as either input
or output. Port A is an indivisible 8-bit port. Port B is an
indivisible 8-bit port. Port C (upper) is an indivisible 4-bit
port. Port C (lower) is an indivisible 4-bit port.* *
8255A Block Functions
• Group Control Logic
– The group control logic block comprises registers that can be
programmed by the processor and combinational circuitry
whose configuration is a function of the controlling registers.
The combinational circuitry controls the modes in which the
ports operate.
– The group control logic is split into two similar subsytems -
group A control which configures Port A and the upper 4-bits
of Port C. group B control which configures Port B and the
lower 4-bits of Port C.
* *
8255A - 8085A Interface
* *
8255A Addresses and Initialisation
• The 8255A has four addressable I/O locations
– base address + 0 A1, A0 = 00 Port A
– base address + 1 A1, A0 = 01 Port B
– base address + 2 A1, A0 = 10 Port C
– base address + 3 A1, A0 = 11 Control Register
• Before the 8255A can be used it must first be configured. This is
accomplished by the processor writing a mode word to the
control register.
• The mode word specifies whether the ports be input ports,
output ports or bi-directional ports and the manner in which the
ports are to operate.
* *
Mode Word Definition for the 8255A
* *
Example of 8255A Initialisation
• Example : Write the initialisation code for an 8255A at
base address F0 H such that :
– Both groups A & B operate in mode 0
– Port A 8-bit input port
– Port B 8-bit output port
– Port C ( upper) 4-bit output port
– Port C ( lower) 4-bit input port
• MVI A, 91 H ; Control word
• OUT F3 H ; Control port
* *
Operational Modes - Mode 0
• Mode 0 for the 8255A is referred to as the simple I/O mode
• Ports A & B are used as simple 8-bit input or output ports. Port C
(upper) & Port C (lower) are used as simple 4-bit input or output
ports.
• When used as output ports the data from the processor is
latched.
• When used as input ports, the data from the peripheral device is
not latched. The port appears as simple tri-state buffers.
• There are no handshaking signals between the port and the
peripheral device.
* *
Bit Set - Reset Mode
 A very useful feature of port C of the 8255A, when it is not being
used for handshake operations, is its bit-set / bit-reset capability.
 When port C is an output port, the individual bits of the port can
be set or cleared.
 This is accomplished by writing the following data word to the
control port. Note bit D7 of the data is logic ‘0’. The 8255A uses
this bit to distinguish between mode words and the bit-set
facility.
* *
B2, B1, B0 3-bit code specifying which bit of port C is to be
manipulated
S ‘1’ set the bit ‘0’ reset the bit.
Operational Modes - Mode 1
 In this mode handshake signals are exchanged between the port
and the peripheral device prior to transfer of the data.
 Ports A and B are the data ports. Port C assumes the role of
supplying the handshaking signals.
 The data ports are software configurable to be either input
ports or output ports but not bi-directional ports.
 Each data port uses 3-bits of port C for handshaking signals. The
remaining 2-bits of port C are available for simple I/O functions.
 Irrespective whether the data ports are input ports or output
ports the data is latched.
 Mode 1 supports interrupt logic
* *
Mode 1 - Input Port with Handshaking
• Status Word
* *
Mode 1 - Input Port with Handshaking
• STB/ (Strobe Input)
– Active low
– Indicate that it has transmitted a byte of data
• IBF (Input Buffer Full)
– Indicate that the input latch has received the byte
data
– It is reset when MPU reads the data
* *
Mode 1 - Input Port with Handshaking
 INTR (Interrupt Request)
– Used to interrupt the MPU
– Generated if STB/, IBF and INTE (internal flip-flop) are all
at logic ‘1’
– Reset by the falling edge of the RD/ signal
 INTE (Interrupt Enable)
– Internal flip-flop used to enable or disable the generation
of the INTR signal
– Is set using BSR mode
* *
Mode 1 - Input Port with Handshaking
• The peripheral checks the IBF signal to ensure the 8255A is ready for
data ( i.e. the processor has read the previous data ).
• The peripheral places the data it wishes to send to the processor
onto the data port.
• The peripheral asserts the strobe signal ( STB/ = 0 )
• The 8255A latches the data on the port using the STB/ signal to
enable its input latches.
• After latching the data the 8255A asserts the IBF signal to tell the
peripheral it has read the data and that the input latches are full.
• The IBF signal remains asserted until the processor reads the data
stored in the port latches.
• On receiving the IBF signal from the 8255A, the peripheral de-asserts
the STB/ signal.
* *
Mode 1 - Input Port with Handshaking
–Alternative -- Interrupt Driven System
 If the INTE bit of the port is set (accomplished by bit set facility
on port C) then when both IBF and STB/ are logic ‘1’ an interrupt
is generated on the ports INTR line.
 With this line connected to one of the 8085A’s interrupt input
pins and with processor interrupts enabled then when INTR goes
high an interrupt service routine will be executed.
 The ISR is required to read the data from the 8255A input port.
When the data has been read from the port, the 8255A de-
asserts its IBF control signal telling the peripheral device that the
data has been read by the processor and that it is free to send
new data.
* *
Mode 1 - Input Port with Handshaking
– Alternative -- Polled System
– An alternative to using interrupts to determine whether there
is data at the input port to be read, is to poll the status of the
8255A.
– This can be accomplished by reading port C of the 8255A. The
bits read have the following interpretation :
* *
By continually reading the status and testing the appropriate IBF bit can
the processor determine if there is new data at the input port for it to
read.
Mode 1 - Output Port with Handshaking
• Status Word
* *
Mode 1 - Output Port with Handshaking
• ACK/ (Acknowledge)
– MPU must set this input signal low
– Indicate that MPU receives the data from the 8255A
port
• OBF/ (Output Buffer Full)
– Goes low when MPU writes data into the output
latch
– Indicate that new data is ready to be read
* *
Mode 1 - Output Port with Handshaking
 INTR (Interrupt Request)
– Used to interrupt the MPU
– Generated if ACK/, OBF/ and INTE (internal flip-flop) are
all at logic ‘1’
– Reset by the falling edge of the RD/ signal
 INTE (Interrupt Enable)
– Internal flip-flop used to enable or disable the generation
of the INTR signal
– Is set using BSR mode
* *
Mode 1 - Output Port with Handshaking
• An initial state is assumed with the output data latches of the
8255A empty and the peripheral device is ready to accept data.
• The processor writes data, destined for the peripheral, to the
8255A’s data latches. The data is latched into the 8255A on the
rising edge of the WR/ control signal.
• Loading data into the data latches of the 8255A clears the
interrupt request output of the 8255A (INTR = 0) and asserts the
output buffer full flag (OBF/ = 0).
• The peripheral device reads the output data of the 8255A when
it sees OBF/ asserted.
• Once the peripheral has read the data, it generates an ACK/ = 0
pulse to tell the 8255A that its output data has been read.
* *
Mode 1 - Output Port with Handshaking
 On the negative edge of the ACK/ signal, the 8255A clears its OBF/
signal which tells the peripheral device there is no data for it to
read.
 On the rising edge of the ACK/ signal and provided that both WR/
and OBF/ are in the de-asserted state, the 8255A generates an
interrupt to the processor (assuming interrupt mode is being
used).
 This interrupt effectively tells the processor that the peripheral
device has read the previous data sample and is ready to receive
new data if the processor has data for it.
 If interrupts are not chosen as the operating mechanism, the
status register of the 8255A can be polled to determine when the
peripheral has read the previous data sample.
* *
Operational Modes - Mode 2
• When operated in Mode 2, port A becomes bi-
directional.
• The bi-directional operational mode for port A is
supported by five handshaking signals using bits of port
C.
• Port B can be operated in either mode 0 or mode 1.
When used in mode 1 the remaining three bits of port C
assume the role of handshaking signals for port B.
• If port B is used in mode 0 the remaining bits of port C
can be programmed in mode 0 to be either an output
port or an input port.
* *
Operational Modes - Mode 2
* *
Mode 2 - Sequencing
 Read data from peripheral followed by writing data to peripheral
– 1. Data is placed on PA0 - PA7 by the peripheral
– 2. Peripheral asserts its STB/ output telling 8255 data to be
read. The 8255A latches the data in its input buffers.
– 3. The 8255 asserts its IBF output to tell the peripheral the
data has been latched but not read by the processor.
– 4. The peripheral de-asserts its STB/ output with IBF still set.
The 8255A requests an interrupt ( assuming interrupts are
used)
– 5. Polling or interrupts are now used to service the 8255A. The
8255A input buffers are read by the processor when RD/ goes
low.
* *
Mode 2 - Sequencing
– 6. The falling edge of RD/ resets INTR.
– 7 The rising edge of RD/ resets the IBF flag to tell the
peripheral the data has been read by the processor and that it
can send the next data sample.
 Processor write sequencing
– 1. Data is output from the processor and latched by the
8255A using the WR/ processor signal.
– 2. The rising edge of WR/ causes the OBF/ to be asserted,
telling the peripheral device there is data for it to read.
– 3. The peripheral enables its input buffers and tells the 8255A
it is ready to receive data by asserting the ACK/ flag.
* *
Mode 2 - Sequencing
– 4. On the falling edge of ACK/, the 8255A releases its
latched data onto the lines PA0 - PA7. The data is
read by the peripheral device.
– 5. The 8255A de-asserts its OBF/ flag telling the
peripheral there is no further data to read.
– 6. The rising edge of ACK/ causes the 8255A to
generate an interrupt request. ( if this feature is
used ). The interrupt tells the processor that the
peripheral has read the data and that further data
can be written to the 8255A.
* *

More Related Content

What's hot

Programmable peripheral interface 8255
Programmable peripheral interface 8255Programmable peripheral interface 8255
Programmable peripheral interface 8255Marajulislam3
 
25. 8255 programmable peripheral interface
25. 8255 programmable peripheral interface25. 8255 programmable peripheral interface
25. 8255 programmable peripheral interfacesandip das
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085techbed
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesSrikrishna Thota
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086Dr. AISHWARYA N
 
Architecture and pin diagram of 8085
Architecture and pin diagram of 8085Architecture and pin diagram of 8085
Architecture and pin diagram of 8085Suchismita Paul
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introductionShubham Singh
 
Memory banking-of-8086-final
Memory banking-of-8086-finalMemory banking-of-8086-final
Memory banking-of-8086-finalEstiak Khan
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IVineethMP2
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257MdFazleRabbi18
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adcPRADEEP
 

What's hot (20)

8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
8255 ppi
8255 ppi8255 ppi
8255 ppi
 
8251 USART
8251 USART8251 USART
8251 USART
 
Programmable peripheral interface 8255
Programmable peripheral interface 8255Programmable peripheral interface 8255
Programmable peripheral interface 8255
 
25. 8255 programmable peripheral interface
25. 8255 programmable peripheral interface25. 8255 programmable peripheral interface
25. 8255 programmable peripheral interface
 
Assembly Language Programming Of 8085
Assembly Language Programming Of 8085Assembly Language Programming Of 8085
Assembly Language Programming Of 8085
 
1.ppi 8255
1.ppi 8255 1.ppi 8255
1.ppi 8255
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
Adc and dac
Adc and dacAdc and dac
Adc and dac
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
USART
USARTUSART
USART
 
Architecture and pin diagram of 8085
Architecture and pin diagram of 8085Architecture and pin diagram of 8085
Architecture and pin diagram of 8085
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introduction
 
Memory banking-of-8086-final
Memory banking-of-8086-finalMemory banking-of-8086-final
Memory banking-of-8086-final
 
8253ppt
8253ppt8253ppt
8253ppt
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part I
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adc
 
8279 PKDI
8279 PKDI8279 PKDI
8279 PKDI
 
SPI Bus Protocol
SPI Bus ProtocolSPI Bus Protocol
SPI Bus Protocol
 

Similar to Ppi 8255

UNIT 3 Peripheral Interfacing.pptx
UNIT 3 Peripheral Interfacing.pptxUNIT 3 Peripheral Interfacing.pptx
UNIT 3 Peripheral Interfacing.pptxGowrishankar C
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptxBASKARS53
 
Mod-2 M&M.pptx
Mod-2 M&M.pptxMod-2 M&M.pptx
Mod-2 M&M.pptxTechCook1
 
Operation of 8255A
Operation of 8255AOperation of 8255A
Operation of 8255AAnuj Yadav
 
8255 ppi students material for ppi mpmc study
8255 ppi students material for ppi mpmc study8255 ppi students material for ppi mpmc study
8255 ppi students material for ppi mpmc studySirisha Vamsi
 
8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.pptkhushiduppala
 
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptMECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptCHANDRA KUMAR S
 
MicroProcessors and MicroControllersUnit3
MicroProcessors and MicroControllersUnit3MicroProcessors and MicroControllersUnit3
MicroProcessors and MicroControllersUnit3deepakdmaat
 

Similar to Ppi 8255 (20)

UNIT 3 Peripheral Interfacing.pptx
UNIT 3 Peripheral Interfacing.pptxUNIT 3 Peripheral Interfacing.pptx
UNIT 3 Peripheral Interfacing.pptx
 
8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptx
 
Programmable Peripheral Devices
Programmable Peripheral Devices Programmable Peripheral Devices
Programmable Peripheral Devices
 
Mod-2 M&M.pptx
Mod-2 M&M.pptxMod-2 M&M.pptx
Mod-2 M&M.pptx
 
8255 ppi.pptx
8255 ppi.pptx8255 ppi.pptx
8255 ppi.pptx
 
8255_Ppi new
8255_Ppi new8255_Ppi new
8255_Ppi new
 
Unit 3 mpmc
Unit 3 mpmcUnit 3 mpmc
Unit 3 mpmc
 
Operation of 8255A
Operation of 8255AOperation of 8255A
Operation of 8255A
 
8255 ppi students material for ppi mpmc study
8255 ppi students material for ppi mpmc study8255 ppi students material for ppi mpmc study
8255 ppi students material for ppi mpmc study
 
8255 class
8255 class8255 class
8255 class
 
8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt
 
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptMECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
 
PPI-MECHATRONICS
PPI-MECHATRONICSPPI-MECHATRONICS
PPI-MECHATRONICS
 
MicroProcessors and MicroControllersUnit3
MicroProcessors and MicroControllersUnit3MicroProcessors and MicroControllersUnit3
MicroProcessors and MicroControllersUnit3
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
 
8255.pdf
8255.pdf8255.pdf
8255.pdf
 
12 mt06ped001
12 mt06ped001 12 mt06ped001
12 mt06ped001
 
8255 programable io
8255  programable io8255  programable io
8255 programable io
 

More from Muhammadalizardari (14)

Effective communication-presentation
Effective communication-presentationEffective communication-presentation
Effective communication-presentation
 
Computer graphics workbook
Computer graphics workbookComputer graphics workbook
Computer graphics workbook
 
8085 instruction-set
8085 instruction-set8085 instruction-set
8085 instruction-set
 
Dld
DldDld
Dld
 
Practical 01 (detailed)
Practical 01 (detailed)Practical 01 (detailed)
Practical 01 (detailed)
 
Subsections
SubsectionsSubsections
Subsections
 
Need based application
Need based applicationNeed based application
Need based application
 
Making things electronics
Making things electronicsMaking things electronics
Making things electronics
 
Intro to electronics
Intro to electronicsIntro to electronics
Intro to electronics
 
Ee intro electronics
Ee intro electronicsEe intro electronics
Ee intro electronics
 
Definition of electronics
Definition of electronicsDefinition of electronics
Definition of electronics
 
F16 cs61 li-fi
F16 cs61   li-fiF16 cs61   li-fi
F16 cs61 li-fi
 
F16 cs15 free lancing (1)
F16 cs15   free lancing (1)F16 cs15   free lancing (1)
F16 cs15 free lancing (1)
 
F16 cs61 cryptography
F16 cs61   cryptographyF16 cs61   cryptography
F16 cs61 cryptography
 

Recently uploaded

Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...akbard9823
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Personfurqan222004
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 

Recently uploaded (20)

Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance VVIP 🍎 SERVICE
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SERVICECall Girls Service Dwarka @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SERVICE
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance VVIP 🍎 SERVICE
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Person
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 

Ppi 8255

  • 1. The Programmable Peripheral Interface (8255A) * *
  • 2. Learning Objectives • List the elements of 8255A Programmable Peripheral Interface (PPI) • Explain its various operating modes * *
  • 3. Features of the 8255A  The 8255A is a programmable universal I/O interface for digital signals. It has been designed for compatibility with the 8085A microprocessor (and other processors with 8-bit data bus structures)  It features : – 24-bits of digital I/O  2x 8-bit ports plus 2x 4-bit ports or 3x 8-bit ports – 2x 8-bit Unidirectional Ports with Handshaking – 1x 8-bit Bidirectional Port with Handshaking plus 1x 8-bit port – Bit set / bit reset on 8-bits ( port C) * *
  • 6. 8255A Block Functions • Data Bus Buffers – Are bi-directional tri-state buffers to interface the internal 8- bit bus of the 8255A to the system data bus. • Read/Write Control Logic – The CS/ input is driven by the decoded address lines A2 - A7. The A1, A0 inputs identify any one of four internal registers. The reset input, when asserted, resets the 8255A to a default configuration (it is usually driven by the processors resetout control line). RD/ and WR/ specify the direction of data flow. • Ports – There are four ports which can be configured as either input or output. Port A is an indivisible 8-bit port. Port B is an indivisible 8-bit port. Port C (upper) is an indivisible 4-bit port. Port C (lower) is an indivisible 4-bit port.* *
  • 7. 8255A Block Functions • Group Control Logic – The group control logic block comprises registers that can be programmed by the processor and combinational circuitry whose configuration is a function of the controlling registers. The combinational circuitry controls the modes in which the ports operate. – The group control logic is split into two similar subsytems - group A control which configures Port A and the upper 4-bits of Port C. group B control which configures Port B and the lower 4-bits of Port C. * *
  • 8. 8255A - 8085A Interface * *
  • 9. 8255A Addresses and Initialisation • The 8255A has four addressable I/O locations – base address + 0 A1, A0 = 00 Port A – base address + 1 A1, A0 = 01 Port B – base address + 2 A1, A0 = 10 Port C – base address + 3 A1, A0 = 11 Control Register • Before the 8255A can be used it must first be configured. This is accomplished by the processor writing a mode word to the control register. • The mode word specifies whether the ports be input ports, output ports or bi-directional ports and the manner in which the ports are to operate. * *
  • 10. Mode Word Definition for the 8255A * *
  • 11. Example of 8255A Initialisation • Example : Write the initialisation code for an 8255A at base address F0 H such that : – Both groups A & B operate in mode 0 – Port A 8-bit input port – Port B 8-bit output port – Port C ( upper) 4-bit output port – Port C ( lower) 4-bit input port • MVI A, 91 H ; Control word • OUT F3 H ; Control port * *
  • 12. Operational Modes - Mode 0 • Mode 0 for the 8255A is referred to as the simple I/O mode • Ports A & B are used as simple 8-bit input or output ports. Port C (upper) & Port C (lower) are used as simple 4-bit input or output ports. • When used as output ports the data from the processor is latched. • When used as input ports, the data from the peripheral device is not latched. The port appears as simple tri-state buffers. • There are no handshaking signals between the port and the peripheral device. * *
  • 13. Bit Set - Reset Mode  A very useful feature of port C of the 8255A, when it is not being used for handshake operations, is its bit-set / bit-reset capability.  When port C is an output port, the individual bits of the port can be set or cleared.  This is accomplished by writing the following data word to the control port. Note bit D7 of the data is logic ‘0’. The 8255A uses this bit to distinguish between mode words and the bit-set facility. * * B2, B1, B0 3-bit code specifying which bit of port C is to be manipulated S ‘1’ set the bit ‘0’ reset the bit.
  • 14. Operational Modes - Mode 1  In this mode handshake signals are exchanged between the port and the peripheral device prior to transfer of the data.  Ports A and B are the data ports. Port C assumes the role of supplying the handshaking signals.  The data ports are software configurable to be either input ports or output ports but not bi-directional ports.  Each data port uses 3-bits of port C for handshaking signals. The remaining 2-bits of port C are available for simple I/O functions.  Irrespective whether the data ports are input ports or output ports the data is latched.  Mode 1 supports interrupt logic * *
  • 15. Mode 1 - Input Port with Handshaking • Status Word * *
  • 16. Mode 1 - Input Port with Handshaking • STB/ (Strobe Input) – Active low – Indicate that it has transmitted a byte of data • IBF (Input Buffer Full) – Indicate that the input latch has received the byte data – It is reset when MPU reads the data * *
  • 17. Mode 1 - Input Port with Handshaking  INTR (Interrupt Request) – Used to interrupt the MPU – Generated if STB/, IBF and INTE (internal flip-flop) are all at logic ‘1’ – Reset by the falling edge of the RD/ signal  INTE (Interrupt Enable) – Internal flip-flop used to enable or disable the generation of the INTR signal – Is set using BSR mode * *
  • 18. Mode 1 - Input Port with Handshaking • The peripheral checks the IBF signal to ensure the 8255A is ready for data ( i.e. the processor has read the previous data ). • The peripheral places the data it wishes to send to the processor onto the data port. • The peripheral asserts the strobe signal ( STB/ = 0 ) • The 8255A latches the data on the port using the STB/ signal to enable its input latches. • After latching the data the 8255A asserts the IBF signal to tell the peripheral it has read the data and that the input latches are full. • The IBF signal remains asserted until the processor reads the data stored in the port latches. • On receiving the IBF signal from the 8255A, the peripheral de-asserts the STB/ signal. * *
  • 19. Mode 1 - Input Port with Handshaking –Alternative -- Interrupt Driven System  If the INTE bit of the port is set (accomplished by bit set facility on port C) then when both IBF and STB/ are logic ‘1’ an interrupt is generated on the ports INTR line.  With this line connected to one of the 8085A’s interrupt input pins and with processor interrupts enabled then when INTR goes high an interrupt service routine will be executed.  The ISR is required to read the data from the 8255A input port. When the data has been read from the port, the 8255A de- asserts its IBF control signal telling the peripheral device that the data has been read by the processor and that it is free to send new data. * *
  • 20. Mode 1 - Input Port with Handshaking – Alternative -- Polled System – An alternative to using interrupts to determine whether there is data at the input port to be read, is to poll the status of the 8255A. – This can be accomplished by reading port C of the 8255A. The bits read have the following interpretation : * * By continually reading the status and testing the appropriate IBF bit can the processor determine if there is new data at the input port for it to read.
  • 21. Mode 1 - Output Port with Handshaking • Status Word * *
  • 22. Mode 1 - Output Port with Handshaking • ACK/ (Acknowledge) – MPU must set this input signal low – Indicate that MPU receives the data from the 8255A port • OBF/ (Output Buffer Full) – Goes low when MPU writes data into the output latch – Indicate that new data is ready to be read * *
  • 23. Mode 1 - Output Port with Handshaking  INTR (Interrupt Request) – Used to interrupt the MPU – Generated if ACK/, OBF/ and INTE (internal flip-flop) are all at logic ‘1’ – Reset by the falling edge of the RD/ signal  INTE (Interrupt Enable) – Internal flip-flop used to enable or disable the generation of the INTR signal – Is set using BSR mode * *
  • 24. Mode 1 - Output Port with Handshaking • An initial state is assumed with the output data latches of the 8255A empty and the peripheral device is ready to accept data. • The processor writes data, destined for the peripheral, to the 8255A’s data latches. The data is latched into the 8255A on the rising edge of the WR/ control signal. • Loading data into the data latches of the 8255A clears the interrupt request output of the 8255A (INTR = 0) and asserts the output buffer full flag (OBF/ = 0). • The peripheral device reads the output data of the 8255A when it sees OBF/ asserted. • Once the peripheral has read the data, it generates an ACK/ = 0 pulse to tell the 8255A that its output data has been read. * *
  • 25. Mode 1 - Output Port with Handshaking  On the negative edge of the ACK/ signal, the 8255A clears its OBF/ signal which tells the peripheral device there is no data for it to read.  On the rising edge of the ACK/ signal and provided that both WR/ and OBF/ are in the de-asserted state, the 8255A generates an interrupt to the processor (assuming interrupt mode is being used).  This interrupt effectively tells the processor that the peripheral device has read the previous data sample and is ready to receive new data if the processor has data for it.  If interrupts are not chosen as the operating mechanism, the status register of the 8255A can be polled to determine when the peripheral has read the previous data sample. * *
  • 26. Operational Modes - Mode 2 • When operated in Mode 2, port A becomes bi- directional. • The bi-directional operational mode for port A is supported by five handshaking signals using bits of port C. • Port B can be operated in either mode 0 or mode 1. When used in mode 1 the remaining three bits of port C assume the role of handshaking signals for port B. • If port B is used in mode 0 the remaining bits of port C can be programmed in mode 0 to be either an output port or an input port. * *
  • 27. Operational Modes - Mode 2 * *
  • 28. Mode 2 - Sequencing  Read data from peripheral followed by writing data to peripheral – 1. Data is placed on PA0 - PA7 by the peripheral – 2. Peripheral asserts its STB/ output telling 8255 data to be read. The 8255A latches the data in its input buffers. – 3. The 8255 asserts its IBF output to tell the peripheral the data has been latched but not read by the processor. – 4. The peripheral de-asserts its STB/ output with IBF still set. The 8255A requests an interrupt ( assuming interrupts are used) – 5. Polling or interrupts are now used to service the 8255A. The 8255A input buffers are read by the processor when RD/ goes low. * *
  • 29. Mode 2 - Sequencing – 6. The falling edge of RD/ resets INTR. – 7 The rising edge of RD/ resets the IBF flag to tell the peripheral the data has been read by the processor and that it can send the next data sample.  Processor write sequencing – 1. Data is output from the processor and latched by the 8255A using the WR/ processor signal. – 2. The rising edge of WR/ causes the OBF/ to be asserted, telling the peripheral device there is data for it to read. – 3. The peripheral enables its input buffers and tells the 8255A it is ready to receive data by asserting the ACK/ flag. * *
  • 30. Mode 2 - Sequencing – 4. On the falling edge of ACK/, the 8255A releases its latched data onto the lines PA0 - PA7. The data is read by the peripheral device. – 5. The 8255A de-asserts its OBF/ flag telling the peripheral there is no further data to read. – 6. The rising edge of ACK/ causes the 8255A to generate an interrupt request. ( if this feature is used ). The interrupt tells the processor that the peripheral has read the data and that further data can be written to the 8255A. * *