The Programmable Peripheral Interface (8255A)

Slides:



Advertisements
Similar presentations
Parul Polytechnic Institute
Advertisements

PROGRAMMABLE PERIPHERAL INTERFACE -8255
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
8255 – PROGRAMMABLE PARALLEL
Lecture 07: 8255 PPI Chip. The 80x86 IBM PC and Compatible Computers Chapter PPI Chip PPI: Programmable Parallel Interface (so it is an I/O.
Engineering 4862 Microprocessors Lecture 23 Cheng Li EN-4012
82C55 82C55 Programmable Peripheral Interface Interfacing Part III.
The 8085 Microprocessor Architecture
Processor System Architecture
kashanu.ac.ir Microprocessors 10-1 IO Devices Stepper Motors DAC, ADC, PPI Lec note 10.
Chapter 10 Input/Output Interface Circuits and LSI Peripheral Devices
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
The 8253 Programmable Interval Timer
Basic I/O Interface A Course in Microprocessor
By, Prof. Tambe S. S. S.N.D. College of Engineering and Research Center Department of Electrical Engineering.
I NTRODUCTION P IN CONFIGARATION O PERATING MODE.
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
Applications of PPI A/D - Temperature Sensor. Analog to Digital.
12/16/  List the elements of 8255A Programmable Peripheral Interface (PPI)  Explain its various operating modes  Develop a simple program to.
PPI-8255.
Programmable Interrupt Controller (PIC)
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
EE365 - Microprocessors period 26 10/23/00 D. R. Schertz # Parallel Ports.
 The Programmable Interrupt Controller (PlC) functions as an overall manager in an Interrupt-Driven system. It accepts requests from the peripheral equipment,
8255:Programmable Peripheral Interface
Intel 8255A PPI EEE 365 [FALL 2014] LECTURE ATANU K SAHA BRAC UNIVERSITY.
8255 Programmable Peripheral Interface
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8255: Programmable Peripheral Interface (PPI)
The 8085 Microprocessor Architecture
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: Internal fault (e.g.. divide by.
Direct Memory address and 8237 dma controller LECTURE 6
Diagram of microprocessor interface with IO devices
CPU Sequencing 6/30/2018.
Interrupts In 8085 and 8086.
The 8085 Microprocessor Architecture
EE3541 Introduction to Microprocessors
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
The 8255 Programmable Peripheral Interface
Dr. Michael Nasief Lecture 2
Presentation On 8259 Made by Md Shabbir Hasan.
8085 Microprocessor Architecture
Programmable Interrupt Controller 8259
Programmable Interrupt Controller 8259
Interrupt.
8253 Timer In software programming of 8085, it has been shown that a delay subroutine can be programmed to introduce a predefined time delay. The delay.
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Interfacing Memory Interfacing.
Chapter 7 Features and Interfacing of Programmable Devices for 8085 based systems.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8255.
Serial Communication Interface: Using 8251
Parallel communication interface 8255
Architecture & Support Components
Programmable Interval timer 8253 / 8254
Programmable Peripheral Interface
8085 Microprocessor Architecture
82C55 Programmable Peripheral Interface
X1 & X2 These are also called Crystal Input Pins.
8259 Programmable Interrupt Controller
Programmable Interval timer 8253 / 8254
Interrupts.
Programmable Peripheral Interface
The 8085 Microprocessor Architecture
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Programmable Interrupt Controller (PIC)
Computer Operation 6/22/2019.
CPU Sequencing 7/20/2019.
Presentation transcript:

The Programmable Peripheral Interface (8255A) 6/22/2019

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/22/2019

Architecture of the 8255A 6/22/2019

8255A Block Functions Data Bus Buffers Read/Write Control Logic Ports 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. 6/22/2019

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. 6/22/2019

8255A - 8085A Interface 6/22/2019

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. 6/22/2019

Mode Word Definition for the 8255A 6/22/2019

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 6/22/2019

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. 6/22/2019

Example of 8255A Operating in Mode 0 Write a program that reads the state of the 12 switches and displays the switch state on the 12 LEDs 6/22/2019

Example of 8255A Operating in Mode 0 The assembly language program is : MVI A, 83 H ;A= out B= in C(lo)= in C(hi)= out OUT F3 H ; write the control word IN F1 H ; read switches on port B OUT F0 H ; display on port A IN F2 H ; read switches on port C (lo) ANI 0F H ; mask top 4-bits - not switch data RLC RLC RLC RLC ; move bottom 4-bits of A to top OUT F2 H ; output reg A to port C 6/22/2019

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 6/22/2019

Mode 1 - Input Port with Handshaking 6/22/2019

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. 6/22/2019

Mode 1 - Input Port with Handshaking On receiving the IBF signal from the 8255A, the peripheral de-asserts the STB/ signal. 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. 6/22/2019

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. 6/22/2019

Mode 1 - Output Port with Handshaking 6/22/2019

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. 6/22/2019

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. 6/22/2019

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. 6/22/2019

Operational Modes - Mode 2 6/22/2019

Mode 2 - Waveforms 6/22/2019

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. 6/22/2019

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 8. Data is output from the processor and latched by the 8255A using the WR/ processor signal. 9. The rising edge of WR/ causes the OBF/ to be asserted, telling the peripheral device there is data for it to read. 10. The peripheral enables its input buffers and tells the 8255A it is ready to receive data by asserting the ACK/ flag. 6/22/2019

Mode 2 - Sequencing 11. 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. 12. The 8255A de-asserts its OBF/ flag telling the peripheral there is no further data to read. 13. 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. 6/22/2019

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. 6/22/2019