P Address bus Data bus Read-Only Memory (ROM) Read-Write Memory (RAM)

Slides:



Advertisements
Similar presentations
MICROPROCESSOR BASED SYSTEM DESIGN
Advertisements

Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
The Intel 8255 Programmable Peripheral Interface chip is used to give the microprocessor (8088) access to programmable input/ output devices. It has three.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Programmable Interval Timer
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
8253/54 Timer Section /54 Timer Description and Initialization
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Chapter 13: Direct Memory Access and DMA-Controlled I/O.
Chapter 12: Interrupts. Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. The Intel Microprocessors:
Engineering 4862 Microprocessors Lecture 23 Cheng Li EN-4012
82C55 82C55 Programmable Peripheral Interface Interfacing Part III.
The 8085 Microprocessor Architecture
Microprocessor and Microcontroller
MICRO PROCESSER The micro processer is a multipurpose programmable, clock driven, register based, electronic integrated device that has computing and decision.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 13 Direct Memory Access (DMA)
Vacuum tubes Transistor 1948 ICs 1960s Microprocessors 1970s.
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.
Vacuum tubes Transistor 1948 –Smaller, Cheaper, Less heat dissipation, Made from Silicon (Sand) –Invented at Bell Labs –Shockley, Brittain, Bardeen ICs.
FIGURE 7-24 Memory map for the 8088 interface in Figure 7-22 and decoder in Figure The 64K SRAM is mapped to the address range E0000H to EFFFFH.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
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.
Dec Hex Bin 13 D ORG ; THIRTEEN 8253/54 Timer.
CPU Interfacing Memory.
The 8253 Programmable Interval Timer
BASIC INPUT AND OUTPUT INTERFACING.  8085A communicate with outside world using the I/O devices.  Since memory and I/O devices share the system bus,
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.
Input/Output Interface Circuits and LSI Peripheral Devices
8086/8088 Hardware Specifications Power supply:  +5V with tolerance of ±10%;  360mA. Input characteristics:  Logic 0 – 0.8V maximum, ±10μA maximum;
Memory Interface A Course in Microprocessor Electrical Engineering Dept. University of Indonesia.
ECE291 Computer Engineering II Lecture 12 Josh Potts University of Illinois at Urbana- Champaign.
Input / Output (Peripheral) Interfacing
Programmable Peripheral Interface Parallel port Interface 8255
8254 Timer.
Intel 8051 Another family of microcontroller is the Intel 8051 family. The basic 8051 microcontroller has four parallel input/output ports, port 0, 1,
PPI-8255.
Programmable Interrupt Controller (PIC)
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Introduction to Microprocessors - chapter3 1 Chapter 3 The 8085 Microprocessor Architecture.
Basic I/O Interface Fixed Address Variable Address
Block diagram of 8086.
Khaled A. Al-Utaibi  I/O Ports  I/O Space VS Memory Space  80x86 I/O Instructions − Direct I/O Instructions − Indirect I/O Instructions.
1 Microprocessors CSE – 341 Basic I/O Interfacing.
I/O Interface. INTRO TO I/O INTERFACE I/O instructions (IN, INS, OUT, and OUTS) are explained. Also isolated (direct or I/O mapped I/O) and memory-mapped.
8255:Programmable Peripheral Interface
INTERRUPTS. Topics to be discussed  8088/86 Hardware Interrupts pins 8088/86 Hardware Interrupts pins   Pin description Pin description.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Intel 8255A PPI EEE 365 [FALL 2014] LECTURE ATANU K SAHA BRAC UNIVERSITY.
Chapter 11: Basic I/O Interface – Part 1. Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. The Intel.
8255 Programmable Peripheral Interface
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
UNIT – Microcontroller.
Diagram of microprocessor interface with IO devices
The 8255 Programmable Peripheral Interface
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Interfacing Memory Interfacing.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8255.
Parallel communication interface 8255
Programmable Interval timer 8253 / 8254
Programmable Peripheral Interface
Programmable Interval timer 8253 / 8254
Programmable Peripheral Interface
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)
Programmable Interval Timer
Presentation transcript:

P Address bus Data bus Read-Only Memory (ROM) Read-Write Memory (RAM) IOWC MWTC IORC MRDC Read-Only Memory (ROM) Read-Write Memory (RAM) Keyboard (Input) Printer (Output)

I/O Any microprocessor need to be interfaced with I/O devices. The I/O address is 16 bit.

Modes of I/O Instructions Direct I/O – the port address is one of the operands. Address must be 00-FFh. IN AL, 27h Data flows through the accumulator MOV AX, BX OUT 26h, AX ; move 16-bit data from AX to port ; 26h (AL to 26h and AH to 27h) Indirect I/O – the port address is preloaded into DX Address can be 0000-FFFFh String I/O – allows data to pass directly to or from a memory location.

80x86 I/O Instructions

FIGURE 8-2 Sixteen-bit 80x86 input port FIGURE 8-2 Sixteen-bit 80x86 input port. Tristate buffers are used to place the input data on the data bus lines. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-4 Eight-bit 80x86 output port FIGURE 8-4 Eight-bit 80x86 output port. Eight latches are required to store the output data. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-6 Using device-select pulses to control a relay FIGURE 8-6 Using device-select pulses to control a relay. An IN AL,0 instruction will turn the relay on; an OUT 0,AL instruction will turn it off. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Memory mapped I/O

