EECC250 - Shaaban #1 Lec # 4 Winter99 12-8-99 Computer Input and Output (I/O) One of the basic and essential features designed in a computer system is.

Slides:



Advertisements
Similar presentations
IO Interfaces and Bus Standards. Interface circuits Consists of the cktry required to connect an i/o device to a computer. On one side we have data bus.
Advertisements

I/O Organization popo.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
INPUT-OUTPUT ORGANIZATION
11-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL I/O System Design.
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
MC68HC11 System Overview. System block diagram (A8 version)
The Motorola Parallel Interface Timer (PI/T)
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
I/O Unit.
Processor System Architecture
Presented by: Reshef Schreiber Itay Leibovich Instructed by: Eran Segev.
Programmed I/O (Polling)
P Address bus Data bus Read-Only Memory (ROM) Read-Write Memory (RAM)
Input-Output Problems L1 Prof. Sin-Min Lee Department of Mathematics and Computer Science.
Input/Output and Communication
Practical Session No. 10 Input &Output (I/O). I/O Devices Input/output (I/O) devices provide the means to interact with the “outside world”. An I/O device.
Interface circuits I/O interface consists of the circuitry required to connect an I/O device to a computer bus. Side of the interface which connects to.
EECC250 - Shaaban #1 lec #10 Winter The Motorola PI/T Port A Data Register, PADR: $0FF010 Data Direction Register, PADDR: $0FF004 Port.
1 COSC 3P92 Cosc 3P92 Week 11 Lecture slides Violence is the last refuge of the incompetent. Isaac Asimov, Salvor Hardin in "Foundation"
6. The CPU and Memory Chapt. 7.
Unit-5 CO-MPI autonomous
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
Chapter 10 Input/Output Interface Circuits and LSI Peripheral Devices
INPUT-OUTPUT ORGANIZATION
ECE 447: Lecture 1 Microcontroller Concepts. ECE 447: Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device.
Lesson 3 — How a Computer Processes Data
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Computer Architecture Lecture 8 by Engineer A. Lecturer Aymen Hasan AlAwady 30/12/2013 University of Kufa - Informatics Center for Research and Rehabilitation.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
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.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Input/Output Interface Circuits and LSI Peripheral Devices
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 2.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
ECE Lecture 1 Microcontroller Concepts. Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device Data.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Computer System Internal components - The processor - Main memory - I / O controllers - Buses External components (peripherals). These include: - keyboard.
7. Peripherals 7.1 Introduction of peripheral devices Computer Studies (AL)
INTRODUCTION.  Upon completing this topic, you should be able to: Illustrate a basic elements of digital computer system and their functions, Depicts.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Programmable Peripheral Interface Parallel port Interface 8255
ECE 511: Digital System & Microprocessor
Module 11 Adapted By and Prepared James Tan © 2001.
PPI-8255.
Programmable Logic Controllers LO1: Understand the design and operational characteristics of a PLC system.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
IT3002 Computer Architecture
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.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
8255:Programmable Peripheral Interface
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
IC 3 BASICS, Internet and Computing Core Certification Computing Fundamentals Lesson 2 How Does a Computer Process Data?
Computer Organization and Design
UNIT – Microcontroller.
Diagram of microprocessor interface with IO devices
Input/Output.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
The 8255 Programmable Peripheral Interface
Introduction to Microprocessors and Microcontrollers
8255.
Parallel communication interface 8255
Microprocessor I 7/18/2019.
Presentation transcript:

EECC250 - Shaaban #1 Lec # 4 Winter Computer Input and Output (I/O) One of the basic and essential features designed in a computer system is its ability to exchange data with other external devices, and to allow the user to interact with the system: –Input Devices include: Switches, Keyboards, Mice, Scanners, Cameras, etc. –Output devices include: Lamp/LED/LCD displays, Video monitors, Speakers, Printers, etc. One or more interface circuits usually are used between I/O devices and the CPU to: –Handle transfer of data between CPU and I/O interface. –Handle transfer of data between I/O device and interface. –Enable the CPU to request the status of data sent/received by the interface. Common I/O interfaces: –Serial I/O: RS-232C Data exchanged one bit at a time. –Parallel I/O: Date exchanged one byte at a time.

EECC250 - Shaaban #2 Lec # 4 Winter Serial Communication Example ASCII Character Parity BitFrom68000 ASCII Character Parity Bit Transmitter Buffer (TB) Transmit ASCII Character Parity Bit To ASCII Character Parity Bit Receiver Buffer (RB)Receive Universal Asynchronous Receiver/Transmitter (UART) To device From device

EECC250 - Shaaban #3 Lec # 4 Winter A Typical CPU I/O Connection For each I/O device or interface: A number of registers, reachable by the CPU, are present. These registers are used for data transfer, I/O device control and configuration and for device status monitoring by the CPU. Each of the registers is given a unique address. The address decoder enables the device to recognize its addresses when issued by CPU.

EECC250 - Shaaban #4 Lec # 4 Winter Memory Mapped I/O Addresses of data, control and status registers in I/O devices or interfaces are treated by the CPU as if they were conventional memory locations or addresses: Hence the same instructions that move data to or from memory can be used to transfer data to or from I/O devices. Memory Bus: Address, Data and Control Lines

EECC250 - Shaaban #5 Lec # 4 Winter Memory Mapped I/O The Motorola uses memory mapped I/O, where device registers are assigned unique addresses within the memory address space. I/O data and control registers are treated as if they were memory locations. Example: The SBC08K board used in the lab includes: Two parallel ports A, B using the Motorola Parallel Interface/Timer (PI/T) chip, with a Port General Control Register, PGCR address of $0FF000 –Parallel data port A (or PA) has the following addresses: Data Register of port A, DRA has address: $0FF010 Data Direction Register of port A, DDRA has address: $0FF004 Port A Control Register, PACR has address: $0FF00C –Parallel data port B (or PB) has the following addresses: Data Register of port B, DRB has address: $0FF012 Data Direction Register of port B, DDRA has address: $0FF006 Port B Control Register, PBCR has address: $0FF00E

EECC250 - Shaaban #6 Lec # 4 Winter The Motorola Parallel Interface Timer (PI/T) A general purpose Parallel Interface and Timer, PI/T chip that offers several very complex modes of operation. Data Register, DRA: $0FF010 Data Direction Register, DDRA: $0FF004 Port A Control Register, PACR: $0FF00C Data Register, DRB: $0FF012 Data Direction Register: DDRB: $0FF006 Port B Control Register, PBCR: $0FF00E Port General Control Register PGCR: $0FF000 8 bits wide

EECC250 - Shaaban #7 Lec # 4 Winter The Motorola PI/T Contains three 8-bit parallel ports: PA, PB & PC PA & PB can be programmed as input or output ports, or as both at the same time (full-duplex operation). Can be programmed to interrupt the processor when any port receives new data also contains a programmable 24 bit counter. Handshaking lines can be programmed to provide different communications protocols to the I/O device. The is programmed, and data transfers take place using a total of 23 internal 8-bit registers.

EECC250 - Shaaban #8 Lec # 4 Winter A Typical Single Board Setup 8 bits wide Input DDRA = $00 Output DDRB= $0FF

EECC250 - Shaaban #9 Lec # 4 Winter Programming The Ports A and B are capable of operating in one of four possible modes programmed using the two msb’s of PGCR: –Mode 0 Unidirectional 8 bit transfers (used in lab 3 PGCR = 00). –Mode 1 Unidirectional 16 bit transfers (PA is MSB). –Mode 2 Bidirectional 8 bit transfers. –Mode 3 Bidirectional 16 bit transfers. Within each of these modes are sub modes programmed using PACR and PBCR: –00 Double-buffered input, single buffered output. –01 Double buffered output, no latching of inputs. –1X Input unlatched, No buffering of output. Each of the three ports has a Data Direction Register (DDRA, DDRB and DDRC) associated with it: –Each bit in the DDR controls the direction of I/O on the corresponding bit on the port (1 for output and 0 for input). –e.g. DDRA = $00 for input $FF for output.

EECC250 - Shaaban #10 Lec # 4 Winter Port A or Port B Data OUT BUFFER IN BUFFER OUT PORT IN PORT Output: single-buffered or double-buffered CPU Double Buffered Single Buffered Non-Latched Double Buffered Input: Non-latched or double-buffered Double Buffered Parallel I/O Data Latching/Buffering

EECC250 - Shaaban #11 Lec # 4 Winter PIT EQU $0FF000 Base Address of PI/T PGCR EQU PITPort General Control Register PSRR EQU PIT+2Port service request register PADDR EQU PIT+4Data direction register A PBDDR EQU PIT+6Data direction register B PACR EQU PIT+$0CPort A control register PBCR EQU PIT+$0EPort B control register PADR EQU PIT+$10Port A data register PBDR EQU PIT+$12Port B data register PSR EQU PIT+$1APort status register TCR EQU PIT+$20Timer control register TSR EQU PIT+$34Timer status register Register Address Equates

EECC250 - Shaaban #12 Lec # 4 Winter ORG $1000 DRAEQU $0FF010 Data Register of Port A DDRAEQU $0FF004Data Direction Register of Port A PACREQU $0FF00C Port A Control Register DRBEQU $0FF012 Data Register of Port B DDRBEQU $0FF006Data Direction Register of Port B PBCREQU $0FF00EPort B Control Register PGCREQU $0FF000Address of Port General Control Register PGCRMEQU $00 Equate set mode to 0 DDAEQU $00 Equate Port A direction: input DDBEQU $FF Equate Port B direction: Output STARTMOVE.B #PGCRM,PGCRInitialize the mode to 0 MOVE.B #$80,PACRInitialize port A to submode 1x, non-latched MOVE.B #$80,PBCRInitialize Port B to mode 1x, single buffered MOVE.B #DDA,DDRAInitialize Port A as input port MOVE.B #DDB,DDRBInitialize Port B as output port LOOPNOPNo operation MOVE.B DRA,D0Read a byte from Port A into D0 MOVE.B D0,DRBWrite a byte to Port B (value read from A) NOPNo operation BRA LOOPAlways branch. END START I/O Example This program continuously reads Port A (e.g. switches) and outputs the value to port B (LEDs)