I/O Map

Programmed I/O

Parallel Printer Interface example

Parallel Printer Interface example

Parallel Printer Interface example Polling loop

Peripheral Controllers Intel has developed several peripheral controller chips designed to support its processors. The goal is to give a complete I/O interface in one chip. Examples: 8255 is Programmable Peripheral Interface (PPI). 8259 is Programmable Interrupt Controller (PIC) 8253/8254 is Programmable Interval Timer (PIT) 8237 is Programmable DMA controller. In PC/XT computers these chips are built into the system board and can be seen by inspection. In modern Computers the functionality of these chips has been built into the system board chipset.

8255A Is one of the peripheral controller chips designed to support its processors. 8255 is Programmable Peripheral Interface (PPI). It is a general purpose parallel I/O Interfacing device. It provides 24 I/O lines organized in three 8-bit I/O ports in one 40-pin package. The ports are usually labeled A,B, and C. fig 8.11

Size of ports Ports A and B can be programmed as an 8-bit input or output port. In port C each nipple (four bits) can be programmed separately to be a 4-bit input or output port. Only the above size of ports (byte or nipple) can be programmed. For Example, individual bit in a port cannot be programmed. However, what make 8254 a versatile devise is its programming modes

Programming modes Mode 0: the 8255A is programmed to look like three simple I/O ports. Mode 1: the 8255A is programmed to have two handshaking I/O ports. Mode 1: the 8255A is programmed to have one bidirectional port with five handshaking signals. The modes can be intermixed, for example, port A is programmed to operate in mode 2, while port B operates in mode 0. bit set/reset mode allows individual bits of port C to be set or reset for control purposes.

FIGURE 8-11 8255 programmable peripheral interface (PPI) FIGURE 8-11 8255 programmable peripheral interface (PPI). Twenty-four I/O pins are provided grouped as three 8-bit I/O ports. There is one 8-bit control port. (Courtesy of Intel Corporation.) John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-12 Interfacing the 8255 to the 386/486 processors FIGURE 8-12 Interfacing the 8255 to the 386/486 processors. The four PPI ports are mapped to addresses 0, 4, 8, and C. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

8255 A1 A0 RD WR CS Direction 0 0 0 1 0 PORT A to data bus 0 1 0 1 0 PORT B to data bus 1 0 0 1 0 PORT C to data bus 0 0 1 0 0 data bus to PORT A 0 1 1 0 0 data bus to PORT B 1 0 1 0 0 data bus to PORT C 1 1 1 0 0 data bus to control x x x x 1 data bus in 3rd state 1 1 0 1 0 illegal condition x x 1 1 0 data bus in 3rd state

FIGURE 8-13 Two types of 8255A control bytes FIGURE 8-13 Two types of 8255A control bytes. (a) When bit 7 = 0, a bit set/reset operation is indicated; (b) When bit 7 = 1, any of the modes 0, 1, or 2 can be programmed. (From J. Uffenbeck, Microcomputers and Microprocessors: The 8080, 8085 and Z 80, Prentice Hall, Englewood Cliffs, NJ, 1991.) John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-14 Interfacing a 16-key switch matrix to the 8255A (assumed interfaced to the 386/486 circuit shown in Figure 8-12). Port A is programmed as a mode 0 input port and port C (upper) as a mode 0 output port. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-15 Flowchart of the process required to detect a key closure, debounce the key, and encode with a value between 0 and F. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-17 Block diagram and pin descriptions for the 8254 programmable interval timer. Three separate timers/counters are provided. (Courtesy of Intel Corporation.) John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-18 Interfacing the 8254 to the three-bus architecture of the 8088 processor. Four I/O ports are required. The port addresses and connections shown correspond to those used in the IBM PC. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-19 8254 control word. The standard form is used to specify the operating mode. The counter latch and read-back commands are used when the present count or status is to be read. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

FIGURE 8-22 The 8254 has six different operating modes (mode 0-5) FIGURE 8-22 The 8254 has six different operating modes (mode 0-5). If not shown the GATE (G) input is assumed high to enable the counter. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Mode 0: Mode 1: Event counter (example: timer for interrupt) When the counter initiated it will start decrement count from the next T. Out is low for time of count: (n+1)T. Gate should be high for the counter to decrement. Mode 1: Hardware initiated counter using Gate (positive pulse). When the counter initiated it will start decrement count. Out is low for time of count: nT.

Mode 2: The counter will generate a series of continuous pulses. Out will pulse low for one period low at the end of the count. f= clk/n duty cycle=(n-1)/n Gate should be high. Mode 3: Square wave generator. Like mode2 Half of the count, out is high and low in the other half.

Mode 4: The counter will generate a series of continuous pulses. Out will have one active low pulse when at the end of the count. out is high for (n+1)T and then one active low pulse Gate should be high. Mode 5: Like mode4 But hardware imitated by Gate. out is high for nT and then one active low pulse